Iphone max resolution

Get help using Construct 2

Post » Tue Apr 03, 2012 4:51 pm

[QUOTE=Ashley] @cesisco yes it should fit, what do you see though?[/QUOTE]

@Ashley, check here iphone test
B
33
S
11
G
9
Posts: 381
Reputation: 10,153

Post » Tue Apr 03, 2012 4:54 pm

[QUOTE=rgros] @cesisco

Try setting unbound scrolling to yes, then if its the same thing i have you should have the image in the center of the screen and the unfilled space will be arround the image....

[/QUOTE]

Yes its true.
B
33
S
11
G
9
Posts: 381
Reputation: 10,153

Post » Tue Apr 03, 2012 4:55 pm

@rgros, what do you expect to appear in the left and right side of the image? Construct 2 will not change the aspect ratio and resize it wider, that would be terrible for many games. If you want the game to fill up the sides then you should draw it wider. But I think it does not matter because on an actual phone it will fit nicely.

@cesisco - I assume you have the same problem. Does the phone aspect ratio match the aspect ratio of you game window? If not, then you'll need to draw your backgrounds and images wider to compensate.

For example, if you design your game for a square window at 400x400, then export it to a phone with a display twice as wide (800x400), what do you expect to appear? Stretching it twice as wide would look really ugly, so C2 scales it up and centers it. This means sometimes there's gaps at the side, and if you haven't adjusted your artwork to fit, the space will be empty.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Apr 03, 2012 5:03 pm

Hey, just a quick question based on this new topic.

What if you loaded large images for all the sprites and have Construct 2 automatically resize itself and them based on the resolution? Such as have a square be 10% of whatever the screen size is. This way no matter what resolution or ratio, it would be the same general size. Although this would have its down sides however as more compressed devices might be packed. And widescreens might be stretched. But if the percentages were determined in some form of middle ratio, it would look ok each size.

Did that make any sense?
B
29
S
4
Posts: 42
Reputation: 2,391

Post » Tue Apr 03, 2012 5:03 pm

[QUOTE=Ashley] @rgros, what do you expect to appear in the left and right side of the image? Construct 2 will not change the aspect ratio and resize it wider, that would be terrible for many games. If you want the game to fill up the sides then you should draw it wider. But I think it does not matter because on an actual phone it will fit nicely.

@cesisco - I assume you have the same problem. Does the phone aspect ratio match the aspect ratio of you game window? If not, then you'll need to draw your backgrounds and images wider to compensate.

For example, if you design your game for a square window at 400x400, then export it to a phone with a display twice as wide (800x400), what do you expect to appear? Stretching it twice as wide would look really ugly, so C2 scales it up and centers it. This means sometimes there's gaps at the side, and if you haven't adjusted your artwork to fit, the space will be empty.[/QUOTE]

@Ashley, as i said before my layout is 960-640 window 960-640 and background 960,640 aswell,all designed to fit iphone resolution, thats why im asking this. cesisco2012-04-03 17:07:44
B
33
S
11
G
9
Posts: 381
Reputation: 10,153

Post » Tue Apr 03, 2012 5:14 pm

@DalekAddison - that's what the fullscreen scale mode does.

@cesisco - the actual game viewport is not 960 x 640 - see the status bar at the top! That takes up some of the space so the actual game size is probably only something like 960 x 620. That has changed the aspect ratio so the problem is the same!

Since a lot of people run in to this, I've updated the supporting multiple screen sizes tutorial with this section:

[quote]A common gotcha - aspect ratios on mobile

Look carefully again at the above pictures - notice Construct 2 does not change the aspect ratio of the game. It zooms the window to fit, but if the view is too wide, gaps appear at the side. If the view is too tall, gaps appear at the top and bottom.

This means if you draw a background which exactly fits one aspect ratio, then run it on a phone with a slightly different aspect ratio, gaps will appear at the sides. Note that some mobiles and tablets will be displaying an address bar or status bar at the top of the window, which will change the aspect ratio again.

This is the same problem faced by TV producers. There are many TVs out there using aspect ratios of 4:3, 16:9 and 16:10. If a producer films a TV show only in 4:3, on a 16:9 TV there will be gaps at the sides. Similarly, if you draw a background exactly fitting one phone's window, then run it on another phone with a slightly different aspect ratio, gaps will appear at the side.

TV producers solve this problem the same way you should: everything is filmed in the widest aspect ratio 16:9. Then for other displays it's cropped down. For your games, basically you need to make sure you draw backgrounds a little wider (or taller, depending on orientation) than the window size, to ensure no gaps ever appear.[/quote]
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Apr 03, 2012 6:28 pm

@Ashley, thanks now im tweaking my game and it's ok,in iphone 990x620 or 960x 602... etc.
B
33
S
11
G
9
Posts: 381
Reputation: 10,153

Post » Thu Apr 05, 2012 10:01 am

@Ashley
For your games, basically you need to make sure you draw backgrounds a little wider (or taller, depending on orientation) than the window size, to ensure no gaps ever appear.


So I guess using this method you should make your backgrounds no smaller than 4096 x 2160 if you plan on running it full screen on a PC as well to cover every possible resolution? The Radeon HD 7970 currently has a max resolution of 4096 x 2160.

I had been using a method to stretch the canvas size with html to fill the screen but there were certain issues with it. Since then I've been using one of the full screen options to scale the game and then a few conditions to fill the screen to eliminate the black bars without changing my graphics. Same approach as a TV uses to eliminate the black bars.
B
5
S
2
G
5
Posts: 26
Reputation: 2,987

Post » Thu Apr 05, 2012 2:09 pm

I chime in here.

DO NOT work with 990x620! Hide the status bar.
A game with the statusbar shown is an almost guaranteed rejection from the appstore.

This was the reason why I told @Ashley some time ago to make the statusbar hidden or at least transparent during export!
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Thu Apr 05, 2012 3:10 pm

@Thunder - there's no reason to make backgrounds that big. No physical displays are currently that big I don't believe, and you may be happy to publish only to mobile (so you're not worried about desktop). Or you can just use linear scaling and scale up smaller artwork. There's a few options really.

@0plus1: is showing the status bar really grounds to reject an app?! Why? It takes, what, 10 pixels?Ashley2012-04-05 15:10:23
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Televangelist and 28 guests