Chapter 14. Particle Systems

In this chapter, you'll get back to work on the 3D game you've been building throughout most of the 3D section of this book. Specifically, you'll be adding some particle effects to your game. Particle effects allow game developers to create exciting and realistic special effects—developers use them for things such as smoke, fire, explosions, magic, and other effects that can make the gameplay experience more exciting and attractive.

To start with, let's talk about particles. What is a particle? In game development terms, a particle typically represents a single component in a particle effect. A single spark in a firework, a single element in a smoke plume, and a single flickering light in a magical effect are all examples of particles. The combination of multiple particles flowing in a single special effect is what's called a particle effect.

Particle engines are the driving mechanism behind particle effects. A particle engine manipulates multiple particles to create a particle effect by applying forces such as gravity and momentum to make the particles move and react in realistic ways.

Throughout this chapter, you'll create a particle engine that creates explosion particle effects that you'll plug into your game when a shot strikes an enemy ship.

Creating a Custom Vertex

To create our particle engine, you'll be working with the 3D game code that you have been building so far in the 3D section of this book. Open the solution you finished with at the end ...

Get Learning XNA 3.0 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.