timotheeg / nestrischamps

A web-based OCR and restreamer system for NES Classic Tetris players
MIT License
45 stars 11 forks source link

Add an autojoin mode #141

Closed timotheeg closed 1 year ago

timotheeg commented 1 year ago

Opening PR to review later

Disconnections are not handled (for now?). When a user disconnect, it could be a network blip, and to make sure the game data flows correctly immediately on reconnection, the player is not cleared.

With some reconnection timeout management, we could imagine that if a player disconnects, his slots is taken by one of the other producer that was waiting pending assignment. User who was waiting the longest gets the spot.

TODOs:

timotheeg commented 1 year ago

Tests locally work, so I will merge this for now.

One concern I have with autojoin is that I haven't implemented a admin-controlled ban or kick function. So if someone who was auto-joined is a troll and you can de-assign them manually, if they stay in the room, they might be assigned again when another player leaves.

The community is so small that's it's not an issue, but I think one of the next thing I will do is add a block-list, so your room can reject auto-assignment for undesirables.