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

two players #2

Open
bearda opened this issue Aug 20, 2017 · 2 comments · May be fixed by #4
Open

two players #2

bearda opened this issue Aug 20, 2017 · 2 comments · May be fixed by #4

Comments

@bearda
Copy link
Collaborator

bearda commented Aug 20, 2017

The user needs to poll the server periodically.

@ahwmrklas
Copy link
Owner

We might be able to have the client just always waiting for data. When it arrives put the message on a Q.
But it also might work better if the client constantly polls and the gameserver only sends a version/sequence number.

So, the game maintains a sequence number that updates on ANY change. Any tiny HINT of a change.
The client polls for that number. That way the client knows when there is a new version of game information that he should retrieve and display.

@bearda
Copy link
Collaborator Author

bearda commented Aug 22, 2017

I didn't read this comment until now. What I did was just start polling as soon as we are in the waiting phase. The thread could be modified easily to run forever and call a menu update as soon as the server says there is a change.

This would cause a problem if the user has a window open.

@bearda bearda linked a pull request Aug 22, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants