Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Votes are inconsistent when multiple games are run concurrently #8

Open
xtagon opened this issue Sep 18, 2021 · 1 comment
Open

Votes are inconsistent when multiple games are run concurrently #8

xtagon opened this issue Sep 18, 2021 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@xtagon
Copy link
Owner

xtagon commented Sep 18, 2021

ChatSnek was originally designed to run a single game at a time, for live streaming purposes. Because of this, it keeps only a single tally of votes per turn, not per game. This is fine when only one game is running, but it's possible to start multiple games before the one finishes, for example by reloading the browser or changing the scene when streaming.

  1. When that happens, the problem occurs where the votes will be reset after one of the game's turns, and the next game's tally will be empty, but if that game with the empty tally is the current one on the screen, that means the voting isn't working.

  2. ChatSnek's chat messages are enabled during that scenario, it could print double messages to the chat, one per game per turn.

  3. Ever since adding a "move safety" feature to ChatSnek, the games will run on their own even if the stream element has been reset or closed, or if nobody is voting, so it's not enough to just wait for the duplicate games to end, as that could take a while.

@xtagon xtagon added bug Something isn't working help wanted Extra attention is needed labels Sep 18, 2021
@xtagon
Copy link
Owner Author

xtagon commented Sep 30, 2021

Some workarounds for now:

  1. Be careful when streaming to only open one broadcast game window at a time. In OBS there's a setting to not refresh the window when the scene changes. In headless streaming it's less of a problem as long as you don't have to restart the server.

  2. If multiple games do happen, you can tell by the double vote messages if chat is enabled. Stop the duplicate game by checking for its last move and voting the opposite direction (the "forbidden move" in Battlesnake).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant