🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Particle System Screenshots + Videos + Code

Published February 12, 2006
Advertisement
Yay particle systems are fun...I havn't got to do one of these in a while. In addition to fixing all of the bugs/problems found in my recent multiplayer test, I'm adding a particle system into the game :-)

I'm going to post the code to the whole thing further down, you should be able to just drop the CParticleSystem class into whatever you want, if you're interested in using it. You'd just have to change my SpawnSprite function to however you display billboarded sprites.

Right now I've got support for 7 different particles/effects as follows: bullet casings, generic particles, basic explosions, fire, smoke, blood, etc.

I made 2 videos of the particle system, if you wanna check them out here are the links, any feedback would be appreciated....

//Videos are encoded in MPEG4
//Empty field test, 8MB
http://www.radioactive-software.com/gangwar/particle_screenshots/ParticleTest.avi

//In-game test, 12MB
http://www.radioactive-software.com/gangwar/particle_screenshots/City_Particle.avi

Preview images:
//Screenshot from City_Particle.avi
//I'm not happy with the way the smoke is blending with the ground, anybody have ideas about how to fix that?? I can't just disable Z-testing.
//Maybe I could put a AABB around each particle and use that for collision detection, seems like overkill though.


//Another screenshot from City_Particle.avi


//Yea, I'm dead.


//View from up high


//Progressive screenshots of the "death beacon" that appears whenever a gang member dies, a beacon of that gang's color, emmits from their position.
//You can see it in motion in City_Particle.avi.


Here's the code to the particle system as in those videos/screenshots....hopefully somebody might get some use out of this, though it's pretty simple/straightforward. I spent a few hours typing, and a few hours tweaking the parms to get the different effects.

Notice there is no frustum culling on the particles. I do the culling on a particle emmitter basis, it's much more efficient that way. Since I'm already testing the visibility of any object/area that can emit a particle.

Finally here are some screenshots of each specific effect, taken from Particle_Test.avi I've still got a lot of work to do on the Explosion effect, it looks a lot better in motion/the video, as does the blood.

Code taken out because i'm tured of trying to get it to appear correctly.  I think there's something wrong with the 'Edit post' option on the journal also....I've had to delete/post this entry 2-3 times now, because I couldn't edit it, and the tags were screwed up, plus there's no "Preview" option with the journal :-(


Fire

Early explosion (looks a lot better in motion)

Blood


Generic white particles (to show unit healing maybe?)

Shell casings imposters

Smoke


Other than that, the game is coming along well I'm working on the gameplay/multiplayer aspects as well....it's starting to come together.

- Dan
0 likes 1 comments

Comments

dgreen02
j
February 12, 2006 12:08 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement