Chapter 9
Using Surfaces to Create Effects
In This Chapter
Working with the Surface function
Creating shadows
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 ...
Get GameMaker: Studio For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.