Home > html5 > HTML5 Platform Game for iPhone

HTML5 Platform Game for iPhone

February 4, 2010 Leave a comment Go to comments

I’ve spent today porting my HTML 5 platformer, mentioned in an earlier post, to run on iPhone/iPod Touch.

The game uses the HTML 5 Canvas element and a few iPhone-specific HTML/JS extensions. It should still run on most desktop and mobile web browsers however.

I’ve tested the game on an iPhone 3G and 3Gs. The 3Gs performs as well as a desktop PC which is some feat! The 3G on the other had is a little sluggish, but the game is still playable; if you’re using a 3G I recommend playing the game with your phone upright (portrait) for best performance, since in this mode the game aims to draw to a smaller area of the display.

It is also possible to play the game full screen, that is without the Safari address bar & toolbar, by adding the game to your home screen.

According to Liam Green-Hughes on Twitter, the game also runs fine on the Nokia N900, running Firefox.

See my earlier post for the history of the game, or to play the desktop version. As before I invite you to take a look at the source code of the game. Simply hit your browser’s “view source” button to read the code.

Click the Play link below (ideally on your iPhone!) and be sure to leave a comment with your thoughts.

Play!

Or go to this address on your iPhone: http://tinyurl.com/purplefloyd

About these ads
  1. Jonathan Dietrich
    February 4, 2010 at 3:01 am

    Congrats. This is exactly what the “no flash on my iPod” whiners need. Proof that HTML5 can replace not just the video features of flash, but their precious flash games too!

    Thanks.

    • Pectoris Fleo
      May 17, 2010 at 3:12 am

      To truly dethrone Flash as an online gaming platform HTML5+JavaScript would have to match its performance, which, as numerous tests have conclusively demonstrated, is nowhere near the case. Claiming that a scripted app can run [nearly] as fast as it’s compiled, strictly-typed and resource-cautious counterpart, would simply be absurd. I am ready to back this up with concrete examples.

      PS. Props to PurpleFloyd for this lovely game, which ran quite well on my iPhone 3GS.

      • purple floyd
        May 17, 2010 at 12:52 pm

        Thanks for the comment Pectoris Fleo.

        Are you comparing HTML5/JS to Flash/AS3, or to native iPhone apps? I ask since Flash apps are not “compiled”, “strictly-typed”, nor “resource-cautious”, but you seem to be stating that they are.

        Yes Flash apps can benefit from JIT compilation and the type system in AS3 is better than earlier versions, but if we are comparing Javascript to ActionScript surely with their common EcmaScript origins there is no reason to suspect one can outperform the other, given suitably well-implemented VMs?

      • Austin
        November 6, 2012 at 3:01 am

        HTML5 through ajax can load in and unload server sources which to me makes it much more useful for the development of browser based mmorpgs.

  2. April 29, 2010 at 9:56 pm

    Works fine on my myTouch 3G, nice job man!

  3. Gene
    May 4, 2010 at 2:13 am

    Great job! Works surprisingly well on a third generation iPod touch.

  4. Scott B
    May 7, 2010 at 8:49 am

    Cool game! Works great, but the button triggers don’t line up on the iPad!

    • purple floyd
      May 17, 2010 at 12:56 pm

      Anyone prepared to send me their iPad so I can test this?! :-D

  5. June 12, 2010 at 12:26 am

    I just tried on my iPad it works, except I cannot jump lol

  6. June 19, 2010 at 11:23 pm

    nice game again thanks

  7. July 2, 2010 at 1:12 am

    Great game! But It doesn’t work on my Nexus!

  8. September 9, 2010 at 11:39 am

    nice game

  9. Alex
    November 20, 2010 at 7:42 pm

    Well, it seems good for an HTML5 game. I have yet to see any decent HTML5 games on the iphone though, so that’s not saying very much. I don’t think people would play a game like this, its too choppy (seems like most html5 apps had a horrible framerate, especially on the iphone). I tried this in my ipod touch 4, I would expect a better framerate on the nexus. Also, there isnt enough feedback on buttons and things you click (but most html5 games seem like this, I guess because there aren’t too many toolkits available yet for the canvas).

    Its as good as any other HTML5 game I’ve seen.

  10. markw1970
    December 2, 2010 at 10:14 am

    Nicely done. It’s great to see fellow JS / Canvas developers creating this stuff.
    I too have a wee game to play on iPhone. Except it currently runs like a complete dog on there.
    In dev here – http://www.wilfscorner.co.uk/sandpit/hypergunner
    I’m pretty sure it’s all the collision routines that’s killing it. Possibly too much drawImage() as well.
    Any one an expert on this stuff ?

  11. December 5, 2010 at 3:30 pm

    The games looks like the one in super mario and its kind of interesting. Playing mobile games is very enjoyable and help me kill some time. Do you know some sites where I could download mobile games?

  12. January 4, 2011 at 4:14 am

    Apple does not allowing Flash apps on the iPhone or iPad because they bypass the app store does not hold water. You can make them RIGHT NOW, with touch controls, and people can play them immediately.

  13. n
    January 8, 2011 at 1:33 am

    not the best game ever but its a good starting point, give it another 2 years and well be playing 3d html5 games.

  14. May 17, 2011 at 6:23 am

    so cool,I like this game,and I am from China,I am also use html5 .

  15. y8
    May 26, 2011 at 4:16 am

    Apple does not allowing Flash apps on the iPhone or iPad because they bypass the app store does not hold water. You can make them RIGHT NOW, with touch controls, and people can play them immediately.

  16. Frozen99
    July 20, 2011 at 7:44 pm

    Works great on iPod touch 4G.

  17. Y9
    July 24, 2011 at 10:19 am

    Cool game play. Thanks for share..

  18. ork
    February 26, 2012 at 1:31 am

    nice game again thanks

  19. October 1, 2013 at 12:03 am

    It’s going to be end of mine day, but before finish I am reading this fantastic post to increase my know-how.

  20. December 20, 2013 at 10:40 am

    Hero of Sparta – Everyone can remember their lessons in mythology, and, if not, this i – Phone game seeks to reintroduce
    the legend of King Argos. With a huge touchscreen and tons of
    support from many game developers, it was only a matter of time before games would
    explode. In short, the concept of i – Phone
    app development is very successful.

  21. January 1, 2014 at 10:09 am

    nitwits  niveous  nobbier  nobbily  nobbled  nobbler  nobbles  noblest.
    venetian vengeful venially venisons venogram venology venomers venoming.
    resend   resent   resets   resewn   resews   reshes
      reship   reshod.

  22. February 6, 2014 at 10:17 pm

    Its like you read my mind! You appear to grasp so much about this,
    like you wrote the guide in it or something. I believe that you
    just could do with some % to pressure the message house a little bit, but other than
    that, that is wonderful blog. A great read. I will definitely be back.

  23. April 20, 2014 at 11:18 am

    Thanks for the marvelous posting! I quite enjoyed reading it,
    you will be a great author.I will be sure
    to bookmark your blog and will often come back in the foreseeable future.
    I want to encourage one to continue your great writing, have
    a nice weekend!

  24. May 21, 2014 at 4:01 am

    Wow, incredible blog layout! How long have you been blogging for?
    you make blogging look easy. The overall look of your site is magnificent, as
    well as the content!

  25. May 22, 2014 at 1:02 pm

    Sweet blog! I found it while browsing on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Thanks

  26. June 15, 2014 at 10:02 am

    I am extremely impressed with your writing skills and
    also with the layout on your weblog. Is this a paid theme or did you modify it yourself?
    Either way keep up the excellent quality writing, it is rare
    to see a great blog like this one nowadays.

  27. June 27, 2014 at 4:36 am

    I thgink this is one of the most significant infomation for me.
    And i’m glad reading your article. Buut should remark on some general
    things, The site style is perfect, the articles is really nice : D.
    Good job, cheers

  28. August 21, 2014 at 2:42 pm

    Hey There. I discovered your blog the usage of msn. This is
    a really neatly written article. I will make sure
    to bookmark it and return to learn more of your useful info.
    Thank you for the post. I’ll certainly comeback.

  29. October 18, 2014 at 4:08 am

    My spouse and I stumbled over here coming from a different
    website and thought I may as well check things out.
    I like what I see so i am just following you.

    Look forward to finding out about your web page repeatedly.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: