Advertisement

Destructible terrain

Started by March 06, 2015 07:28 PM
8 comments, last by wodinoneeye 9 years, 8 months ago

Today I found interesting concept of destructible terrain in Crowfall. They say that they want to use "tiny blocks" to build (from video player can also build) or destroy anything. How do you think they want to do it (or maybe they already did)?

For me it looks like quite difficult task. Not only building/destroying but collision. Collision detection between many small blocks and player seems nuts. They probably could rebuild voxels to planes for collision check but I am not sure how efficient it would be - creating simple geometric figures every time player destroys something may get overwhelming in some kind of "castle defense".

PS. Do you think they are being over-ambitious? They have (a lot) more experience than I do but it seems really massive for not that big of a studio. Good luck to them anyway smile.png

Terrain is static, so collision detection can be heavily optimized with various recursive structures.

When they say "tiny blocks" they probably mean Voxels. There are a few voxel-capable engines/games out already, some of which support total destruction/editing. (Wasn't there an EverQuest follow-on supposed to do this, too.)

It is, in general, pretty hard to do right, and the gameplay value has been surprisingly low so far from what I've been able to see. If rockets blast big holes in the ground, very quickly you get only holes in the ground and no good terrain to play on. Apparently, players prefer well-crafted level geometry to crater landscapes...

Regarding studio size: Gordon Walton is a VERY experienced producer. And they are licensing an existing voxel engine: VoxelFarm.
enum Bool { True, False, FileNotFound };
Advertisement

First, did you mean to place this in the multiplayer/networking forum?

Second, I've seen a lot of games with destructible terrain over the years, mostly as concept pieces, indie projects, and WIP that never finish.

Making terrain adjustable is not hard in itself. There are many ways to do that. The hard part is keeping the game fun while also keeping the terrain efficient.

The best fun mechanics I've seen with it are to effectively make regions accessible or inaccessible. Add some dirt to cross the chasm, remove some ground to keep the enemies away. Potentially add some charred ground overlay or sand overlay or rocks overlay.

The least compute-intensive methods for 3D games I've seen are as modifications to a height map terrain. Adding and removing dirt are effectively just painting light or dark on a small texture, and transmitting the changes to the height map takes very little network bandwidth. For 2D the map is tiles, so adding and removing from the grid and sharing it is quite easy.

Adding piles of tiny objects or performing voxel-based processing is going to consume much more processing power, memory power, and network bandwidth, with the problem getting harder when large areas are dramatically changed.

When they say "tiny blocks" they probably mean Voxels. There are a few voxel-capable engines/games out already, some of which support total destruction/editing.

I believe that Crowfall is one of the first customers of Voxel Farm to be announced.

You can find the blog of Voxel Farm's creator here. He goes into a lot of detail about the underlying technologies.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Yes, it seems like they are using Voxel Farm smile.png I made some more research and there are games which use that but they focus on building instead of combat and destruction. Voxel Farm's blog does not go into details about networking nor collision.

First, did you mean to place this in the multiplayer/networking forum?

Shouldn't I? It is an MMO and I am interested how do they handle voxel generated world on the server side.

Terrain is static, so collision detection can be heavily optimized with various recursive structures.

What do you mean by that? From video it seems like you can destroy a mountain or dig your way under the castle.

The least compute-intensive methods for 3D games I've seen are as modifications to a height map terrain. Adding and removing dirt are effectively just painting light or dark on a small texture, and transmitting the changes to the height map takes very little network bandwidth. For 2D the map is tiles, so adding and removing from the grid and sharing it is quite easy.

In video player digs tunnel under castle. It is possible that they allow only for height modification (it is hard to say from footage). Seems like a good way to go about it smile.png

I know title is "Destructible terrain" but they allow to destroy anything - if there is a wall in your way, no problem, cast some spells and create hole in it to let your troops pass. I thought that they use single collision detection method for everything but after your responses I suppose they may use different system for every "object type". For example, terrain may only use its height but structures are handled as mesh which is rebuild after few fireballs. Did I get it right?

What do you mean by that? From video it seems like you can destroy a mountain or dig your way under the castle.


What I means is that, between any two frames, most of the terrain has not changed, so pre-computed information used to accelerate collision queries can be re-used, leading to significnt speed-up. When a certain part of terrain changes, that part may be temporarily treated as dynamic, which makes that little bit slightly less efficient -- or the voxel engine simply re-precomputes the needed data when it changes (but again, this is more work, so a temporary small CPU spike.)

Add enough changing of enough terrain bits all at the same time, and the CPU load is likely to shoot up a lot. Any game design has to make some assumptions about how much of that can happen at a time.

Voxels are not new; there's lots of good research on them. (Also: Minecraft!) Google things like "voxel terrain" or "real-time voxel modification" for a bunch of papers and demos from various research, gaming, and simulation places. In the past, voxels have ended up being useful mostly at edit time, rather than at runtime; perhaps now is the time when runtime voxels will finally work "for real"? (Seems to be what Crowfall is betting.)
enum Bool { True, False, FileNotFound };
Advertisement
For a hobbyist project, you could take a look at PolyVox. The creator of PolyVox has done some terrain destruction stuff. It's not large scale, and to my understanding it doesn't include any functionality for network streaming, but it might at least give you some ideas.

You have made me consider the destructable/deformable terrain as I would see it done in a MMORPG (some day).

One consideration which introduces limitations (which is a good thing to have) is that it (real world) takes immense forces to change large chunks of terrain (ground/buildings etc...). Dirt can absorb alot of energy... Concrete Ditto.

Have an explosion within a building and the weakest points get blown out first (windows/doors), with charring and scarring the other surfaces. So whole sections of 'the terrain' can be excluded from deformation effects quickly (leaving the processing to the bits that can be 'destructed' ).

Most carried weapons just dont impart alot of force (hmm... holes through materials as a 'deformation beyond 'decals') so are not likely to do the damage of your typical 500lb bomb (even when your guns effects are exagerated).

Real tactics then revolve around application of force against the 'weak points' (and even then often requires exact application to do a significant damage effect (like blowing in a door...) -- so an incremental game improvement is to allow destruction/deformation of the weak points in the terrain.

If they did, then standing NEXT to them when you fire can have similar effects on YOU. So range/scaling coarse vs fine detail of the damage done may allow an optimization (if the player never gets close enough to see any fine damage detail, then why compute 'fine' detail...)

Use of 'procedural programming' to generate damage patterns can compress the damage state which needs to be stored longtern (on the fly recreation when needed). Even if on initial immediate deployment to the player causing the destruction (full detail, matching their action's result suficiently) it doesnt mean that that exact state HAS to be shown to someone else later (just enough to indicate the activity took place - a hole is a hole, and one blown up building looks much like another, ESPECIALLY if YOU didnt do it...)

-

Depending on the game (ie- time span in a MMORPG) can the damage 'heal back', eliminating the special irregular 'damage state' data, allowing to go away with time -- saving data space and eventually simplifying the terrain computations in future (incremental and overlapping changes to the base terrain).

--------------------------------------------[size="1"]Ratings are Opinion, not Fact

immense forces to change large chunks of terrain


But... MAGIC! :-)

I think the biggest challenge in persistent destructible terrain would be the balance between "It's too hard to actually change things" and "this level is now a charred wasteland because the first person that got here wrecked it."

Minecraft does it one way.
Call of Duty does it the other :-)
enum Bool { True, False, FileNotFound };

immense forces to change large chunks of terrain


But... MAGIC! :-)

I think the biggest challenge in persistent destructible terrain would be the balance between "It's too hard to actually change things" and "this level is now a charred wasteland because the first person that got here wrecked it."

Minecraft does it one way.
Call of Duty does it the other :-)

Yeah well then less limitations for the 'big magic' - which also reminded me that magicy stuff might also be more 'flowey' with the destructed byproducts and deformable bits not just a kaboom and settle but a continuous set-into-motion kind of thing (ripples in the continuum... whatever) and ontop of the scattered.scrambles original stuff it can be all 'glowey' and oozy as well --- magic (and techno stuff) can get rather weird.

Interacting Overlapping effects make it just that much more complex (in all cases) including the stuff happening ONTOP of players.

--------------------------------------------[size="1"]Ratings are Opinion, not Fact

This topic is closed to new replies.

Advertisement