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

WASD/Arrow movement and mobile touch controls #16

Open
zJuuu opened this issue Jan 30, 2020 · 2 comments
Open

WASD/Arrow movement and mobile touch controls #16

zJuuu opened this issue Jan 30, 2020 · 2 comments

Comments

@zJuuu
Copy link

zJuuu commented Jan 30, 2020

I would like to request WASD/Arrow and mobile touch controls.

In my opinion the current movement system with clicking is especially hard for mobile users and even on pc its just feeling slow.

I would suggest to change it to Arrows/WASD + Space (to activate stuff) and add mobile touch controls like in this example (https://phaser.io/examples/v2/input/virtual-gamecontroller)

@Jerenaux
Copy link
Owner

To help working on this I've elaborated a bit on the wiki how the current movement system works (see here). Anyone feel free to point out what's unclear or missing.

One big take-away is that in the current system, when a player moves, it sends the intended path to the server which broadcasts it to the other client. All clients "play" the paths they receive without depending on regular updates from the server.

In a key-controlled movement system, this won't work anymore, instead it'll be necessary for the clients to send to the server (every few hundred milliseconds) which directional keys are pressed, and the server will have to relay that to the other clients at a similar interval. This info will have to be sent through the update packets, which is something I'll write a wiki entry very soon to help with this.

@Jerenaux
Copy link
Owner

Jerenaux commented Feb 6, 2020

I've began the Wiki entry on the player updates, which is also relevant for this discussion!

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