Open World chunk based map issue

Hello,
I am currently preparing for a future project and at the moment have one issue that I can’t seem to understand how to solve.

So my game is going to be open world survival game. The map will not be procedurally generated nor infinite, but rather manually made by me. Regardless the entire map will be split into multiple 512x512 tile terrain chunks. And depending on the player position chunks around the player will get unloaded and loaded.

As my game will be multiplayer each player will unload and load chunks around them, so if players will be really far from each other then the chunk that the other players are on will be unloaded, so how will this work?

I made this example picture, illustrating the problem and giving some additional context. I hope this all make sense.

On the client you can just unload chunks and remove all gameobjects that were in those chunks, the server should according to your location only send you updates about objects in the relevant chunks and don’t send you updates about unloaded chunks.

On the server you will have to load all chunks that players have loaded, so if 2 players are on the other side of the map you still need to load both chunks on the server, but you only send updates to the player about the chunks they are interested in.

1 Like

Oh so, the client will only load relevant chunks, so those four chunks for example, but the server needs to load all chunks that each client has loaded? But if there would be let’s say 50 players all in different areas, so almost the entire map would be loaded on the server, wouldn’t that cause any performance issues?

If your map is the size of PUBG for example then it will work, if you then get bigger than that you can use the same network strategies that MMO’s use.

I plan to make it much bigger than PUBG map. It will grow over time as I will keep updating the map with updates. But it will be a pretty huge map. May I ask what are the MMO’s network strategies and how can I use them with Mirror? In the description it states that Mirror can be used for large MMO type games. Or should I use some other networking libraries?

1 Like