• 2D
  • pixel art not working

guys, i dont undestando whats happening

no fullscreen

fullscreen

game window 1280*720, mode 2d. aspect keep allow hidpi: on gpu pixel snap: on

my monitor is a weird 1440*900 but i am not sure if this matters

putting the tilesheet filter on, looks a little better, but I would like to keep the pixel art style

@Zelta said:

my monitor is a weird 1440*900 but i am not sure if this matters

It does.

ah ok, I have changed tried changing the resolution to 1280 * 720 in two monitors and in both it works in full screen, but it does not work without full screen.

I'm confused, that doesn't happen to me in other games, what's the trick?

the scale difference is likely from the window decorations. Whats your window stretch mode set to?

@Zelta said: game window 1280*720, mode 2d. aspect keep

And what (edit:) if you try the other modes, including disabled?

i tried viewport but conflicts with keep

im gonna try others

edit: not conflicts, its a warning font oversampling or some like that

non vai, meu irmao not working, my bro

i tested all the modes combinations and tried setting fullscreen = on from beggining in code, nothing works

maybe adding a camera??

Ah, yes. Do try that. Then also try the other things again.

I think for 2D games you want the Window Stretch mode to be 2D with Aspect Keep Height. However, if you are using pixel art, it will be scaled (since the resolution you created the game at and the monitor resolution are different, this is unavoidable). Using filter on the textures will fix this, but result in a blurry appearance. But provided that the art resolution and the monitor resolution are not the same size (or even multiples of 2) then you will have to take special steps to mitigate this. If you can send me the project (in a PM if you want) I can probably fix it for you.

Looks like my Godot Super Scaling add-on can somewhat fix this. The problem is with uneven scaling of pixel sprites, which will always be an issue in any engine (unless you scale by multiples of 2). However, with Godot Super Scaling, you can upscale the graphics, then downscale them back to native resolution and it looks much better. Still not perfect, but it doesn't look broken.

You can download the add-on from within the Godot Asset Library in the Godot Editor. Add the Super Scaling scene to your game scene, then place all of the game itself in a new Node2D node and link that in the Super Scaling property. Be sure to set Usage to 2D and the best settings are Scale Factor 2 and Smoothness 1. And check Enable On Play. Also make sure all your images have Filter turned Off. Hope that helps.

thank you Cyb!

but i still dont understand why the engine just does not fit the black bars to the monitor resolution.

Set Stretch Mode set to 2D and Aspect to Keep Height. Those are the correct settings for 2D desktop games. However, you have to setup your scenes properly so they are resolution independent. Mostly this means putting things in Control nodes (with the proper Layout option) and doing some work to make sure things are placed properly (you can't use absolute x/y position, either rely on the automatic position, or do calculations based on current window dimensions. For example, hacked this together with your project.

bro, i just copy and paste the atomius0 script, changed the res to 1920*1080 and works like a charm, in any monitor

why godot does not do this automatic?

fullscreen:

I should be able to add integer scaling to my add-on. It would be pretty easy, and I can do it without black bars.

a year later

pixel art fullscreen still not working in 3.5.1. It's been over a year

i really like godot and try to be patient but at this point, im so frustrated

it works in godot 4?

No, they didn't add pixel perfect rendering (integer scaling). It was discussed but they didn't add it to the core since it can be done as an add-on.