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

Multiplayer #5

Open
Cypher1 opened this issue Sep 9, 2017 · 3 comments
Open

Multiplayer #5

Cypher1 opened this issue Sep 9, 2017 · 3 comments

Comments

@Cypher1
Copy link
Owner

Cypher1 commented Sep 9, 2017

Opening this to ask the question:
How are we going to synchronise everything.

I think we need to change how the keys are processed so that we send key events directly to the server and then the server sends back thw whole game state.

That or we'd have to synchronise events which is tricky in js.

Any ideas?

@wemyss
Copy link
Collaborator

wemyss commented Sep 10, 2017

I wonder if sending a copy of their player object back with a timestamp is enough

@Cypher1
Copy link
Owner Author

Cypher1 commented Sep 10, 2017 via email

@Cypher1
Copy link
Owner Author

Cypher1 commented Sep 11, 2017

We could just have the server regularly update parts of each client's state. Then clients continue to run the game but the game will still be running on the server (we'd have to ensure that all update code was in .update() and all state was in one place for each sprite / world etc.

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

No branches or pull requests

2 participants