How do I make a layout view that adapts to screen size?

Get help using Construct 2

Post » Sun Aug 02, 2015 8:55 am

Hi everyone!

I'd love it if someone could provide some help with how to make a layout view that automatically adapts to the player's device's screen size. (Say for example on a phone the view is 100x500, or 740x480 on a desktop, etc, etc).

Further to that, I need to know how to make sprites position relative to this adaptive view. I have some objects that form a HUD, and they're on a layer with a paralax of 0, however I'm not sure if their positions would work with every screen size, if you get what I mean.

Any help is greatly appreciated! :D

Regards,
Gideon
B
10
S
1
Posts: 72
Reputation: 1,014

Post » Sun Aug 02, 2015 9:03 am

Using fullscreen in browser crop and setting scale on the layers that need it, it's actually not that hard to achieve, depending on what your game needs offcourse..

I've been working on/with adaptive layouts since I started this app:

WatIsOpen

It works on all devices from the smallest iPhone to the largest Desktop.
For my new app/game I'm improving upon this by adding maximum/minimum width and height and scaling..
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 » Sun Aug 02, 2015 11:09 am

Thanks for you help! So If I set the fullscreen scaling to crop, does that mean that any sprites I have with zero parallax have their position set relative to the size of the view?

What I'm trying to construct is a border around the view that surrounds the view, regardless of it's size/shape on any device.

Thanks so much @LittleStain ! :D
B
10
S
1
Posts: 72
Reputation: 1,014


Return to How do I....?

Who is online

Users browsing this forum: Phacanu, sanjeev19jha and 7 guests