Skipping ahead

I’ve still not got point sprites working, but I’ve looked into it and it should be possible fairly easily, but I’ve finally made a fountain.

It may not look like much, indeed, it’s not much at all really. It sprays out 1 particle every 5ms with a random spread up to a maximum of 20 degrees. It also has “gravity” acting on it. Although, MPhysicsContext doesn’t allow you to retrieve the world gravity, so I have hard coded that. Everything else is exposed to the editor.

So far, the particle emitter will only create 1,000 particles. I’ve attempted to increase the emitter to 10,000, but it takes a long time, then hangs. Not quite sure why at this point, but that shouldn’t be too much of an issue really.

What’s next for the particle system? There’s still a lot to do. I think, potentially, the next logical step is to actually texture the points, so we can start creating pretty particles. After that, there’s quite a few other things to do, like semi-physics collision between the particles (I see a significant framerate sink here) and also allowing for some more fancy features, like spinning particles.

Which leads me onto the next point. We can’t use point sprites for everything. They will be ideal for displaying a large amount of particles, as they’re cheap, but they don’t allow for things like rotating the sprites. Which means for some particle emitters, we might want to add a flag to draw the particles as tri lists. That would mean we not only have 6 points per particle, but we also have to maintain a separate array for this, possibly create or update it every frame. I am willing to bet that this will have a reasonable performance hit, but we can then also only draw the active particles. Particle emitters which have rotations will probably have to be kept to a smaller amount, but that shouldn’t be too much of an issue. Non-rotating particles can be kept as point sprites.

Anyway, that’s it for now. Now it’s time for lunch. Then probably attempting to texture the particles. Wish me luck?

Leave a Reply

Your email address will not be published. Required fields are marked *