O'Reilly logo

GameMaker: Studio For Dummies by Michael Rohde

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9

Using Surfaces to Create Effects

In This Chapter

arrow Working with the Surface function

arrow Creating shadows

arrow Placing decals into the game

arrow Using lighting effects

arrow Using Views with Surfaces

In GameMaker: Studio, a Surface provides you another layer, so to speak, on which you can draw. So far in this book, I’ve only discussed using Sprites and background colors to create a background effect in a Room (see Chapter 2). Essentially, by using Surfaces, you can draw on top of your background (the screen) if you want to add effects during the game.

For example, say you have a shooter game in which the player can toss grenades. When the player tosses the grenade, an explosion occurs. When the explosion occurs, you want a portion of the screen to appear damaged. You create the damage effect by using Surfaces, in that the damage appears on the screen after the grenade explodes. Other uses for Surfaces include adding shadows and lights to complete the look and feel of your game.

Note: This chapter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required