Android fit to screen solution?

Get help using Construct 2

Post » Mon Dec 09, 2013 4:13 pm

Hi there,

I am having problems with fit to screen function for android phone.My game format is cocoonJS, i found a guide on how to solve it, but that was a good year back.Are there any easy methods for this?Or an updated?

Best
Ozmec3
B
5
Posts: 25
Reputation: 750

Post » Mon Dec 09, 2013 4:36 pm

If anything Android has gotten more screensizes and resolutions, so making a game for android means making a game for multiple screensizes.

The tutorial about supporting multiple screensizes is still the best reference for someone trying to create an android game.

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 09, 2013 4:46 pm

[QUOTE=LittleStain] If anything Android has gotten more screensizes and resolutions, so making a game for android means making a game for multiple screensizes.

The tutorial about supporting multiple screensizes is still the best reference for someone trying to create an android game.

[/QUOTE]
Im using a Nexus 4 and it has 1280738 resolution, so i just set up a screen size like that and that's it?
B
5
Posts: 25
Reputation: 750

Post » Mon Dec 09, 2013 4:59 pm

If you do that your game will probably run fine on your nexus, although you might have issues, because of the menu bar on top and below and when you change orientation. On any other Android device it will probably look terrible because it uses a different resolution and or has a different screensize.

In the tutorial section you can find a tutorial about supporting multiple screensizes. I can recommend it, for without using the techniques therein it will be impossible to create an Android game that looks good across different devices, but even with it you will have to test a lot and it could be you will not be able to get the game looking perfect on every device.ze
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 09, 2013 6:14 pm

[QUOTE=LittleStain] If you do that your game will probably run fine on your nexus, although you might have issues, because of the menu bar on top and below and when you change orientation. On any other Android device it will probably look terrible because it uses a different resolution and or has a different screensize.

In the tutorial section you can find a tutorial about supporting multiple screensizes. I can recommend it, for without using the techniques therein it will be impossible to create an Android game that looks good across different devices, but even with it you will have to test a lot and it could be you will not be able to get the game looking perfect on every device.ze[/QUOTE]
Well i tried with my resolution, but the actual formatin on my nexus is terrible.It only shows 1/4 of the actual screen size in construct.Any idea how to solve this?
B
5
Posts: 25
Reputation: 750

Post » Mon Dec 09, 2013 6:30 pm

I can't really say anything about it without seeing your capx.
What is the size of the project in project properties?
what is your layout size?
what is the scale setting in project properties?
Are you trying your game online or through cocoonjs?


I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 09, 2013 7:04 pm

[QUOTE=LittleStain] I can't really say anything about it without seeing your capx.
What is the size of the project in project properties?
what is your layout size?
what is the scale setting in project properties?
Are you trying your game online or through cocoonjs?


[/QUOTE]
No problem, im just starting, so its just a raw capx file.However i did manage to get the menu on the screen but now there is some white screen at the edge of the background.

If you mean project settings, it is :Windows size 1280, 738
Layout size: 1280, 738
Not sure where to look for this, bit if im looking correctly it is Letterbox scale in configuration settings.
Im trying my game on my actual android device.
I use cocoonjs to export ->ludei.com to make it .apk and test it on my device.
B
5
Posts: 25
Reputation: 750

Post » Mon Dec 09, 2013 8:24 pm

[QUOTE=Ozmec3]No problem, im just starting, so its just a raw capx file.However i did manage to get the menu on the screen but now there is some white screen at the edge of the background.

If you mean project settings, it is :Windows size 1280, 738
Layout size: 1280, 738
Not sure where to look for this, bit if im looking correctly it is Letterbox scale in configuration settings.
Im trying my game on my actual android device.
I use cocoonjs to export ->ludei.com to make it .apk and test it on my device.[/QUOTE]
Letterbox Scale and Letterbox Integer Scale are good for screens that have the same aspect ratio as Windows Size.
If you want to support different resolutions/aspect ratios then you should use Scale Inner or Scale Outer.
Also, for Windows Size I would recommend a more common resolution like 1280x720

More info here: https://www.scirra.com/tutorials/73/supporting-multiple-screen-sizesTGeorgeMihai2013-12-09 20:25:25
B
49
S
15
G
6
Posts: 534
Reputation: 7,195


Return to How do I....?

Who is online

Users browsing this forum: David181 and 13 guests