How will HTML5 Games support all mobile device ?

Chat about anything not covered in these forums, but keep it civil!

Post » Mon Jun 13, 2011 12:25 pm

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!
B
6
S
2
G
1
Posts: 122
Reputation: 1,194

Post » Mon Jun 13, 2011 3:48 pm

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 :D
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Mon Jun 13, 2011 4:35 pm

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.
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,228

Post » Mon Jun 13, 2011 5:34 pm

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 :P

I'll give it a try :P Thx
B
6
S
2
G
1
Posts: 122
Reputation: 1,194


Return to Open Topic

Who is online

Users browsing this forum: TRIGERTOOM and 3 guests