Hi everyone.
I am new in Colyseus. I am learning to create a simple game.
All players will join only one room - Lobby
Then choose one in other players to invite to dule ( 1 vs 1 game)
If the invited player accepts, other players will see this two players are marked "Duling"
Then this two players will moved to Game screen to dule.
But i have problem in two steps
- How to send message to chosen player?
I am going to use foreach to check all clients in the room with chosen player client ID. But i think it is bad solution. - I don't know one client can connect to many room or not.
Because as i understood, these two players will be moved to Game room that only has 2 players. But i still want to keep their name and status in Lobby screen.
What is best solution?
Thanks you so much.