Particles seem to be one of those things I'm destined to eternally struggle with. While debugging something else I happened to notice that my particle batching was almost totally non-existent. This dates back to the original release of 1.8.0, and was a major cause of slowdowns when rocket and grenade explosions went off (and there I was thinking it was dynamic light updates all this time).
Anyway, this is now fully resolved, so I can render thousands of particles on screen with minimal performance impact. I've also added bounding box culling to particle batches so that anything off screen never even gets to the GPU.
I've also resolved issues with use of larger vertex types than were needed for certain objects, so the slight slowdown when drawing MDLs is now removed.
Finally, I'm intending to experiment with use of hardware occlusion queries for nodes and leafs in the world, as a means of assisting Quake's PVS. DirectQ can do the readback part of hardware occlusion queries effectively for free (without needing to stall the pipeline) so this will be a balancing act between whether the overhead of drawing the surfs and issuing a query is acceptable given the gains from not drawing surfs for real.
My feeling is that it will penalise less complex (ID1) maps but will massively accelerate more complex (ne_tower) ones, so on balance it definitely seems worthwhile investing the time. How much it penalises the common case will be the determining factor.
Gameplay is insanely smooth with this version by the way. It really feels as though the engine isn't even running at all. One thing I want to do is decouple the client input from the main game loop which should mean that in most cases you'll get really good gameplay even if you're running slow. DirectInput buffered mode pretty much gives you that, but I'm not using it 100% properly yet as I don't take any account of the timing info it sends. When I get that in place it will rock.
More next time.
Saturday, June 19, 2010
Even more Particles! And other stuff!
Posted by
mhquake
at
12:31 AM
Subscribe to:
Post Comments (Atom)
3 comments:
Oh my.. just when I thought DirectQ couldn't possibly be any smoother :D
Hey MH, when (if!) you ever finish this, you should find the source of the old DOS game Tyrian and rework that! Look up OpenTyrian on the net and you'll find what it's about!
Ok...now is the time to build an altar for mhquake and start worshiping. :D
Post a Comment