Jump to content
  • Advertisement
Sign in to follow this  
Nairb

Destructible 3D Environments

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

My current game idea is a cross between Worms, Smash Brothers, and Soldat - basically four people running around, blowing out holes in the environment so they can knock enemies through them, sending opponents plummeting to their death. The environment is 2.5D (3D geometry, but all the action takes place on a 2D plane). To facilitate this, I've been tossing around ideas for fully destructible environments ala Worms. Here's what I've got so far: The world is descretized into a series of cells, where each cell can contain a 0 (empty) or 1 (wall). When constructing the initial geometry, we look at each wall and the cells around it to determine if it's a corner piece, a flat plane, or a filled in block. Construct triangles as appropriate. However, even with a modestly sized map (512x512), it's prohibitive to recreate the VBO each frame in response to destruction. So we break this up into, say, 16x16 chunks. Each frame, analyze which chunks are 'dirty' as the result of explosions, and only recreate those chunks. Obviously, the final numbers are tweakable, but that's the general gist. So my question: any problems/pitfalls you guys can see? Has anyone done anything similar? I'm slightly concerned about the collision detection getting messy, but I'm hoping it won't be a huge issue. Any tips you have laying around would be handy. Cheers, --Brian

Share this post


Link to post
Share on other sites
Advertisement
The system you describe is almost exactly what I have implemented in my game engine (check out the link in my signature). It works well - I have environmnts of 512x12x512 voxels (cells) running nicely, though I'm limited to smaller environments if I include physics (at least until I have a better LOD system).

Check it out, and let me know if you have any questions.

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!