Hi everybody?
Do y know how to create tournaments in colyseus ?
hi @ttcong194 , that's a really generic question, it will all depend on your game logic and the type of tournament you like to create.
In any case there's none recipe for that, I would recommend to check on split matches by rooms (in which you can set a max users limit), and then use a general one to keep track of the general tournament progress (users can be connected to multiple rooms at the same time).
Hope this give you some ideas.
hi @dpastorini, thanks for replying me.
Maybe my question is very not clear. I'm going to describe it in practical example.
I want make a tournament including 8 players. ( Room 1). When each player match to other player, I will send them to other room (Room 2) and it's only 2 player in Room2.
Is it possible for client to join 2 room at same time? And how to keep track the result from Room2 and send back to Room1 in order to update the result for each client and continue create room2 for winners ?
Hi @ttcong194 , ok, point by point:
Is it possible for client to join 2 room at same time?
Yes, clients can join as many rooms as you like.
And how to keep track the result from Room2 and send back to Room1 in order to update the result for each client and continue create room2 for winners ?
There's none direct link between rooms but you can use some work around for the flow you are looking for. For example, one way will be (considering you can connect and disconnect to rooms at will):
client connects to room1 > find a match and connects to play in room 2 (disconnects from room1) > after the match finish (let say the client won), you persist the data somewhere (redis, mysql, whatever) > connects back to room1 > but this time the player data will load the last match result.
This would 1 way, you can find tons others (and some probably better).
Hope this helps!
hi @dpastorini. I see what you said. I'm going to implement follow your idea. thanks a lot.
hi @ttcong194 , I think you could have more options to implement the same game logic, I would recommend to join discord, check with the community what's the better approach, do some tests, etc. :)
@dpastorini if it doesn't bother you. I have one more question. In the case , my game has functionality such as add friend and challenge them to compete. How I know their status. (online or not).