I’m building my multiplayer functionality with Lobby Service and Game Server Hosting. I’m not using Matchmaker since Lobby filtering is enough for my use case. Also I’m not using Relay since my game is long-lived and needs a server throughput the game.
Here’s a brief description of my flow:
- A player creates a Lobby with some config (maps, game mode, max players etc)
- Some players join that Lobby
- Lobby is full and the host starts the game
- The host use the REST API to queue an allocation request
- The server is allocated and via the payload I can prepare the game session (on the server)
- The game session is successfully prepared and I set the server ready to accept players (on the server)
- My problem: how can I notify the players in the Lobby from the server?
I’ve tried:
- Update the Lobby via Cloud Code. Server is not authenticated as a player, so not possible - I could authenticated as anonymous, but I don’t like that.
- Join the lobby (as server) and update the Lobby data. Again server is not authenticated as a player, so not possible. Ideally the server should not join as a player.
I do have a game state saved on my backend and I could update that state with server config/allocation ID, and have the client poll the game state, but it feels wrong IMO.
Any advice is valuable.
Thanks!