Jump to content
  • Advertisement
Sign in to follow this  
JPulham

Explosions, Damage and force

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

If you have a missile or grenade etc that explodes, how can I calculate the damage that a player receives, and the force exerted on them? The vector will probably be the same as the player position compaired to the center of the explosion. I think maybe inverse square law? I know the centre and the radius of the explosion. How do other games do it and how can I do this realistically.

Share this post


Link to post
Share on other sites
Advertisement
This question can be as hard as you want it!
There's a good detailed bit on explosive pressure & effects in this book.

Also have to consider whether things are visible to the explosion with (sometimes multiple or 'thick') raycasts.

Otherwise you can tweak & tune it till it looks good without any basis in physics ;)

Share this post


Link to post
Share on other sites
I've no clue what the force should be. But the damage, maybe some initial arbitrarily large value over 4*pi*sqr(dist), where dist is the distance from the origin of the blast. Because the blast spread in all directions with the same speed, it's only natural that the effect at a given distance be related to the surface area of the spherical shockwave. Perhaps you could also somehow relate the force(acceleration) exerted on the player's model thusly.

I don't really know, but I believe having super uberaccurate modeling of an explosion requires stuff way more complicated - computational fluid dynamic grade complicated - , probably more esoteric that's ever really been implemented in game engine.

You'd also need to consider shockwaves reverberating off walls, their energy being dissipated in interjacent objects, etc.

Hope it's enough.

Share this post


Link to post
Share on other sites
This is often solved by rulesystem. Find damage number of explosive, distance from target, modify it by cover of the target, and you are set.

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!