Graphics Should I downscale my game to 960x540 from 1336x768? Text looks noticeably worse, unsure about the scaling difference.

Retrofire

Member
So I'm in the early stages of developing my first game. it's more or less a firefly simulation environment right now. I understand that this kind of decision is best made early on... because everything is going to scale to the resolution (gui, object size, etc). I don't know enough about the subject to really cast an educated judgement.

I'm told that a game that evenly divides into a standard resolution (like 1920x1080 or 3840x2160) is going to scale better on more displays. Most people suggest it's better for pixel art, too. This would also potentially make the game easier to interact with, since there's less space occupying the screen. This is something I would consider a positive, if I could appropriately scale the objects and fonts. My problems mostly pertain to the scaling difference. The font I was using looks significantly worse at 960x540 as opposed to 1336x768. To the extent that it's just really unsightly. Objects also appear significantly bigger. But I suppose I could fix this by modifying their size manually.

Video (rendering atm)
 
Last edited:
This is what the GUI system is for. You can set the GUI layer to a different resolution than the "normal" layer and therefore have high resoluution fonts running alongside low resolution assets.
Code:
display_set_gui_size(width,height);
Let's you set the GUI layer size (docs: https://docs.yoyogames.com/source/d...e/windows and views/display_set_gui_size.html) and then when you are drawing text, draw the text in the Draw GUI Event, not the standard Draw Event. This might require some "repositioning" work (for instance, if you have a popup that stays above an instance, you might have to subtract the camera's x and y coordinates from the instances x and y coordinates to get it to display correctly in the GUI layer), but it's really the only way to have high res and low res things work in conjunction with each other.

Also, here's a good blog post explaining some of this stuff in more detail: https://www.yoyogames.com/blog/65/the-basics-of-scaling-the-gui-layer
 

NightFrost

Member
If you're going for pixelart style then even divisions are a good idea. Pixelarty style is anything where you can discern individual pixels and where that is the intent (for example, Stardew Valley). When the base game size can be evenly stretched to a display device, there are no fractional pixel sizes accumulating which would lead to certain pixel rows and columns to be slighly wider than others. I personally would prefer to create my own fonts in pixelart games as you'll need those clear sharp edges in them to fit with the style. As they'll then just scale up with rest of graphics, one can be sure they work on every resolution.

3D games of course don't need to worry about that stuff, as they run on display resolution and their polygons are drawn to that resolution. They have to worry about quality and level of detail of their textures and stuff like that.

Then there are the 2D games that try to work with display resolutions. For example Slay the Spire, Darkest Dungeon and Signs of the Sojourner. They go for more or less cartoony looks, but they are not what I'd call pixelart games. Their art assets have antialiased edges (no pixel jaggies) and in GMS terms they would have color interpolation turned on in the engine when they draw. I'm not sure how these games do it. I have a theory that they come with huge versions of their art assets and downscale them to work with player's screen resolution. Possibly building their texture pages as the game launches, after checking what the display size is, so they don't have to scale on the fly (less texture swaps too).
 

Retrofire

Member
Thank you so much. This will make everything infinitely better looking. I just did some testing and ya, you were right, my old GUI elements are not relative to the instance itself, and are being affected by the GUI size. Which makes complete sense since they are being written on a difference sized surface now. How would you go about scaling other GUI events to appear in certain places dynamically?

I haven't used any of the camera functions (correctly) yet if that's necessary. I Last time it pissed me off hah. Ridiculously convoluted. I'll have to learn it eventually though, so I'm down.
 
Last edited:

NightFrost

Member
If you want a basics-only guide to GMS cameras, here's a good one:


The only thing I'd be more verbose on is how the act of setting the size ratio between your view and the application surface is what makes GMS do scaling. That is, it takes positions in the view, scales the numbers by the ratio, and draws at that position on the application surface.
 
Top