Maintaining proportions with different resolutions

For questions about using Classic.

Post » Sat Oct 01, 2011 12:34 am

Hi, I'm designing a game at 1920 x 1080. I made the games display size automatically change to the users screen height and screen width. So other users can play at different resolutions.

I want to make the games proportions maintain consistency while running at different resolutions.

Can you help me?
B
10
S
3
G
1
Posts: 103
Reputation: 1,390

Post » Sat Oct 01, 2011 12:41 am

You might check this topic as well as this one which seems to contain useful informations related to your question.

You might also want to make a search in the construct classic forum with keywords maybe more adapted to what you're seeking.

I hope it helps.Kyatric2011-10-01 00:41:23
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Sat Oct 01, 2011 12:52 am

I will look at the information you posted. thanks.
B
10
S
3
G
1
Posts: 103
Reputation: 1,390

Post » Sat Oct 01, 2011 6:38 am

Don't know if it is exactly what you mean, but I presented a method some time ago in the old forum that works with a virtual screen. This screen is set to some value (preferably 1920x1080 in your case) and it will always display that 1920x1080, no matter what resolution or ratio the user chooses. Black bars are used on non 16:9 ratios.

last post in this thread, but the other posts might help as well
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Oct 01, 2011 9:36 pm

Thanks Tulamide. This is exactly what I was looking for. I'll try it out.
B
10
S
3
G
1
Posts: 103
Reputation: 1,390

Post » Sun Oct 02, 2011 2:44 am

It doesn't seem to be working. I'm probably doing something wrong. As I've only started learning construct.
Last edited by TunaUppercut on Fri Oct 17, 2014 6:08 am, edited 1 time in total.
B
10
S
3
G
1
Posts: 103
Reputation: 1,390

Post » Sun Oct 02, 2011 12:38 pm

I've corrected the issues and simplified the cap to better see it in action.
I have to say, you ignored almost every explanation I gave in that post and in the screenshot of the events

Never omit brackets when copying events, they serve a purpose: The order of calculations is determined by brackets. Example:
10 - 4 * 3 = -2
(10 - 4) * 3 = 18

I've put them back in.

The second issue was the missing of an inherited layer with scrollrate and zoomrate set to 0, as mentioned.

The third issue was a inaccuracy of myself. I didn't show, how the private variable 'pid' is exactly used for the aspect bars.

In this cap the window is set to 1024x768, while the virtual screen stays at 1920x1080. Your layout size is 1920x1080, too, but you may set it to any size you like.

F1 switches to fullscreen, F2 switches back to windowed. The fullscreen switch uses the current window size to determine the next best fullscreen size. So it will be 1024x768 fullscreen, presenting a virtual screen of 1920x1080.

Be aware: This method uses zooming to achieve this. You can't use magicam if you want to use it in your game (magicam also accesses the global zoom, there is currently no relative zoom option in magicam)

http://www.mediafire.com/file/kmro0jfuzdu3zvh/DynamicScaling.cap
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sun Oct 02, 2011 7:38 pm

I'm sorry I tried to follow your explanation. But I completely messed up. Thanks again for taking the time to correct my mistakes.
B
10
S
3
G
1
Posts: 103
Reputation: 1,390


Return to Help & Support using Construct Classic

Who is online

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