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

Enable input from mobile devices #16

Open
Journeycorner opened this issue Jan 4, 2019 · 2 comments
Open

Enable input from mobile devices #16

Journeycorner opened this issue Jan 4, 2019 · 2 comments

Comments

@Journeycorner
Copy link

Good job, unfortiunately I can't try it out, since I am using my tablet. As a modern web APP, consider using a mobile first approach, i.e. enabling mobile input and using it as the primary target device.

@KappaDistributive KappaDistributive added the good first issue Good for newcomers label Jan 4, 2019
@KappaDistributive
Copy link
Owner

Swipe gestures are, imo, the best way to implement this. So, if someone decides to take this on, I'd recommend using Hammer.js.

@KappaDistributive
Copy link
Owner

KappaDistributive commented Jan 5, 2019

Update: I tried implementing this feature today and, to my surprise, disovered that stdweb doesn't yet support touch events (see Issue 305 at /koute/stdweb) which complicates this issue.

What I have done is to implement mouse input. This caused all sorts of ownership issues which I have handled by reorganizing the refresh/redraw cycle of the game.

As a result, once touch events are supported by stdweb (which, btw, would make for an awesome contribution over there and most of the work has already been done...), adding this feature amounts to a few trivial changes.

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