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

show the status of players in the game #79

Open
Xiaohong-Deng opened this issue Oct 8, 2017 · 3 comments
Open

show the status of players in the game #79

Xiaohong-Deng opened this issue Oct 8, 2017 · 3 comments

Comments

@Xiaohong-Deng
Copy link
Owner

Xiaohong-Deng commented Oct 8, 2017

on the game page, show a list of players with their status like this
guesser (online or offline or busy)
judge (online or offline or busy)
reader (online or offline or busy)

since the game can be played asynchronously, surely players want to know if other players are with them or not to avoid unnecessary idle time.

@Xiaohong-Deng
Copy link
Owner Author

this feature is halted. becasue the nature of websocket is every time you send a new http request, the ws connection is terminated and a new one is built. it applies to refreshing page or redirecting to the same page. the effect is when players click "Next Round", other players will see player number -1 before +1. there are techniques to overcome this, but it requires time to learn the tricks.

@Xiaohong-Deng
Copy link
Owner Author

Xiaohong-Deng commented Nov 19, 2017

Well maybe this issue can be addressed by adding a buffer. Use a method, when a player unsubscribes, call the method, the first line of the method halts the call for like 5 seconds and check how many players in the channel then update the info.

I believe there are matured ways out there to address this. But it's just my thought.

To get fancier, we can implement what Slack provides. That is a mini bar with all the role names in it and a small dot alongside each role indicating if the player is online or not.

@Xiaohong-Deng Xiaohong-Deng changed the title show the number of players currently in the game. show the status of players in the game Jan 16, 2018
@Xiaohong-Deng
Copy link
Owner Author

One thing needs to be taken into account is as follows:

  • When a user hit the game page, besides updating his/her status, how should we retieve the status of other players for him/her? we should get the status from somewhere. but where? again this is like users waiting in the wating room. the status should not be persistent. once server is taken down, all status should be lost. all users should be considered offline. so Redis with persistency switched off should be an laternative.

this post may be useful How do I tell if a user is online?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant