Hi!

When resizing the window of my game the game doesn't sit flush against either the top and bottom or sides and larger than necessary black borders appear.

Here is a video showing the issue better than I can describe it.

I'm using Godot 4.2 and I have the following settings for Project Settings > General > Display > Window:

  • Viewport Width: 640

  • Viewport Height: 360

  • Window Width Override: 2560

  • Window Height Override: 1440

  • Stretch Mode: canvas_items

  • Aspect: keep

  • Scale: 1

  • Scale Mode: integer

I've downloaded other games that have these settings and they don't appear to snap like this one and the content typically keeps its aspect ratio whilst filling the width or height of the window rather then snapping further into the window than necessary.

I've tried setting stretch mode to viewport which is recommended for 2d pixel art games but the issue still persists and movement of my character becomes blurry so I've stuck with canvas_items.

Thanks for any help you can provide!

    davgothic strange. I use these settings in 3.5 and I'm not getting the problems you are. Everything is 16:9 too.

    One, check to see if you imported graphics with filters. This is often automatically turned on for 2D textures, it could just be an importing thing. (You can also save this setting OFF as default if that's your problem)

    From the docs, it looks like you may want to try Viewport mode on Stretch Mode vs Canvas_Items, if the graphics on the docs are correct.