Closed rdedhia closed 9 years ago
The specific problem case described no longer occurs. However, when two people start games for the same song, and another person joins, they are connected to both games, which needs to be addressed.
Addressed by most recent commit. Now there are multiple rooms for each song, and when you join, you are only connected to one game. Implementation uses two objects in app.js, might be better done using a database if the number of rooms gets sufficiently large.
There's some issues with the way sockets are handled when you start a new game vs join an existing game. Part of this is because I don't know how to set the order of the call to the database for song data versus the socket call to join a room. Because async bullshit.
One specific problem case is when you start a game in for a song, and another person also starts a game for that song. The first person who started the song will think the other user has connected and is good to play, while the 2nd user doesn't. Could probably be addressed by adding another socket function.