Am I misusing Lobbies? Server Browser / Lobbies with same lifetime as game session
-
Hey! I just wanted to double-check that I'm going about Lobbies the right way.
In my game, a user will either select from a list of pre-existing Lobbies/Servers created by other users, or create their own. The server browser is populated by
GetLobbyInstances
.Due to the nature of the game, these servers have no "ready/start/end" phases as the documentation seems to expect. The game is not a survival crafting game (or anywhere near that complex), but I think the analogy fits. Anyone can pop in or out at any time, and a solo player can, in theory, "play" until other people join.
Right now, I'm using Lobbies as a mechanism to make these servers discoverable. They're set to "Allow join in progress", and players are readied up the instant they enter the server.
As I'm setting this up, I notice that the "ROOM_READY" event doesn't serve up any information about the users who are in the lobby. This is far from an unsolvable problem (serve this info to the user once they connect), but it's just one more thing, on top of the phrasing of a lot of the documentation that I've read, that makes me second guess whether using the Lobby system as a "server browser" for games is going to bite me somewhere down the line.
Searching
"brainCloud" "server browser"
on Google only turns up one result - soon to be two! - so a thumbs up or thumbs down on my current approach would be greatly appreciated! -
Hi @PJ ,
Your usage of lobbies is exactly why we added the concept of long-lived lobbies. (Admittedly it wasn't part of the original use case - which is probably why some of the documentation doesn't seem to properly reflect that usage <-- we'll review that).
So - needless to say - keep going as you are - and reach out if you hit issues!
Happy coding!
Paul.
-