Is it possible to store terrain data on a server?

Questions & AnswersCategory: ProgramingIs it possible to store terrain data on a server?
F.A.Q asked 8 years ago

I want to store terrain data on a server to make a persistent world. Is it possible?

1 Answers
uTerrains Staff answered 5 years ago

To sync terrain modifications over multiple players, you have to serialize each operations (like digging, etc.) made by some player, send it over the network to all other players, then deserialize it and perform it again so modifications are applied for everyone. Normally, operations are very small in size and are suitable for network.

Serializing and deserializing operations is very simple thanks to these methods of the UltimateOperationsManager:

public string SerializeOperation(IOperation operation)
public IOperation DeserializeOperation(string json)
public string SerializeOperations(List operationList)
public List DeserializeOperations(string json)

Sending serialized data over the network is entirely up to you. Ultimate Terrains does nothing about this.

To store terrain data on a server, you’ll only have to persist operations. This can be done on most databases or even files. This is up to you.