Touch Controller for HTML5 Games

February 5, 2012 Off By jb@exit5.com

I still like to play with code every once in a while.  For the last few years I have mostly been working on Creative and Strategy, but when I first got into the tech business I was all about the code.  It has always been a love hate relationship for me.  But it has been fun looking through some of the little experiments I have done.

I don’t like to travel with a laptop, and a lot of times I just have my iPad with me.  What I found frustrating is, most of the little projects and experiments I had done in the past used keyboard controls to make them work.  I was wondering how can I make this work on a touch screen.  I tried a number of different solutions and I was not completely happy with any them.  After digging to see what other people are doing I came across a really interesting developer named Seb Lee-Delisl…  He had created a really simple elegant controller.  I have been playing around with it for a bit.

If you have your iPhone or iPad check out the example I have posted.  I am now working on incorporating it into some of the things I have created in the past.  Fingers crossed that I don’t have to rewrite them from scratch…  Cause I don’t know if I’ll get around to doing it.

Check it out, but remember it will now work with a mouse or keyboard.  DEMO

 

 

 

 

 

 

I just tried to get it to work on Android devises.  It was a little wonky.  It only partially worked on a Droid, I think it has trouble handling multipul touch events. Seem a lot of the Android devises touch drivers are a little sub-par.  I could not get anything to render on a Kindle, which surprised me…  All I got was a black screen.  Not sure how it handles HTML5 Canvas.