In This Chapter
Working with the Surface function
Placing decals into the game
Using lighting effects
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 ...