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

Initial implementation of backend side for spectating #333

Merged
merged 2 commits into from
Oct 13, 2024

Conversation

Bios-Marcel
Copy link
Member

@Bios-Marcel Bios-Marcel commented Oct 12, 2024

Another attempt at implementing spectating as request in #201

TODO:

  • Spectators should not be visible in the player list
  • Switching to / from spectating should only be possible after a turn has ended
  • Spectators shouldn't be part of the game loop

    This needs to be tested well. Should potentially work already.
    Maybe integration tests would be useful here?

  • There needs to be a button to request a switch to / from spectating

    For testing purposes, I just call the toggleSpectating function for now.
    This could be a button in the top-bar that switches between an eye and a controller or something like that.

  • Display "Blah blah is now participating / spectating" in the chat

To consider:

  • Should spectating players be kickable?

    If not, this could help to dodge an almost full kick vote. On the other hand, it might flood the kick list.

There was already an attempt at implementing this in feature/, but it is quite outdated and I changed the implementation and plans a bit anyway.

@Bios-Marcel Bios-Marcel force-pushed the feature/spectate_attempt2 branch from c075b71 to b522e66 Compare October 13, 2024 11:53
@Bios-Marcel
Copy link
Member Author

Bios-Marcel commented Oct 13, 2024

The backend side of things is solid as is.

The only thing potentially annoying is the abuse of the update-players event. But maybe this is something I should generally update at some point? Cause this is used for multiple things at this point.

The frontend is a little garbage. It works, but it isn't really clear to the player what the current state is. This should instead be a dialog that displays the state and allows you to revoke your active requests.

I'll merge this for now, since I am not sure when I'll work on it again and I want to avoid merge conflicts.

* The toolbox now hides if you are not drawing (meaning guessing or spectator)
* The toolbox now spans to the very right in widescreen mode
@Bios-Marcel Bios-Marcel force-pushed the feature/spectate_attempt2 branch from b522e66 to b8bde73 Compare October 13, 2024 12:01
@Bios-Marcel Bios-Marcel merged commit 10b5243 into master Oct 13, 2024
6 checks passed
@Bios-Marcel Bios-Marcel deleted the feature/spectate_attempt2 branch October 15, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant