I'm making a tower-defense game for Windows (not phone) in XNA.

I've seen this video of another tower-defense game for Windows Phone that uses particle effects, which I really like. They change color, glow and density as they move away from the explosion. Really cool stuff!


I would like a similar result (particle-wise) to the stuff in the video, however, I don't know where to start. I suppose I need to do linelist hardware instancing to achieve the result, and then update every particle position on the CPU.

Or is there a better alternative? Post your suggestions. That'd be great, thanks.

Edit It's the explosion particle effect that I want to implement. Not the particle effects that the projectiles leave when they fire.


1 Answer 1


What you are looking for is a particle engine. take a look at the Mercury Particle Engine on GitHub. I really like it, and recommend it. The only down side is the latest version (in source, not the release) doesn't have a working editor as of now. The rest of the it is stable though. (The release is XNA 3.1, and the version is source is 4.0)

If this engine doesn't cut it for you there are many others. You could even build your own. It isn't that hard

In a nutshell, you have a collection of Texture2Ds. With each pass you update their velocity, alpha, rotation, and scale. So if you wanted a smoke effect, create some Texture2Ds (say 5) with the same texture. Give each one a slightly different rotation, scale, alpha, and position them in a cluster. With each pass of Update, modify those properties until the particle "dies".

Looking at the video, it looks like they might be doing some 3D rendering to get the warp effect of the board. I would start off simple. Try to get some simple particle effects going without jumping into the 3D stuff first.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .