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

More destruction

Sign in to follow this  


When I left you last time, I was busy trying to tidy up some temporary test code I was using in my particle system so I could extend it to do some fancier stuff. The truth is though, that I'm finding it hard to cleanup the last few bits of the particle system framework. I've still not found a clean way to handle new particle initialisation (e.g. so you can set an initial position, velocity, colour, energy, etc) in a flexible way, and, I need to think some more about how to safely delete game objects from inside the game update loop. To avoid having to deal with any of that, I decided to work on the explosions a little more.

I swapped the basic spherical particle sprite (for some grass of all things!) to give the fire more texture. I added some particle rotation, to give the flame bursts a rolling effect. And I added some black smoke around the bottom. On my Dad's advice, I also added some lift, so the flame plume rises into a red afterburn which I quite like. Finally, I put in a quick-and-dirty physics force model.

Here's a wee moovie of the lastest explosions - this time a slightly larger and more destructive one. As usual, click the picture for the moovie.



Sign in to follow this  


Recommended Comments

My sentiments exactly, really good looking. Did you write the physics engine yourself, or is it (based off) an existing library?


Share this comment

Link to comment
Thanks kindly for the encouraging comments =)

The physics is some stuff I wrote myself - but the solver works in a similar way to ODE (a bunch of 6th order LCP equations with an SOR solver). It does include some stuff that makes it a little more game friendly (like axis locking so your character doesn't keep falling over, and aggressive auto-sleep), but other than that it's nothing magic. I was actually really impressed with the true-axis physics engine - I'm hoping to go back and try and get mine as stable as that one at some point.

The explosion itself is currently just a single impulse. It's a side-effect of the physics solver which makes the whole block explode over time (if you step through the video frame by frame, you can see the physics letting things intersect and then trying to correct it).

As for youtube ... I've actually never tried it. I take it the movie above doesn't work for you?

Share this comment

Link to comment

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!