Multiple Screen Sizes in Phone

Get help using Construct 2

Post » Tue Feb 12, 2013 8:25 am

We have a problem, we tried researching and reading all the tutorials about multiple screen sizes. We tried to export our game on a nexus tab and we tried the letter scale, scale, crop etc and none worked properly on the tab.

Here's the link to our project in dropbox:

https://www.dropbox.com/s/260mz6k1w8cwwej/ScreenProblems.capx
B
7
S
2
G
3
Posts: 12
Reputation: 2,586

Post » Tue Feb 12, 2013 9:54 am

I may have a solution for you but it could be considered "dirty".

Firstly I set your layout to same size a project (640, 480), then I set "Fullscreen in browser" to "scale".

Now on start of layout I set the scale of the layout to WindowsWidth / LayoutWidth ( if Windows was 1000 and your layout was 500 that would equall 2, so game is scaled up x2).

Added a condition inside that to decide if scale by Width or Height is greater than 1 (if not don't scale), and also a min() to decided to scale by either Width or Height.

Scale : min(floor(WindowWidth / LayoutWidth),floor(WindowHeight / LayoutHeight)) > 1 ? min(floor(WindowWidth / LayoutWidth),floor(WindowHeight / LayoutHeight)) : 1


You'll need to do this to all your layouts.

https://dl.dropbox.com/u/2175584/Construct2Examples/ScreenProblems.capx
B
24
S
11
G
5
Posts: 140
Reputation: 5,004

Post » Tue Feb 12, 2013 10:36 am

Thank you for the quick reply!
I have yet to check your file on our tab, but its set to fullscreen on the browser! I just have a question though, how is it that you coded in my Menu event sheet yet i saw the full screen effect on another layout? My menu layout is zoomed in too much but the actual gameplay is perfect!
B
7
S
2
G
3
Posts: 12
Reputation: 2,586


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests