Answer the question
In order to leave comments, you need to log in
How to make something like a lobby for a mini-game in nodejs?
Create a lobby -> wait until there are 3 players -> Execute the following function...
What would be the best way to implement this?
Only thoughts with global array come into my head :/
Answer the question
In order to leave comments, you need to log in
Well, if mongodb is used, then I would do, for example, a collection was created in it, players were recorded.
And on the function of which it would be necessary to check if the created collection is equal to 3 (because there are 3 players), then the function is executed ..
My opinion, and it may not coincide with your expectations
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question