Terrain self-healing

Terrain self-healing

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Terrain self-healing

Post 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?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Terrain self-healing

Post 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.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: Terrain self-healing

Post 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...
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Terrain self-healing

Post 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.
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Terrain self-healing

Post by Tribulex »

mudmap!
Post Reply

Return to “Feature Requests”