Creating a flashlight
Even if you're not a fan of the genre, you need to be aware of the growing number of survival horror games on the market, especially the ones that are popular with indie developers. Many of these games (probably even most of them) require you to fumble around in dark, creepy locales as you attempt to solve a puzzle, unlock a secret, or find your long lost dad who disappeared under suspicious circumstances. What do the developers give you to aid you on your quest? A flashlight. One that keeps running out of batteries. Well, I have good news for you if you're looking to make a 2D survival horror game: we're going to learn how to create a flashlight effect in GameMaker.
Getting ready
Once again, you'll need a room (rm_game
), a controllable player object (obj_player
), an obstacle (obj_block
), and a light controller object (obj_lightControl
). Go ahead and place instances of obj_block
around the room so that you can test them on completion. For this recipe, you'll also need...