remvst Posted March 1, 2013 Share Posted March 1, 2013 Hey guys, I just wanted to share a quick workaround about multi-touch issues on the default Android browser. You may have noticed that the browser's behaviour is really weird when dealing with multiple touches. I had the problem with this ugly game : As you can see, the player controls the astonaut with two "virtual" keys displayed on the canvas. Therefore, he must be able to press one key or the other, or both at the same time. Anyway, I found a workaround by thinking about Biolab Disaster. The issue occurs only when using the same DOM element to identify user touches, so the idea is simple to use several elements instead. In my case, I just put two empty <div> elements on the left and on the right of the screen, just over the canvas, and then I just have to listen to single touches on each element and it works fine. Though, the virtual keys are still displayed via the canvas, to avoid any display issues with layered elements. I'm not sure if this has already been discussed, but I think it won't hurt to share Hope it will be useful Quote Link to comment Share on other sites More sharing options...
ak223 Posted March 12, 2013 Share Posted March 12, 2013 Haha your game's graphics remind me of that Custer's Revenge Atari game except with astronauts. AnywaysI found a board that has a lot of information on multitouch hopefully this can help? http://www.verious.com/board/Giancarlo-Leonio/android-touch-multi-touch-event-handling/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.