Tuesday, July 31st, 2007

iPhone Arkanoid

Category: Games, iPhone

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.


  1. if (isIphone) {
  2.     this.iphoneTarget = document.createElement('div');
  3.     this.iphoneTarget.href = '#';
  4.     this.iphoneTarget.id = 'iphoneTarget';
  5.     this.iphoneTarget.onclick = mmH;
  6.     arkanoidBody.appendChild(this.iphoneTarget);
  7. }

DHTML Arkanoid

Posted by Dion Almaer at 5:47 am

1.3 rating from 185 votes


Comments feed TrackBack URI

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.

Comment by JP — July 31, 2007

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.

Comment by Scott Schiller — July 31, 2007

No sound effects because no flash support?

Comment by no sounds? — July 31, 2007


Comment by Scott Schiller — July 31, 2007

Interesting that it’s possible to do so. It’s god to be able to play it on the iPod as well.

Comment by DouglasB — February 23, 2008

Leave a comment

You must be logged in to post a comment.