Using Texture Sheets to simulate fire with a Particle System
Much of the work of creating visual effects can be achieved if we have a multiple-image sprite sheet. Then, the visual form of each particle, as it changes over its lifetime, can be driven as a 2D animation, looping through the sequence of images from the sprite sheet.
In this recipe, we’ll create a flickering blue flame effect using a Particle System that animates its particles from a multiple-image sprite sheet from the Open Game Art website:
Figure 15.14: The flickering blue flames Particle System we’ll create in this recipe
Getting ready
For this recipe, we need a sprite sheet with multiple images on a black background. Either use one of your own or use the fire2_64.png
blue flame sprite sheet from Open Game Art. Thanks to Ben Hickling for sharing this asset for game developers to use.
We’ve prepared the file you need in the 14_03
folder. Alternatively, you can download the...