Creating a resolution aspect ratio for widescreen/normal scr

For questions about using Classic.

Post » Sat Dec 05, 2009 9:54 pm

I already caught Drule in chat but I will post my solution here in case anyone else wants to check it out.

It turns out that this was much more painless than I though... apparently you don't even need to bother with checking the aspect ratio at all!

If the resolution for your game is 320x240 then Construct will pick the lowest resolution available when you go to fullscreen. For most modern monitors that will be 800x600.

All I did was this:



And it just worked. Widescreen monitors will show your game 4:3 centered in the middle with black on either side. This uses Unbounded Scrolling on a 320x240 game. The clamp() expression is necessary to scroll to the proper location because when you zoom layers like that then the scrolling goes all funky (if it's not unbounded then your player goes off the screen, and if it is unbounded then your player is always centered and you can see outside the layout). Anyway, the clamp() thing fixes it.

If you want to fullscreen a letterboxed 16:9 game on a 4:3 monitor though, that's a totally different story :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Dec 05, 2009 10:02 pm

Lol, so after all the problems, blood, sweat and tears, that's it? That's the solution? Awesome haha.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Dec 05, 2009 10:06 pm

To be fair, the last time I attempted this was a long time ago on a much older version of Construct, and I was expecting to have to do the same sort of stuff now. Guess not, though.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Dec 05, 2009 10:09 pm

[quote="deadeye":341knyx5]To be fair, the last time I attempted this was a long time ago on a much older version of Construct, and I was expecting to have to do the same sort of stuff now. Guess not, though.[/quote:341knyx5]
Well it works so yay. Now, about that making a widescreen game work on 4:3....... ;)
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Dec 05, 2009 10:17 pm

I just don't understand what it was that was causing Drule's game to stretch... I couldn't even get mine to stretch even though I was trying to.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Dec 05, 2009 10:38 pm

[quote="deadeye":d7htde8q]I just don't understand what it was that was causing Drule's game to stretch... I couldn't even get mine to stretch even though I was trying to.[/quote:d7htde8q]

I can't say for sure but I got the impression he was trying to make it fill the whole screen no matter what resolution is used, but without extending the playing area to compensate. I personally wouldn't mind black bars at either side (or a tiled background, or even the name written down the sides in a fancy text), they wouldn't even be that wide really, and besides doing the thing I mentioned in an earlier post. You could use that extra space for the old Arcade machine look, when some of them had fancy overlays around and sometimes over parts of the screen to make them look nicer back when the graphics weren't that hot. I think Space Invaders did that for sure. Crazy thing is, it worked great too lol.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests