O'Reilly logo

GameMaker Cookbook by Brandon Gardiner

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

Simulating rainfall

One thing I enjoy is when a game developer adds some small touches to increase the player's immersion in the game's world. How can you go about doing this? Why not add some real-world elements to start with? Let's try making it rain. By this, I mean simulating drops of water falling from the sky, not tossing dollar bills in slow motion; though this would also be cool.

Getting ready

The following recipe is incredibly easy and illustrates another way in which you can use GameMaker's built-in simple particle effects. We're going to continue from the scene that we created in the previous recipe, and we only need to add one thing: a rainmaker object called obj_rain. Seems simple enough, right? Let's take a look at how it can work. ...

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