Sunday, February 10, 2008

Particle System

So I've bitten the bullet and have started work on the particle system. This part of an engine always gives me the horrors, as traditionally it's been a weak spot for me - make no mistake, anything good I may have written in the past has been totally by accident, and I've never been able to reproduce it.

I'd just port in the QMB system (a lot of people seem to like it), but I'm not really a fan of it - the effects are too flashy and overboard, whereas what I'm looking for is something with more of a "Quake"-ey look - not trad-Quake with just dots, but something that looks like it would have been included in Quake if the technology was available at the time.

So far I have my particle texture created and loading successfully (hard-coded in the engine, because this is Quake, after all), selection of individual texture components working, and variable scale and alpha. The really neat thing I'm just after doing is an R_NewParticle function that replaces the free_particles check, and takes particles that are just about to die if there are none free. This has enabled me to reduce the number of particles allocated, as it gives me a fairly good predictive reuse. It's pointfile-aware, of course, but that's the only time MHQuake should ever run out of particles these days.

The real horror comes when I go to tweak the various particle effects to make them look good.

1 comments:

DrLabman said...

But flashy effects is what the masses want!

It should be possible to tone down the effects in the QMB system it was designed with extension and customisation in mind.