Page 1 of 1

Terrain self-healing

Posted: 02 Feb 2010, 20:25
by Caydr
I just thought of this, I'm not sure if it would lead anywhere. It would probably be expensive and potentially break some things, but hypothetically could craters gradually return to the original ground state?

I mean, very gradually, like over the course of 15 minutes the effects of a... um... ... so, I guess everything's relative, I can't say "a goliath exploding" since it will deform different map hardness levels differently... Umm....

Maybe something like, for every 60 seconds that a terrain vertex is out of position, it gradually moves 1 elevation unit back to its original location? This could be also a map/mod-side toggle.

From my very limited understanding, I think weapon hits are synced. If this is true, it means craters are synced, which means that there would be no increase in bandwidth requirement - everyone's computer would simultaneously figure out where the terrain is and where it needs to be, without needing to communicate with other players about this.

What would the implications be? Would it bring gameplay and/or long-term performance benefits? Would it be a lot of work to code?

Re: Terrain self-healing

Posted: 02 Feb 2010, 20:36
by Pxtl
Every time you deform terrain, a bunch of stuff has to be done - pathfinding, etc. Iirc, the best approach is to do it in jumps. The cost would not be in bandwidth, but on the processor.

Either way, this would not be an engine feature, you'd want to do it as a gadget.

Re: Terrain self-healing

Posted: 02 Feb 2010, 20:41
by Master-Athmos
Yeah just use Lua to either do terraforming like CA does or if there's no way to get the needed "default" height of the terrain do invisible fake units that use the restore ability now and then to relevel the terrain...

Reflattening in the end doesn't eat more performance than the deformation did in the first place - recalculating the pathfinding info probably is one of the most computing intensive tasks in Spring though...

You also should keep your buildings in mind: If you do an overall releveling of the map the ground below your buildings will be readjusted too leading to nasty effects...

Re: Terrain self-healing

Posted: 02 Feb 2010, 23:14
by Google_Frog
If you split the map into 60 sections to stagger the load you should be able to do any heightmap changing you like within the area.

Re: Terrain self-healing

Posted: 05 Feb 2010, 19:51
by Tribulex
mudmap!