Enable Full Screen

Get help using Construct 2

Post » Thu Jun 28, 2012 4:44 am

I am trying to make my game go full screen when played on a mobile browser. However for some reason why i play it on an iPad Touch it doesn't go full screen. A demo of the game can be found here. The latest .capx file is available for download here for reference. Any assistance in this matter would be greatly appreciated.

Sincerely,

Yeti Kart Racer
B
10
S
1
G
1
Posts: 14
Reputation: 761

Post » Thu Jun 28, 2012 5:16 am

This game is not "fullscreen" on a desktop pc too and your C2 project have "fullscreen in browser" property set to "Off" ... so perhaps put your C2 project with the property "Fullscreen in browser" to "scale" will help you to have "fullscreen" on ios safari ;-p

I don't look if you try to use some special "browser" fullscreen code in C2 but this code can only work using Firefox and Chrome.

naelian2012-06-28 05:26:31
B
16
S
5
G
3
Posts: 298
Reputation: 5,240

Post » Thu Jun 28, 2012 5:43 am

Ok fullscreen mode is use in C2 code ! but he can't work on ios ;-p ... so just change the project property as i say before.

For ios i think you will have some problems using "on touch start" to move the kart ... so do this :

Give the "touch" object the property "use mouse input" to "yes" so you can test the "touch" behaviour using a mouse on a pc too and you don't need using the "mouse" object anymore in this project !

And more important, use "touch : is in touch" event instead of "touch : on touch start" it will works better because keeping finger on the screen only trigger this event on the first tick if not doing that. So if using the mouse input mode in the touch object i will be the same and keeping finger on the mouse button will only move the kart on the first tick.


ENjoy !naelian2012-06-28 06:00:04
B
16
S
5
G
3
Posts: 298
Reputation: 5,240

Post » Thu Jun 28, 2012 5:52 am

[QUOTE=naelian] This game is not "fullscreen" on a desktop pc too and your C2 project have "fullscreen in browser" property set to "Off" ... so perhaps put your C2 project with the property "Fullscreen in browser" to "scale" will help you to have "fullscreen" on ios safari ;-p

I don't look if you try to use some special "browser" fullscreen code in C2 but this code can only work using Firefox and Chrome.

[/QUOTE]
I tried what you suggested to no avail. The link to the updated demo remains the same. Here is an updated link to the .capx file. Any assistance would be greatly appreciated.

Sincerely,

Yeti Kart RacerYeti Kart Racer2012-06-28 05:58:14
B
10
S
1
G
1
Posts: 14
Reputation: 761

Post » Thu Jun 28, 2012 6:19 am

Is your ios mobile device using firefox or Chrome ? -> no only safari ... so your event putting your game in real fullscreen mode can't never work ... not working on a pc using chrome or firefox because of your "Is on mobile device" test .... and not working on ios because safari don't support this "Browser request fullscreen" feature.

Your screen/layout size is good for a Iphone 3 ... Ipad use bigger screen or perhaps you are speaking about Ipod touch and not Ipad ?, i will try to do some tests on iphone 4, sorry i have only that ;-p

Ok i think you are speaking about Ipod Touch ;-p ... the problem is that html5 games use safari ... on the only way to have some good display without too many "bars" is to put your game as a "homescreen" application and then launch your game directly touching the new game icon and not launching it using safari. Using this mode the adress bar is not display but the status bar will remain on the screen ! ... and there is no way to remove it... so you will never have a true 480 px height display but a smaller one and this is why you have some problems because if your game height is resize from 480 to a smaller size, the width is resize in the same way never filling the screen.
naelian2012-06-28 06:45:17
B
16
S
5
G
3
Posts: 298
Reputation: 5,240

Post » Thu Jun 28, 2012 6:46 am

[quote]
Is your ios mobile device using firefox or Chrome ? -> no only safari ... so your event putting your game in real fullscreen mode can't never work ... not working on a pc using chrome or firefox because of your "Is on mobile device" test .... and not working on ios because safari don't support this "Browser request fullscreen" feature.

Your screen/layout size is good for a Iphone 3 ... Ipad use bigger screen or perhaps you are speaking about Ipod touch and not Ipad ?, i will try to do some tests on iphone 4, sorry i have only that ;-p

Ok i think you are speaking about Ipod Touch ;-p ... the problem is that html5 games use safari ... on the only way to have some good display without too many "bars" is to put your game in your "homescreen" and then launch your game directly touching the new game icon and not launching it using safari.
[/quote]
Thanks for the heads up, i didn't know safari doesn't support full screen. In fact i didn't know IOS has a Firefox and Chrome app. No i wasn't talking about IPod Touch, just the IPad. I just wanted my game to go full screen on mobile browsers only, so no full screen on desktop is the correct behavior for desktop browsers.

Sincerely,

Yeti Kart Racer
B
10
S
1
G
1
Posts: 14
Reputation: 761

Post » Thu Jun 28, 2012 8:37 am

ok, ios device have only safari as well known browser on it ... perhaps a chrome version in future but actually i use safari and also the last dolphin browser on iphone (no gesture bugs !) with a fake fullscreen mode removing adress bar without having to use the "homescreen" feature.

But yes on your desktop pc you can have a real fullscreen mode with a C2 project ... just remove or invert the test on your project enabling fullscreen "for mobile only" and use chrome or firefox browser. Sorry if my previous post is not clear, i'm french so it's pretty hard for me sometimes to use the good words ;-p

Will your project use all the "height" size of the ipad screen ? if so the problem is just because you are using "Ipod touch/Iphone 3" layout/window size instead of Ipad screen size. It's also important to know your ios version because last 5.1.1 ios and safari are better.


naelian2012-06-28 08:39:10
B
16
S
5
G
3
Posts: 298
Reputation: 5,240

Post » Thu Jun 28, 2012 10:16 am

'Request fullscreen' is only supported on Chrome and Firefox on desktop computers, as far as I know. It won't work on any other browser for the time being. although I expect support is coming to other browsers soon.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528


Return to How do I....?

Who is online

Users browsing this forum: austinblackbelt and 33 guests