Pixel-perfect scaling for bottom-screen pixelart game

Godot Version

4.5

Question

Hello,

I currently make a little farming idle game that you can see at the bottom of your screen. Example

I never made a pixelart game before. I just got myself some sprites that use 16x16 tiling. Now apparently the idea is to use a low base resolution that is true to the pixel dimension you want with a given aspect ratio. For the common gamer resolutions, those are: 640x360 resp. 320x180 and then you just scale it up. This way, we have good scaling which keeps the aspect ratio constant.

Now the question is, how I do that for my bottom game. Here’s how I thought about it:

First we fix the height of the game, let’s say it’s 1/4th the screen height. The common resolutions like 1920x1080, 2560x1440, 1366x768 (debatable), 3440x1440 (debatable) all have height’s which are divisable by 4. Note: for the debatable ones, the above base resolution doesn’t fit but it won’t fit for most so whatever.
So basically we end up with: 1920x270, 2560x360, 1366x192, 3440x360

So I guess what I can do is simply take my base resolution and also divide its height by for: 320x45 and then just scale that?

Another question of resolution: Imagine someone has a ultra mega wide monitor, those curved ones that are like 2m long. No idea what their resolution is but is it possible to just adjust the camera width so to speak? so there is no stretching?

I don’t think so,because 45 pixel is soo low for a game.You can keep the height at 180 and scale it up.

you can keep the farm in the center and maybe add fields with flowers or rivers at both of the side.

I don’t get it. It just makes zero sense. This is such a fundamental concept, there must be some in depth article here no?

What don’t you understand? Maybe I got the context wrong,can you explain what you don’t understand?

Explain it.

I think I solved it hmm

ah nice how didn’t I see that. Gonna read it

1 Like