How do I make an app for different screen sizes?

Get help using Construct 2

Post » Tue Jul 25, 2017 12:56 pm

I have an created an app but when I open it after I have compiled with Cocoon or Phonegap sometimes it show zoomed out with a part of a black background and sometimes zoomed totally in and I or the user is not able to see anything . How do I fix this?
The problem is the way I have built the app or the way I have compiled it ?
Please help , I have seen tutorials but they are about maintaining aspect ratio and that requires to build my game from the beggining . I want an option that can totally stretch my app sprites , texts and background , stretch it totally . Please help , sorry for being this impatient.
Thanks!
B
8
S
1
Posts: 75
Reputation: 554

Post » Wed Jul 26, 2017 1:29 am

Scaling an app to different screen sizes is a bit of a pain - especially when crossing different aspect ratios.

You will need to set your scaling mode to letterbox to ensure everything fits on any screen, but at the cost of having ugly black bars down the sides or along the top and bottom.

I made a small prototype project that allows dynamic scaling to any screen size and aspect, but you have to position all objects in the layout using a set of 4 global variables (the vars change depending on the canvas size, which in turn changes to suit whatever window size is detected).

I'm at work at the moment, so I can't link you to the file in question - but send me a PM if you like and I will try to remember when I get home to send you a link. I did post it somewhere already on the forums here, but I can't remember the thread title! LOL. If I can find it, I will come edit this post and put a link there.

*EDIT*
Found it - DOWNLOAD

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Wed Jul 26, 2017 12:46 pm

If you don't want to rebuild your game it's very difficult. Try with different "Fullscreen in browser" options to see if this helps. Next time, take a look at this amazing tutorial by Fronne https://www.scirra.com/tutorials/1126/m ... le-devices
B
21
S
6
Posts: 154
Reputation: 1,715

Post » Wed Jul 26, 2017 6:59 pm

@ChesVCF is it very difficult or impossible ???
B
8
S
1
Posts: 75
Reputation: 554

Post » Wed Jul 26, 2017 11:10 pm

Very difficult. Just try to follow the steps on the tutorial I posted and move all the objects accordingly, so that everything can work fine. I know it's very annoying, but, as I said, it is difficult.
B
21
S
6
Posts: 154
Reputation: 1,715

Post » Thu Jul 27, 2017 9:40 am

@ChesVCF can you give me a construct 2 project file of that tutorial because I followed it but it doesn't center my game and cuts everything after the small gray lines . And I also want to make it the y cordinates shorter and in the tutorial it is very long which is unneccesary for my game .Please help .
B
8
S
1
Posts: 75
Reputation: 554

Post » Fri Jul 28, 2017 9:42 am

@ChesVCF Can you please help me? I can give my project files. I know you have dealt with the same problem . I ve seen your threads. Thank you!
B
8
S
1
Posts: 75
Reputation: 554

Post » Fri Jul 28, 2017 10:57 am

@istero I referenced you to an answer on StackOverflow, try to follow this answer if it helps. I didn't. What I did was to let my game as it was (it was designed for 16:9 screens, so black bars only appear on more "quadratic" screens with an aspect ratio like 4:3, which are a minority over the 16:9 devices).
B
21
S
6
Posts: 154
Reputation: 1,715

Post » Fri Jul 28, 2017 11:16 am

So you are saying to me that there is no solution to the black bars ?! Construct 2 should really fix this huge problem .
About the difficult way can you give me an insight of how to do it , I followed the tutorial but faced some problems . I am willing to build from the beggining my app only to not see those ugly black bars. I have seen a lot of Construct 2 games without black bars on Play Store .Really great and popular games!

Also the StackOverflow that you linked me was about the KeyboardProblem and I didnt had that problem , I had the screen sizes problem.

Anyway , I really appreciate you taking the time to answer to my thread . Sorry if I am becoming annoying which I know I am.
B
8
S
1
Posts: 75
Reputation: 554


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, newt and 25 guests