0 votes

I'm making a 2D pixel art game, and am having trouble getting it to scale properly to 1080 resolution. The default resolution is 640 x 360, but when I enter fullscreen mode on my 1920 x 1080 monitor, the pixels aren't to scale properly, even though it should scale cleanly by 3x.

I have adjusted the appropriate project and image settings to ensure pixel-perfect scaling. My stretch mode is in viewport, aspect is keep, I have changed the image import settings to 2D pixel and disabled mipmaps, filtering, and anti-aliasing where possible.

It is probably worth noting that I have no problems when I set the resolution to 1280 x 720 - it's super crisp and looks great - the issue only appears when running it in fullscreen on my 1920 x 1080 monitor.

I am new to Godot, so I am hoping it's something simple and obvious that I've missed? Thanks!

Godot version v3.2.3
in Engine by (12 points)

1 Answer

0 votes

Hello. Did you check your test width and test height, located just beneath your resolution settings in project settings? It should be set to a multiple of your actual resolution

by (20 points)

Hiya! Yeah, I've tried it on 320x180, 640x360, 1280x720 and Fullscreen 1920x1080 - with resolutions of both 320x180 and 640x360. Usually keep it on 1280x720 for testing, where graphics scale just fine.

Hi again. My apologies for the delay. I went to sleep after my post. So, it only seems to not resolve correctly in fullscreen, which is 1920x1080 on your monitor. In this case, you actually have "Fullscreen" checked in project settings and also your test width and test height set to 1920x1080? When you say that the pixels "aren't to scale properly", you're actually seeing the pixels being distorted and not square? I'm trying to recreate the issue on my end.

No problem! :)

And yes, the squares are distorted, and I think slightly blurry - as if scaling to some other resolution that it doesn't quite fit into. It's most noticeable with text, with a lot of individual pixels scaling to 2x3, rather than 3x3.

I've tried it with a test width of 1920x1080 in Fullscreen, and with a test width of the smaller resolutions which I then make fullscreen in-game with ' OS.window_fullscreen '. Both yield the same distorted results.

I'm still trying to get similar results over here, but haven't just yet. When you set the game resolution and test resolution to 1920 x 1080, but do NOT have "Fullscreen" selected, do you get the same result? I wasn't quite clear on that part. One thing to check is that your Windows > Settings > Display > Scale and layout is set to 100%. I'll keep trying over here, just so you know.

Yup, tried it with and without Fullscreen enabled, same results on both.

And I'm not sure what setting you mean? I've had a look and there doesn't seem to be a category for Scale anywhere in the Project Settings? I managed to find a 'Display Scale' option in the Editor Settings, which was on Auto, so I changed it to 100% just to check, and there was no change.

Oh, I'm sorry. I meant your actual Windows OS settings. I was assuming that you're running on Windows. But since it's acting the same both at that resolution alone and also with Fullscreen selected, it's probably not the issue.

Ah! Of course! My bad XD

And yay! That's sorted the problem! Changed it from 125% to 100% and it works like a charm. Thank you so much! Was hoping it would be something simple that I had overlooked - probably should have remembered this sooner really aha, it's caused me trouble in the past.

One question though - do you know if this would still be an issue on other peoples' displays if I exported the game? Or is it just an editor issue? 125% scaling seems to be the default these days, and I wouldn't want it causing problems.

Either way, this has definitely explained and resolved the main issue - so thanks again!

I'm glad that helped. No problem at all :) I've had that issue with other things in the past.

As far as how your game will display on other monitors scaled at 125%, I'm not sure. You could always export and test, but I think that it will be an issue as it stands. I'm guessing that you'll have to implement some sort of letterboxing. I am not positive on that, though.

I hope you can get that one answered. Best of luck!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.