Aspect Ratio and Pixels

U

UrbanM

Guest
I'm developing a retro RPG in GameMaker that uses pixel graphics.
The game was designed to have an aspect ratio of 4:3 with a small number of pixels to match the classic style.
The result was a display area that is 448px wide and 336px high.

What I hadn't accounted for was the sheer variety of screen sizes and resolutions available.
The default settings displays the game at it's maximum scale, which is either x1, x2, x3 up to x8.
My problem is, is that the variety of displays available mean that on some displays, the game can be too small.

Displays of 1920x1080 automatically get x3 (1344x1008)
Which is the intended size.

Displays of 1280x1024, or many types of Laptop automatically get x2 (896x672)
Which is too small to enjoy the full experience.

My question is:
  • Games like Undertale, Starbound and FTL: Faster than Light scale to full screen while still being pixels, how to they do it?
Early mock ups of the Game's User-Interface




 
Last edited by a moderator:
S

Shariku Onikage

Guest
Code:
if keyboard_check_pressed(vk_f4)
   {
   if window_get_fullscreen()
      {
      window_set_fullscreen(false);
      }
   else
      {
      window_set_fullscreen(true);
      }
   }
I'm guessing that's exactly what Undertale's fullscreen code is.

Controlling aspect ratio beyond that can be a complex task. There's a good starter guide on Yoyogames main blog here that should give you some idea of what to do.
 
Last edited by a moderator:

RangerX

Member
Its really hard to tell how Undertale does it. I would have to buy the game because you can never trust screenshots and movies.
BUT if I am to trust screenshots that I did look at, per example one apparently taken in a 1366x768 monitor, the game is scaled up grossly and not even "pixel perfect". They simply checked the "keep aspect ratio" box and called it a day.
(see my scaling thread in the tutorial section if you want, we were just discussing that)
 
U

UrbanM

Guest
Its really hard to tell how Undertale does it. I would have to buy the game because you can never trust screenshots and movies.
BUT if I am to trust screenshots that I did look at, per example one apparently taken in a 1366x768 monitor, the game is scaled up grossly and not even "pixel perfect". They simply checked the "keep aspect ratio" box and called it a day.
(see my scaling thread in the tutorial section if you want, we were just discussing that)
I'd read your Scaling thread. It was very informative.
I've also read the yoyo blogs 65-66.

I was thinking of changing the size to 640x480.
By default it'll be x2 pixel perfect upscaling, but I'll have the option in the menu for automatic 'keep aspect ratio' upscaling, similar to what Undertale has.
Unless I find a better solution...

Example of new aspect ratio & size.

 

JackTurbo

Member
You'll always get weird edge cases due to the myriad of different devices out there with different sized displays.

The best you can do is optimise for the most common resolutions within your target demographic/target platform and then do your best to minimise the impact on the experience for everyone else (which will always involve some level of compromise).

The way you tackle this is up to you, if with scaling, letter boxing or more likely a combination of the two.

If you're aiming for a desktop release, thankfully we have a great resource for checking out stats related to display resolution in the form of the Steam Hardware survey.
http://store.steampowered.com/hwsurvey

Here we can clearly see that 2 resolutions account for the vast majority of windows based users.
1080p @ 38%
and annoyingly:
1366 x 768 @ 25%
I say annoyingly because 1366 x 768 is actually 1px off being 16:9.
 
U

UrbanM

Guest
You'll always get weird edge cases due to the myriad of different devices out there with different sized displays.

The best you can do is optimise for the most common resolutions within your target demographic/target platform and then do your best to minimise the impact on the experience for everyone else (which will always involve some level of compromise).

The way you tackle this is up to you, if with scaling, letter boxing or more likely a combination of the two.

If you're aiming for a desktop release, thankfully we have a great resource for checking out stats related to display resolution in the form of the Steam Hardware survey.
http://store.steampowered.com/hwsurvey

Here we can clearly see that 2 resolutions account for the vast majority of windows based users.
1080p @ 38%
and annoyingly:
1366 x 768 @ 25%
I say annoyingly because 1366 x 768 is actually 1px off being 16:9.
That's really useful, thank you.
It looks like I'll have to form a compromise.
The demographic information comes in handy, I'll use it as best I can.

It might mean people with weird sized monitors might have to deal with automatic scaling or small letterbox display.
Also, saw you where getting involved with Games Jam in Bristol. I'm a local :)
 
Top