Servers, Places, and Chat

I’m creating a roleplaying game with a gigantically large amount of areas to explore and a lot of things to do. Because of that, I’m starting to reach the question of what I should do for lag. I looked into it and I was thinking that using multiple Places may be my best bet.

I’m not exactly familiar with how Places and servers interact and have a few questions if anyone is able to elaborate:

  1. On the Game, does 1 server encapsulate every Place within it? Or is each Place going to have its own server? If so, is there any way that you can tie one instance of a Game into one server among places (Or at least replicate this)?
  2. Is it possible to use this method to have a Chat service that connects between the Places in one server? Meaning if I were to be a player at one Place in the server and I travel to another, can I still have chat synced with those from the Start Place I came from?

I know that you can have Server messages broadcast to every server, but I’m looking to just have communication between the people who all started on the same server instance of the Start Place.

I’m not really asking for code here (Though help getting started would be appreciated for sure), I’m just curious about how this all functions. Thanks.

Edit:
To further explain what I’m actually trying to do here:

My goal is to understand how in a Game I could send players to another Place within it and not lose their spot in the server from the original Start Place. If I’m on the game with a friend and we travel to another area (Another Place), how can I make sure that we both end up in the same server for that Place? And can I connect chat through the Places if possible? (Though this one’s not as important to me as the rest.)

I can answer part of number 1 for you. Take MeepCity for example. I believe it uses different Places to travel to the Neighborhood and Plaza. If you and your friend travel to the Neighborhood then the chances of you and your friend getting in the same server is entirely luck-based. So I think each Place has its own server. Let’s use another example: Camping. We know that the chances of teleporting to the same server as your friend is not up to you, but what if it is? In Camping, when you hop into the same truck as your friend, you will be teleported to the same server of the new Place. This is possible by gathering all of the players in the truck and using TeleportAsync to teleport them to either a different place, specific server, or a reserved server. I hope this answers part of your question.

1 Like

I see… That helps a lot. My goal would be to create something far more akin to Camping, especially given my plans for another project that involves creating small lobbies of 2-4 players from a large hub one. I wasn’t aware that you could reserve specific servers and even reserve them. Do you know if the Dev Wiki covers the differences between servers and reserved servers well? I feel like I’m always dragged to the forum instead because the documentation is often not as robust in explanation as I’d hope.

I really appreciate your help and the quick response on this!

1 Like

https://create.roblox.com/docs/reference/engine/classes/TeleportService#ReserveServer
Part of this tells you, but this is what it says word-for-word:

  • They can only be accessed using TeleportService:TeleportToPrivateServer(), with the access code ReserveServer returns

  • A game server is started when the access code is first used

  • Access codes remain valid indefinitely, meaning reserved servers can still be joined if no game server is running (in this case a new game server will be started)
    I don’t think number 1 is true because they say that TeleportAsync can teleport players to a reserved server on the TeleportAsync section.

Interesting… So I wonder then if the way to do it in this instance would be to reserve a Private Server for each place within the game meant exclusively for the players who joined the same initial server and use that. It may not be that deep though, and I could alternatively just create a system that allows you to “group up” with others before you travel. Not sure what would be best, though the latter seems far easier. I think for a roleplaying game, that may be all that’s necessary. For my other upcoming project, I may have to do it differently but I think I can probably figure it out.

Thanks again for your help! Seriously appreciate it.

1 Like

You’re welcome! One more thing I found when I was scrolling through the documentation was an article called Teleporting Between Places. Haven’t looked at it yet, but I thought this might have interested you, so I decided to share it with you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.