Best way to make singular world with global terrain saving?

This is a theory question, just out of curiosity.
What’d be the best way to have a singular world where physical modifications save globally?

Kinda like a Minecraft server. You join the server, you break some trees and build something, it saves globally. Someone could hop on the server, even when you’re offline, and find what you’ve built.

There are two methods/ideas I can think of for achieving this.
I’m curious as to what other options there are.
I wanna get thoughts from others about this.

Method 1:

  1. Player joins a game hub →
  2. Hub teleports player to specific private server with singular seed->
  3. Private server game saves everything.

Nothing gets overwritten by having multiple servers and everyone plays in the same world.

This has one major drawback; After a certain number of players join the game, the server becomes full.
It’d probably be fine so long as you have under a few hundred active players (which would definitely be enough for a long time!)
image
Apparently Roblox can allow for a crazy number of maximum players. I don’t know how well such high player counts are supported as I’ve never seen a game actually use them to the full potential.
Even then, depending on how resource intensive your game is, performance might become a major issue. This leads me to

Method 2:

Very similar to Method 1 except the entire world is split into multiple places.

  1. Player joins game hub →
  2. Hub teleports player to random Private Server →
  3. Each private server saves everything under that specific server’s seed.
  4. If the player reaches the edge of the world, they get teleported to the adjacent private server.

This would significantly increase max player count and make things a lot easier to manage in terms of performance.

The only problem arises in the unlikely event that hundreds of people want to gather in a single part of the map. If this happens, and you want players to continue in the same part of the map where they left off (similar to Rogue Lineage or Minecraft), you get a conundrum. What if everyone logged off at the same spot during different times of the day, then tried to join at the same time?

There are a few solutions that I can think of to this:

  1. Have a secondary self-imposed max-player count for each private server. When someone logs out, decrease that max-player count. Almost like they never left the server.
    This is a pretty bad idea because someone crazy enough could create a bunch of alts and clog the system.

  2. If a player attempts to join a private server that’s full, teleport them to a another server. This might annoy/confuse the player though.

  3. Keep each private server map relatively small (500-2K studs in length and width)
    This is very viable, and probably the best idea. For reference, the default Roblox baseplate is 512x512 studs.


    That little grey dot is a default Roblox R15 character, 1x4 studs.
    The idea here being if hundreds of people want to gather in the same part of the map, there’d literally be no space. They’d push eachother off the edge and into other private servers.
    This assumes your map is flat enough. If players can move vertically, or tower ontop of eachother, this might not be very effective.

Either way, it’d be pretty rare for hundreds of players to gather in a single area.
A combination of solutions 2 and 3 would probably be sufficient.

Can anyone think of a better method of doing this?
Does anyone know of a game on Roblox with a crazy high number of players in a single world?

1 Like

If you need real-time gameplay for e.g. a PvP action game, my favorite solution is to have each chunk be a separate server and just have a player cap / queue system.


Another idea:

Make the game less real-time. Give every player their own server, and show other players by sending their position via MessagingService. It’s gonna be slow, but that might not matter for some games. E.g. if it’s just to have the social experience of seeing 100s of players around you, it’s fine if their movements are a bit weird.


You could go super complicated and have large chunks split into smaller chunks if there’s a high player density:

Up to 16 players in the same server. Black chunks are the largest size. The rightmost one has only 3 players, so 1 server can handle it.

The other chunk has smaller blue chunks inside. There’s a total of 48 players in the whole black chunk, but each blue chunk is its own server with a max of 16 players.

Except the top left one, which as a total of 17 players. It’s split into even smaller (red) chunks, each with <= 16 players.

You should probably still have a max player cap / minimum chunk size cap, just so you don’t have to wait for a teleport every 10 studs xD

It’s gonna be pretty weird when a 17th player enters a chunk tho. Suddenly all the other 16 players have to teleport to a smaller chunk, which is really bad if it’s in the middle of something fun like a fight.

1 Like

That’s a pretty neat idea.
It reminds me of ForeverHD’s infinite player server system.
This might actually be viable in a slow-paced game, though I don’t know how reliable MessagingService is in making sure the messages arrive.

Also very creative. One problem I see with this idea, besides the interruption of gameplay for relocating resources, is if everyone wants to stand in the same exact spot.


It might be best to split the world into chunks and, if too many people are on the same chunk, have multiple servers for the same chunks. Roblox does this by default.

The only problem I have with this is if I want NPCs to be able to travel across chunks.
If you chase a deer NPC from chunk 1 into chunk 2, but chunk 2 has multiple servers, which server should the deer appear? Should the deer wait for you to teleport before spawning? You might be able to get away with just choosing a random server. I guess the main important thing would be choosing 1 server and not all of them. If you simply spawned a new deer in all the servers, deer would duplicate like crazy by going back and forth through the border of chunks. It shouldn’t matter too much because multiple servers would probably be rare.

This was a pretty big brain dump.

1 Like

DEERSPLOSION!?

Yeah, there’d still be a hard limit

Some other ideas:

Deer are also updated across servers using MessagingService, along with everything else so there’s never two out-of-sync servers for a chunk.

Deer AI knows not to cross into chunks with multiple servers.

1 Like