Developers Corner > Programming

HTML5 + Touch Overlay


Ok ill try and explain best I can and hopefully you guys can tell me if I'm barking mad or not.  Basically just wondering if it would be possible to send physical keyboard commands via a the touch screen to an html5 game or app, in an effort to bypass the pre android 3.x webkits lack of multi touch support in web apps .

 :-[ slightly bad at explaining things so I made an image

Thanks for your time :)

Hmm im not sure but I have seen html5 touch screen games in the past. I remember playing a html5 zelda clone thats had touch controls like most android games. The website it was hosted on seems to be gone now though.

also after an accident I found my browser could do multi touch under a different test :S I've mailed phonegap but I think it's just me being an overly excited child :P

using this browser

with this test

gives this result **as many fingers I could use whilst taking a screenshot  :P **

Could any of this be used for someone implement multi touch on  an android 2.x device

Yes, it is possible to create an overlay + IME to convert touch events into keyboard events.  BT Controller, for example, does this (that one is separated into two apps, but could be written as a single app).  Personally, I don't know how to make the overlay draw on top of the screen when it is in a separate app, but that app I mentioned does it (there is an info overlay that's "always on top" in the client side of the app).  However, analog input would require the HTML game to be written to interpret multiple key codes as a single axis.  This is what I did in Mupen64Plus AE to handle analog information from USB/BT Joystick Center.

I couldn't say about your multitouch question.

 ;D Thanks Guys I've since found that phonegap can recognise some of an android keyboards physical controls so I'll get looking into the overlay scenario hopefully be something I can understand, but good to know theoretically at least its possible.

And I'll leave the multi touch thing with the phonegap devs I'm sure its probably been found before

Thanks again guys


[0] Message Index

Go to full version