rvanderheyde / Oband

Online Rockband like game. Final Project for OLIN.js
0 stars 0 forks source link

Socket Disconnects #13

Open rdedhia opened 9 years ago

rdedhia commented 9 years ago

Sockets can trigger an event when a user disconnects, and notify other clients of the event. But we run into the problem that we rely on socket rooms, which are not automatically notified of which user disconnected.

The solution to this might be rewriting our 'API' such that a room stores user IDs, or such that user IDs store rooms in some type of object. This would allow other members in a socket room to know if someone has disconnected, and if the game is over or obsolete as a result.

I also have to think about what to do in the case that someone disconnects right before the game is going to start.