I want to create a multiplayer space game with a size of ~ 1.000.000 x 1.000.000 x 1.000.000 km. The most of this world is empty.
To do that I already have a concept:
I divide the world in 20x20x20 km levels. I’m going to create only one empty level(-blueprint) for all levels together. The objects get spawned at the startup of the server. If one level doesn’t contain a object, the level shouldn’t get loaded.
The client should always load the 27 level (3x3x3 level), which are around him (except one of the surrounding levels are not loaded from the server, because they don’t contain a object).
The problem is that I only found two ideas how to do that and they are (I think) not really good:
I create one master server, which can start, stop and change Level-Server. Every Level-Server has his own ID. The player always connect to the master server and transmit the IDs of the needed levels and then get forwarded to the right Level-Servers.
If one object leaves one level and get into another level, it should automatically get removed from the old server and should get add to the new server.
I create one server, which contains all the levels. The players are joining to this server and are transmitting an ID. This ID determine, which level should be loaded on the client pc.
If one of these two ideas are useful, is the other problem that I don’t have a real idea how to program this with a good performance.
Can anyone give me a idea, how I could do this?
I can’t use world composition, because the position variable is only 32 bit and it can’t create such a size…