Tuesday, July 31st, 2007
iPhone Arkanoid
Scott Schiller has updated his dHTML Arkanoid game to work on the iPhone.
Although the mouse events meant that the game wouldn't work as-is, Scott added an extra div if the browser is an iPhone, and it handles click events.
-
-
if (isIphone) {
-
this.iphoneTarget = document.createElement('div');
-
this.iphoneTarget.href = '#';
-
this.iphoneTarget.id = 'iphoneTarget';
-
this.iphoneTarget.onclick = mmH;
-
arkanoidBody.appendChild(this.iphoneTarget);
-
}
-













It’s interesting as an example of what ‘could’ be achieved on the iPhone, but as an actual playable game it’s painful. It takes about 10 seconds for the ball to go from paddle to wall and back. Sloooowwww.
But the work-around to get the controls working in an interesting one.
I have a feeling that unless Apple suddenly announces a Drag’n'drop API for the iphone safari, we’ll see a lot of select something and click where you want it to go type interfaces.
What I noted which is actually really interesting is, if you rotate your phone and then pinch-resize the UI just a little bit, sometimes the game renders quite smoothly. It’s a little odd, but it seems to work! I should add that as a note. I would like to see support, or perhaps a mode, for accessing the full range of events in JS – mousedown/move/up and so on. Where they’ll need to be careful I think is in interfering with the iPhone’s native browsing UI. It sounds like having the full set of mouse events (minus hover I guess), would be pretty cool.
No sound effects because no flash support?
Correct.
Interesting that it’s possible to do so. It’s god to be able to play it on the iPod as well.
Thanks for the great work you’ve done here Scott!
Douglas, IT professional currently working on the Pain Relief Online Pharmacies project.
I think you’ve done a good job here. Very interesting that this is possible.
Cory, Web Developer currently working on the anti aging wrinkle project.
Interesting that it’s possible to do so. I have tried on mmy iphone.. nice
- yuhi from treatment for prostate -
hmmm i need to try on my one, if it work, and if it does will be great]oldtimerock from convert mm to inches