0 Favourites

How will HTML5 Games support all mobile device ?

  • Hi there,

    I'm pretty sure the answer is easy for a html/JS programmer but, after trying to modify my C2 project to fit iPhone on appMobi, I noticed that I couldn't handle mobile with different resolution.

    I tried something I found on this forum about using the window.Widht/Height values instead of absolute canvas size but, it only stretch the canvas.

    I checked an example and all sprite were using position values relative to the window.Width/Height.. that's cool but isn't it a bit overkill to include that value in all your calculation within the game just to make sure it will show up correctly on any device ?

    Thanks for your help!

  • If I remember correctly, the latest build of C2 will resize properly if you set it to fullscreen mode. Not sure though, I haven't tried anything from C2 on mobile devices yet sorry

    Edit: Heh, post 404

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Release 41.2, just released yesterday, properly supports iOS with the 'fullscreen in browser' setting (which was itself added only 3 days ago). The canvas won't stretch - it'll extend to fill the device window, no matter how big it is. The WindowWidth and WindowHeight system expressions give you the current canvas size, so then you can position and size everything relative to that.

    Does that help solve your problem? These releases were literally days ago, so you may have missed them.

  • Yeah actually, I missed them. I though I just downloaded the latest release 41 but it seems that it never remains the latest more than 1 or 2 days haha

    I'll give it a try Thx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)