O'Reilly logo

Monkey Game Development by Michael Hartlef

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

Eye candy—particle effects

Of course, even in this little game, we want some eye candy; particles in games and little graphics that appear fast, move over a small or long distance, and then disappear. They usually don't collide with anything but give the impression that they are pieces of something that got destroyed or are made of gas, smoke, water, or whatever.

One method to create particles is to create them all at once and then let them move on automatically. When you want to create particles continuously over time, you need to have emitters to do the job for you. An emitter automatically creates particles and that is what we will create now.

The particle emitter class

The emitter class to create particles will be taking care of creating new ...

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