Best way of having a "hub" then teleport to different game modes system

I’m thinking of trying to make a “hub world” where players join. Once they join they can go through a server list and join a server that fits them or they can click play and the server will automatically find a server for them. How would I handle this? Would storing all the server data in an external server be better or use Roblox DataStores?

2 Likes

I would say use DataStores… It shouldn’t be too heavy of a request… Basically keep a DataStore table for servers and each server can add its own JobId (game.JobId) and then the lobby (every 3 seconds maybe) goes through all of the entries and updates the server list. You can also keep some information about the servers as well such as number of players, gamemode, etc.

Also make sure you update at a rate that won’t overload the rate limit… I’d suggest reading up on how the rate limit works and making your lobby update as fast as possible so that players don’t try to join dead servers

1 Like

If you’re trying to make a hub world with game modes and servers for that, I’d go for an external service personally. Data Stores seems like a bit of an awkward way to be doing this, especially depending on your traffic and use case of such Data Stores.

Be sure to have a look at TeleportService’s members - that may be of help to you.

Though: If you just intend to have a hub world and then subplaces, can you not just teleport people straight and let Roblox handle server joining by itself? Seems like you’re putting in a lot of effort for something simple. More information would be handy.

3 Likes

I actually just made a system like this, here. I started using DataStores but decided to change it all over to my external servers. The main advantage of a real database is the ability to send queries, not just retrieve data. And yes, there is a BIG difference between those two! I can perform queries like ask the database how much play time in player hours each server has, or the average player session length per server. I can also easily ask it what servers are public vs private or what servers a specific player has access too. I can also make stored procedures that rarely ever have bugs with them due to the nature and strictness of the language and execute very, very fast. All of this can be done without having to transfer large amounts of the database to my game and compute it all in much slower and more error prone Lua.

3 Likes

Yea, External services are way better than using DataStores. I’ve switched my system to use TeleportService and an External Database.

2 Likes