Jump to content

Land Regeneration and building degradation


Zather

Recommended Posts

This is actually really important, so you may already have a plan for it, but if not, it is an important thing to consider.

 

after the game has been running for years the terrain will be chewed up with tunnels and ditches, and buildings abandoned no longer used will scatter the landscape.

It happens in every game like this that is a persistent world, and it is easy to handled, but rarely is handled other then with server resets, that  always get someone upset.

 

Also since worlds are algo generated, the size of the change file on top of the generated terrain will continue to grow to 'difficult to layer over' algo generation sizes.

 

All that has to happen is for each change to the environment to have a durability, and stamp of last time it was maintained.

For tree squares, and ditch squares it is easy, any 'changed terrain' next to algo terrain(unchanged) begins to change back.  Different for each type, sand faster then soil, soil faster then rock.  And trees grow back.  All you have to do is look at the time stamp of the change voxel that shows its date of change or last maintenance, and if it is next to a unchanged square and every x amount of time move its durability.  As durability goes down, land gets smoothed, when it reaches 0 durability the change to that voxel is removed.  The removal happens from unchanged territory towards changed territory, so it is like the original land organically grows back over time (and is realistic actually)

 

This means that if a person digs a tunnel, 1 voxel wide, it will go away say in 2 days, unless they add to the voxel a 'support item'  (made from wood and/or rock/cement, giving reason for those items.)

so if someone is tunneling to get dirt, or to get to some location they won't return to, they don't care about keeping it open, and they don't spend the time to reinforce tunnel, and it closes, if they have it as an entrance to a base, they must put up timber or masonary walls to support a tunnel, and easy crafting item, but some extra work.  This is so you don't have ditches everywhere, if they put a frame in the ditch it stays open, and actually looks nicer with a texture that covers walls, then the ditch or tunnel wont shrink in as fast because it won't be sand time, or soil regeneration time, it will be frame supported sand regeneration time.

 

It is really easy to do, simply remove changes, if they reach durability 0, and paint them with different texture if they at 75 50 or 25. 

 

The time scale to revert back is design decision, but it will keep the terrain looking good, and keep weird stacks of sand from littering the landscape.

 

Also any player made structure should require a maintenance bot machine that uses fuel, and can be connected to fuel tanks.  The base bot would be a unit that covers some area dimensions.  A tunnel version would also exist that would be put in an alcove.   (animation would be optional)  Device would report areas it keeps up to date, and fuel cost based on number of items in the area.

As long as a player wants to provide fuel, the repair bot keeps his base from deteriorating, but if he doesn't fuel it, pieces start to deteriorate, when they reach 0 they disappear.

that gives both a resource sink, and makes it so that players that move on to other locations on other planets don't leave hundreds of buildings unused across the landscape,

and if they want to use some building they have to at least supply it with fuel, a low cost but basically gives player the decision to keep or let decay a building.

 

It really solves the clutter that will have to happen when thousands of players for years are digging up terrain, or if some group decides to cut down every tree in some area or dig up every beach.

 

without this mechanism, one days game play of a beach digger can remove the landscape beauty for years, and that is not balanced, and is why you see many games reset there servers.  This method puts the reset into a simple algo that is checked a few times a day, and changes the terrain automatically simply by running through the changed terrain file and modifing a value, or removing the changed terrain making the voxel have its original algo determined look.

 

Change removal would be put on a que, and would only occur when no players are within a certain distance, there is no rush, it is not time critical, and could even be a simple worker thread, since if it reverts an hour late because someone around there thats fine, but if it is that close, the walls would show it with cracks and discoloration, and same with sand or soil walls in tunnel, the texture at 25% would have large cracks in it.  The mechanism to remove a change is to both remove the previous item from the 'change file for an area' and the notification to be a 'change' order that is also removed, as an add of a new change object that does exactly that, so it removes it from client, when downloaded, and is not added in next time server updates the area for client.   That should make sense.

 

The selection of the texture based on durability would be client side.

 

This should make sense, and it really is much benefit for a little added mechanism.

 

Just thought I would share the idea after seeing so many persistent MMOs with large areas that looked great for three months that were ridiculous when they needed to continue to build a client base going into 6 months and a year since release.   If you add change to terrain, there has to be a slow change back mechanism, and persistent MMOs been missing that part for years.

 

 

Link to comment
Share on other sites

to further clarify, there are two types of changes, removal leaving void space, and adding an item.

Void space is checked first, but if an item is added into the void space the void space is ignored.

 

Three cases

 

1. Person removes sand - this case there is a void space.  if it is next to unchanged original item it will fill back in, if a change occurs to this voxel later in the change file, it is considered type 3.

2. Person adds wall on top of unchanged terrain - this case the item deteriorates if not maintained, and will disappear, and occurs for all placed items.

3. Person removes sand, adds wall piece. - this case the item will eventually disappear, and that will put a void space on change log, and then it will get a new time stamp, and will lead to a option 1 event.

 

the way to do that programmable is a simple worker thread that looks at chunks of terrain, does a once pass over change file during idle time (it has all day to do all the chunks) then goes back over the area and decides if it is 1,2,3, durability is then moved.

Then repair bots in that chunk goes over the same chunk file and resets squares in its range and resets durability of any changed tile in its area.

Any item with durability of 0 is put on a removal list.

That list is iterated every 20 minutes or so, if somebody near, skip item, and it will check it 20 minutes later.

If it is allowed to be removed at that time, or filled in, an action just like a player action is done with one exception, that action has a flag saying it is a rollback and links to item it rolls back.. (a simple list of all rollbacks keyed to what they roll back achieves that)

then the final step, after rollback has occurred on clients by the reversal event, is for both the rollback and original change to be removed from server, by using the list of rollbacks and will no longer be sent out to clients when they update change list next request for area changes.. 

 

The need of update time stamp for that area for clients can also set back to the time of item removed, to make sure older change gets removed, however even if it isn't the rollback will always reverse the change until that file is updated that has neither the rollback nor the change.  

 

If you want you could log all the rollbacks and changes to some file for debuging if ever needed while implementing.

 

This should help understand the process, since it really is not that difficult to implement but adds much to the consistency of the environment for original players and players that join later in the game life cycle.

Link to comment
Share on other sites

  • 4 weeks later...

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
×
×
  • Create New...