Frequent cross-server messaging

I am in the process of making a chess game and one feature I would love to add is cross-server games so you can just queue and play anyone in any server.

I’ve had a few ideas for this:
Originally, I considered using Messaging Service to create a unique topic per game and sent a message every time a player moves, but I’ve decided against this because it is unreliable and the limits are low.

I am now considering using Memory Stores, where I would update a unique key in the memory store whenever a player makes a move, and do checks around every second on the server to get these updated keys. However this still seems like it could exceed the memory store limits and checking every second could be bad if the players are in a tight time battle at the end of a chess game.

I’m just wondering if anyone has any ideas for which I could achieve this goal, or if it just is not possible on Roblox at the moment.

1 Like

One thing you could do (and it is something that I’m actually doing in my game for creating minigames) is the following:
Players from all servers get in a queue. When you make a pair of players, teleport them to a Private Server (no one without a key can enter this server). When match is finished, save results in DataStore and teleport players back to their previous servers.

Links that helped me and might help you:

Hope this can help you


That could work and is definitely an option, thank you!! Although it would be awesome if one day it was possible to stay in their servers. Because all that would need to be replicated is the players moves, which could be represented by the cell they moved from and the cell they moved to and be a maximum of 2-4 characters long.

This way their friends in their server could watch the match and still interact with them.

I think I’ll just do this for now. Thank you for the idea!!

1 Like

What if the original server they were in fills up while they were away playing a game? Is there a way to account for this or would they just have to be teleported to a different server?

Good that you mentioned that. I didn’t find a way to bypass these cases. For now I just try to teleport them to any active server. Also, if there’s no server left or all servers are full I just kick these players and ask them to reenter the game since I didn’t find a way to create a public server by script, unfortunately. :frowning:

Hope Roblox could implement something in this manner in the future, like preventing servers to get full or allowing server to exceed these limits with server permission.

1 Like

You can actually do that, but it would just ruin other people that are trying to join UX.
You can actually store how many people are in game from that server and if somebody is trying to join to that “lobby” server you can just teleport them elsewhere.