Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Particles, now with gravity and resting states :D

Sign in to follow this  



Spent the evening trying to improve things generally.

I fixed up the firing by adding some precalculations to start up and adding a quick add/remove for collision geometry.

I then tested it with gravity on and noticed things started to suck very quickly. The reason being as things settled the long life caused the arbitrators to go insane.

So, I reduced the contacts per frame and enabled the auto-sleep, which as you can see from the video kills resting particles quickly. The downside is that sometimes you get the odd particle which doesn't start life fast enough and ends up staying still so.. year.. work in progress.

The video in question shows 10 emitters, in groups of two, firing out 6 particles each. One emitter in each group is paying attention to gravity, the other isn't which gives a nice effect.

The second half of the video shows them being fired twice, which causes a slight framerate hit as they settle due to the number of collisions going on.

A few things could probably still be improved, such as the sleep controller which goes over all the elements just skipping ones which are sleep; might be faster to maintain a second list and kill things from there as required.

That's for another day however, now I need some sleep [grin]
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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!