Jump to content
  • Advertisement
Sign in to follow this  
mengha

Particle Systems

This topic is 4742 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I haven't written a particle system yet so I thought I'd have ago, but I have a few questions first. A particle would just be a quad or pointsprite (in dx for example) with a texture and blending? It would have properties such as direction, speed, fadeout etc.? You can use the same system for smoke, snow etc.? You just change the texture, direction, speed etc? Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
Yeah, like mikeman said, you pretty much answered your own questions. The only problem with using DX point sprites is that they can't be resized for each particle.

As for the properties, I believe that you'll need:
speed
direction
weight
life
and type

Then I would use a single texture and use type to figure out which part of the texture you need (like a tileset.)

Share this post


Link to post
Share on other sites
Yep, I'd just use a quad [smile].
You might also want to consider making an emitter type (in C++ this would probably be a class) which specifies how the particles are produced (point, cube, cylinder, conical, etc) for an advanced/flexible system.

Share this post


Link to post
Share on other sites
Something to consider for speed would be to keep a list of all currently live particles and instead of rendering them in immediate mode create a vertex array ( assuming that all particles of a particular effect use the same texture ).

Share this post


Link to post
Share on other sites
Or you could just look at these great tutorials for building a particle system, they are a little old, but the basics really haven't changed for particle systems. The first one to look at: The Ocean Spray in your Face This one goes over the basics of a particle system.
The next one builds off of that one and is a little more advanced: Building an Advanced Particle System.

Hope that helped

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!