How do I see outside the layout

Get help using Construct 2

Post » Wed Jun 17, 2015 12:44 am

Hi there!

I’m looking for a simple and smart way to auto-size my game on different devices. So, the game is primarily designed for iPhone 5 and up which means the game is built on a resolution of 640x1136, and is in portrait. When played on higher resolution devices of the same aspect ratio, such as the iPhone 6+, everything scales up fine.

The problem is with iPads since they have a wider aspect ratio, and while the game still scales to fill the screen as much as possible, there’s black bars by the sides of it.

Here’s my solution, but I don’t know if it’s possible since whatever I tried so far hasn’t worked. Without changing the resolution of the whole game (since that’s going to break everything and require time I don’t have), I’m wondering if these black bars on either side of the game can be removed, revealing a sprite behind them (placed outside of the layout) which looks like an extension of some buttons, and can be tapped on. So whatever width greater than 640, the game will automatically scale up to fill the screen and reveal part of this sprite.

Here’s a basic diagram to help visualise what I’m trying to explain:

https://www.dropbox.com/s/5pnqco54w12s4 ... m.jpg?dl=0

So imagine it like a pinball table (which the game isn’t!). You see inside the all of the table when at aspect ratio of iPhone 5 and above. But when the aspect ratio is wider, you see outside of the table (the floor/walls etc.). Hope that makes sense :D

With this idea, I don’t see a need to detect the device width and manually resize the game and shift all the sprites across by X. I’m actually hoping I won’t even need to touch the code! I figure if it’s doable it must be something to do with the “window”, “layout”, “margins” settings etc. so that when the game scales up automatically, the back bars are not shown, instead it just sees outside of the layout (so I don’t have to change positions of any sprite in the game based on the device width, which is a massive undertaking…).

Off to sleep now but will check the thread tomorrow!
B
9
S
2
G
1
Posts: 19
Reputation: 660

Post » Wed Jun 17, 2015 3:26 am

You need to scale the game slightly oversized. Check out this tutorial my help. https://www.scirra.com/tutorials/998/screen-resolution-for-mobile
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Sun Jun 21, 2015 8:29 pm

TheDom wrote:You need to scale the game slightly oversized. Check out this tutorial my help. https://www.scirra.com/tutorials/998/screen-resolution-for-mobile

Sorry for the late reply, but thanks for that link! It was not the video itself that made it work, since that required changing the size of the layout which can't really be done this late into development without costing a lot of time. But one of the comments! I simply changed Unbounded Scrolling to Yes on all layouts and FullScreen in Browser to Scale Outer, and magically, it worked!
B
9
S
2
G
1
Posts: 19
Reputation: 660


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests