how to create explosions consuming limited resourc

Blitz3D Forums/Blitz3D Programming/how to create explosions consuming limited resourc

Santiworld(Posted 2010) [#1]
hello, I'm doing a strategy game, which should appear many explosions, eh noticed that using sprites much lower game performance.

There are other options to make explosions?

the style of play is like command and conquer


Oiduts Studios(Posted 2010) [#2]
You could get particle candy, www.x-pressive.com/ParticleCandy/index.html


Ross C(Posted 2010) [#3]
Yeah, i would recommend it too. It uses a single surface type system, building particles out of quads (2 triangles joined to form a square type shape). Since these quads all appear on the same surface, they are much faster to draw large quantities.

Another thing you maybe should watch, is the size of the particles on screen. Drawing big alphaed sprite/particles/anything, and overlapping lots of them, will cause alot of slowdown, under most circumstances, so avoid doing that at all costs :)


Santiworld(Posted 2010) [#4]
thanks...
the SpriteCandy demo is impresive!

Sprite Candy is fully compatible with fastlibs ?
use spritecandy is 100% stable? or have some disadvantage?


Kryzon(Posted 2010) [#5]
I think it's just me, but I'd love to build my own single-surface system. Makes it feel more like your own work (and the single-surface experience you acquire will certainly be useful to develop other SSfc systems).

That way, you can "pre-compile" effects and know where each particle should be, at a given time and FPS (instead of calculating everything real-time, using more CPU - although it's smoother, none the less). Kinda like MD2s work.

With that in mind, you'd also only update your particle mesh if it's entirely in the screen: it's the "frame counter" that should always be kept moving, so that when the effect gets visible again, it'll be at the appropriate frame instead of resuming from the last time it went off-screen, get it?