rs2048
rs2048 copied to clipboard
Enable input from mobile devices
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.
Swipe gestures are, imo, the best way to implement this. So, if someone decides to take this on, I'd recommend using Hammer.js.
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.