As a developer, it is hard to make sure players have minimal latency when designing a game that works with a finite number of fixed game servers, since I cannot ensure the reserved servers run in a specific region in the world, nor view a server’s current region.
I’m developing a survival game much like the currently popular survival games, Rust and Ark. Those games, along with many others, allow users to select from a list of available servers with persistent worlds. I want to do the same. I’d like to allow players to be able to select servers closer to them so that they can play on an even field with everyone else.
This isn’t a issue with most games because server allocation dynamically happens and is controlled by Roblox. However, the TeleportService’s :ReserveServer() method allows the game developer to take control of server allocation. I’m planning on making large servers whose JobId and seed will be stored in the game’s datastore. They will be semi-permanent and last for roughly two weeks before the JobId is released and all player data purged. Player’s wont create these servers, but but able to select from a list of available servers from the start place. I will manually call :ReserveServer() to suit the game’s changing and dynamic needs.
If Roblox were able to implement this feature, it would improve player experiences in these specific kinds of games, by allowing players to be sent to or select servers closer to them, greatly reducing their ping by up to half of a second for connections around the world.
This is something that I’d love to have control over, especially since the only way to start a server in a region is by the initial first player joining it. That becomes really inconvenient if you want to have servers created ahead of time, which is what I am trying to do for my game at the moment.
I recall seeing a post by an engineer stating that reserved servers don’t actually persist when there aren’t any players in it, and shut down like they would normally, so the stored JobId could actually become invalid after some time. Have you already tested this feature by leaving the server without any players for some time?
just a little question when the server region is set ? when the first player joins and then the server will be near to him ? if then a “way” to reserve server for a region would be first teleport a player that is in the region and then teleport others.But that way is too much hard and will consume too much request instead of a parameter…
I already explained it here, you can see it if you want.
TL;DR:
When you call :ReserveServer() you are not starting a server instance as such, you are making a new identifier for a private server, of reserved type. It gets started once you teleport somebody inside it. Therefore, it will use the first player region.
^ This is the reason why :ReserveServer() doesn’t return a JobId!!! So it wouldn’t make any sense to add a parameter for a region inside of it.
Finally, to get a region system where you can choose servers from a region, you can simply use MessagingService to communicate with running server instances and see the latency they have or their region. You could add this to your matchmaking system and add set of rules… (@fouroul94 maybe this is what that game you mentioned uses)
This is a must-have feature for persistent worlds. I want to make a game where you can claim claim a procedurally generated planets and build on them (each is its own server instance), but I don’t want you to log in to your planet and have 300 ping because some guy from across the world was visiting before you logged on. Being able to tie the claim to a server region is needed for these types of games.
There are cases where a certain region doesn’t exist. Sure, you could teleport them to a new one. But what if they want to join the server they last played in(because they have their original loot there or whatever)? Now that server has a different region and the player has 300 ping on that server, not enjoyable…
Some types of games store the data in a specific. For example you built a house in that server, you would want to join back into that same server.
Regarding the server region suddenly changing. The server region switching would happen when the server shuts down(has 0 players, etc) and a new player joins which would potentially change the server’s region.
No successful game does that at all (rust is an example).
Games don’t rely on running server instances (RAM, as an example) for saving things, they just save that data and get it back when booting.
No running server instance changes region, what you are implying is a server instance shuts down and another one belonging to the same server starts running again.
Please read this post if you’d like to differentiate between servers and server instances.
Now, for everyone inside this topic, to do a very simple matchmaking system that compares region and skill, you’d just need to use messaging service to get all the running server instances, each with their region and “skill”. Just teleport the player to the most suitable server, after all, why adding custom region server instances when they’re going to need one player to be running after all?