1 decade ago by SlouchCouch
using this blog post by Seb Lee-Delisle about dual-stick controls (http://seb.ly/2011/04/multi-touch-game-controller-in-javascripthtml5-for-ipad/), and the the touch controls used by the ios game Geometry Wars: Touch, i created a plugin that lets you create and use buttons/joysticks inside the canvas. Here's the progress on it so far:
http://slouchcou.ch/beta/robocop5/
Basically you touch the left half of the screen to create the "joystick" and drag your thumb left or right to move left or right. Then pick up your thumb and place it somewhere else at your leisure and the joystick follows you. Then hit the right side of the screen with your left thumb to jump/double-jump. Also there is a pause button.
So far i the only mobile device i have it tested on is ipad2, and I statically set the screen resolution if it detects you are using an ipad 2. Other mobile platforms might work, but i haven't tested them so i'm not sure.
This is in exreme prototype mode, so please don't knock my graphics/gameplay :)
Once i flesh the bugs out of the touch controls i'll put the plugin on github with like an MIT license or something. The only bug i notice so far is that jump only fires during onTouchRelease if you are also holding the joystick at the neutral position, but any other time and it works fine.
-Dave
http://slouchcou.ch/beta/robocop5/
Basically you touch the left half of the screen to create the "joystick" and drag your thumb left or right to move left or right. Then pick up your thumb and place it somewhere else at your leisure and the joystick follows you. Then hit the right side of the screen with your left thumb to jump/double-jump. Also there is a pause button.
So far i the only mobile device i have it tested on is ipad2, and I statically set the screen resolution if it detects you are using an ipad 2. Other mobile platforms might work, but i haven't tested them so i'm not sure.
This is in exreme prototype mode, so please don't knock my graphics/gameplay :)
Once i flesh the bugs out of the touch controls i'll put the plugin on github with like an MIT license or something. The only bug i notice so far is that jump only fires during onTouchRelease if you are also holding the joystick at the neutral position, but any other time and it works fine.
-Dave