• Advertisement
Sign in to follow this  

Particle "Engine"

This topic is 1262 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

Hi folks,

 

I have been starting a new hobby project/game just for fun and to try out some new things. Iam writing in C++/OpenGL.

The main thing i wanna try to add to this game is more dynamic/random playstyle.

 

So iam about to start the Particle "Engine" and before i do that i have a couple questions.

 

1. I want it to be using the GPU for update, creating, "deleting" etc, is it gonna work if i want a more dynamic system?

 

2. Do anyone know a good pattern or approach to build a more dynamic kind of particle system?

    Maybe someone already have a good article/tutorial about this?

 

3. How about collisions?

 

Maybe an example of what i have i mind:

The user have a basic spell called "Magic Ball"

The user can then add an element to this basic spell, lets say fire, then this gonna be a "Fire Ball"

Later on the user finds a "Basic hit effect" spell and then add it to this "Fire Ball".

The user can then add some kind of "Hit effect" like, stun, slow, chain lightning etc etc.

 

And i want this on the enemies aswell.

 

I was thinking about some kind of entity-component approach?

 

And sorry for my terrible english :)

 

Thanks!

 

 

 

 

 

 

 

 

    

    

 

 

 

 

Share this post


Link to post
Share on other sites
Advertisement

1. You should be able to do all of what you need using compute shaders.

 

2. A good approach would be to have some common code that all particle systems use, but make a lot of the behavior implemented in separate functions that you can change depending on the behavior of the effect. Don't try to make code for a single particle effect that can handle any situation.

 

3. Compute shaders will be flexible enough to allow you to handle collision. However, you will probably only get good results with either simple shapes like spheres or static geometry.

Edited by HappyCoder

Share this post


Link to post
Share on other sites

For an example (using D3D11, but still useful for you) of this type of particle system, check out the ParticleStorm demo from Hieroglyph3.  That will show you one way to use append/consume buffers and compute shaders to make a particle system.

Share this post


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

  • Advertisement