Developing an XNA Particle System

Today my friend Vicente and I gave a small speech at the UPSAM about XNA. Precisely, we presented a small particle engine done into a GameComponent, to acomplish some goals:

  • Showing how clean and easy is to use GameComponents (actually we use one Camera/Input GC from fegelein) and register them as GameServices
  • Showing how to create a custom content pipeline element (for loading our particle systems)
  • Creating something different, not the typical 3D model with a light.
  • Having fun (and we did a lot, testing particles and tweaking their parameters is quite fun!)

The particle system uses emitters (we've implemented a sphereemitter, but it's very easy to create more), but we didn't have time to create a pool of particles to reuse them and optimise performance and memory consumption (maybe for a 2.0 version ;)

I want to comment all the code (rushing is bad for comments :P), refactor one or two things, and Vicente wants to check something about the randomness of the particle creation, so I've uploaded the slides (both in english and spanish, it's a short slide-deck), and in few days I'll post the sources of the engine.

You can find both the slides and the source code of the particle engine here.


Many thanks to the people of the dotNetClubs and David Salgado (a pleasure seeing you, as always). Today I've remembered my good times at the university, when I was full of ideas and wanted to investigate, learn and code, code & code!

Posted by Kartones on 2007-05-11

Comments?

Share via: Twitter Linkedin Google+ Facebook