Error with rooms and timer

#1

Hello. Who can help me.
I have a multiplayer game.
When a room of more than three people creates a room and the game begins. Then 3 people come into the game again and one more game begins, but only in another room. And in the room at number 0 the timer stops, and in the room at number 1 everything works. If 3 more people enter the game, the timer will stop in all rooms except the room at number 2
Please help me
I’ll pay for good work
Source code - https://github.com/QiongrongJiang/fishscape
Video Bag - https://drive.google.com/file/d/1naWk15Ms06ptWu20gBEbE_ZpRgG286KO/view?usp=sharing

#2

Hello @goboju,
I just saw here https://github.com/QiongrongJiang/fishscape/blob/master/lib/server.js#L107,
on your code you have 1 interval, like user’s array you will also need to have a timer’s array, and every time you need create a new interval for your games for start.

This means every room needs their own interval :slight_smile:

#3

Thank you , i make it))

#4

No problem it’s work please let me know,
It’s also the same for if you have any control on your server side, you need to create everything room based :slight_smile: