How to best use the Particle System?

Oct 1, 2010 at 5:46 PM

My game is really starting to come together lately and I've got a question about the most efficient way to use the Xen particle system given my needs.  I cant remember exactly, but I read somewhere that it is inefficient to have more than 1 instance of ParticleSystem.  I understood why at the time, but it escapes me atm... Anyways, I've got 2 uses in mind here:

1) Visual Effects - Purely aesthetic with many particles, so accuracy isn't important

2) Detecting Particle collisions - Accuracy required but few particles

The solution I have in mind currently is to use invisible objects and my physics engine to do all the collision detection, and just use the particle system to draw the results to screen.  Since accuracy is important, i was thinking about using 2 ParticleSystem instances, one for visual effects run on the GPU, and the other run on the CPU so that the 16bit limitation isn't an issue.

Is this something that would work well and efficiently with ~ 200 particles?  Also, I would need to be able to remove specific particles based on the collisions the Physics engine detects, can individual particles be removed?  I plan to create a set of proxy objects that link the Physics Engine primitive to each particle on creation, but that would only work if they remain in sync.  Do you think that this is a good idea? or should I use another solution?

I've also got a couple questions if you have the time:

The 16-bit accuracy, is it per ParticleSystem, or per Effect?   - Ex. 1 ParticleSystem (GPU), 2 explosions 1000 units apart, each with a radius of 10 units would they draw correctly?  Additionally, is the 16-bit accuracy relative to the emitting position? or the origin (0,0,0)?

BTW, I noticed in a previous post someone asked for source code to the XenLogo tutorial and you said that the source was on an old drive somewhere.  I hope you don't mind but I was curious to how you did it, so I took the liberty of reversing it to source so I could play with it and add it to my game as a splash screen (a simple entry in the credits didn't seem appropriate).  I think your right that it would have just caused more confusion than anything else.  I didn't mention it at the time, but I know exactly how much of a pain it is to go hunting for source code on an old drive, so if you would like a copy of the project I'd be happy to oblige.

 

Amazing system, Thanks!