H
H
Hanry6542020-08-08 12:32:28
Node.js
Hanry654, 2020-08-08 12:32:28

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

1 answer(s)
E
ExeneS, 2020-08-12
@Hanry654

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 question

Ask a Question

731 491 924 answers to any question