Sign in to follow this  
Nairb

Destructible 3D Environments

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
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

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

Sign in to follow this