Issue 11: Make client work on Android
Status:  Fixed
Owner: ----
Closed:  Apr 2011
Project Member Reported by g...@chromium.org, Mar 28, 2011
Several problems here

#1) Android browser does not support websockets. Fortunately socket.io, the library I'm using, falls back to XHR but need to test how bad latency is. 
#2) Multi-touch is not supported on Android browser. Consider using Flash for that?

Do not want to have to install anything although in worst case you can install Opera Mobile (not to be confused with Opera Mini). Opera Mobile supports both WebSockets and multi-touch

Apr 3, 2011
Project Member #1 g...@chromium.org
One idea. If the browser does not support multi-touch then maybe the controls could be a virtual joypad where there is a center point and you put your finger off of the center point to make your ship go in that direction.

For this the client would need to identify that it's using a different control scheme (or maybe it could figure it out by the messages).

The messages would have to change from turn (-1, 0, 1) to targetdir (0 - Math.PI * 2). 

Firing would happen anytime you are touching the screen so you could say put your finger at NorthNorthWest and your ship would turn to NorthNorthWest then with your finger at that stop you could tap,tap,tap to fire quickly. Otherwise you'd be firing once a second.

I see 2 issues

#1) This requires a lot more messages because your finger is likely to always be giving slightly different position events. Maybe we could quantize it a little like in 5 or 10 degree points but that sounds like it would make it harder to aim

#2) The android browser doesn't support websockets so even if this control scheme is better for single touch it might suck when socket.io falls back to XHR

Vince suggested we look into flash for better touch events.

Apr 4, 2011
Project Member #2 g...@chromium.org
So I implemented this single touch mode last night for Android with the built in browser only. 

It works but I think we should look into removing the auto-fire and require the tap which means adding some timing because basically we'd only fire on touchend/touchcancel if time since touchstart is short say < 200ms?

Also need to figure out effing CSS and handle landscape display as well.
Apr 8, 2011
Project Member #3 g...@chromium.org
Seems to work. Controls suck
Status: Fixed