Moving from lobby to game

In the docs I see you guys registering a registerMatch('lobby') for a lobby mode. We want to implement that in our game where after enough players pressed the ‘Ready’ button in that lobby, it creates a match of the actual game.

We know that we can use nk.matchCreate() within the matchLoop of the lobby if enough people are ready, but how do we go about having users in the lobby forwarded to that?

Thanks in advance.

Hi @nick - We’ve just published a new guide that should help here: Nakama: Creating a Lobby System | Heroic Labs Documentation

Give it a read and let us know any further questions.

1 Like

Very helpful indeed. Thanks!

@gabriel the guide is written for TypeScript, but the ‘Joining the match’ part isn’t, and I was wondering if that part is needed in TypeScript at all because the presences get picked up in the matchJoin handler, no?

@nick The guide is separated into server side logic and then corresponding client side logic. The part you’re referring to demonstrates how to join the match from the client side (written using the Unity Client SDK). If you’re using a different client then you can safely disregard these parts or use them as a basis for your own client side code.

1 Like