Skip to content

Integer scaling settings option for pixel art and different aspect ratios. #7495

@GDDEGabriel

Description

@GDDEGabriel

Description

The problem is with the resolution scaling, basically, most engines will have multiple types of scaling:
some engines default to either a "stretch mode" which just stretches the game view to fit the window.

Others will have a "letterbox scaling" which Gdevelop does provide, which will scale the game view up until one of the sides hits a border, in which case, the other side will have a letterbox to fit window.
this is all good, but there is a problem with this method, since the aspect ratio of the game might not match the monitor's aspect ratio, this can cause quite a lot of distortion due to fractional values in the scaling.

Most engines also have a "integer letterbox scaling" that does the same thing as the default letterboxing, but floors the scaling value to the nearest integer, which makes said distortions disappear.
GDevelop does allow you to code one yourself, but most engines of the same mold ( beginner friendly, "no-code", etc... ) will have this feature by default ( except Fusion 2.5, forget that one... ).

Solution suggested

Add a "integer letterbox scaling" mode to the game settings.

Showcase of all scaling modes described above :

"Stretch" mode :

Image

"Letterbox" mode :

Image

"Integer Letterbox" mode :

Image

I could probably do it myself, but i would need to familiarize myself with the engine's codebase, that probably won't take long and is something i would like to do eventually, but i am currently out of time... lots of stuff in life...

Alternatives considered

I don't think there are any alternatives, it's quite a simple feature request... i don't think it needs one.

Screenshot of the events used to add Integer Letterbox in GDevelop :

Image

Project file used for the screenshots :

resolutionTest.zip

Final comments :

Apologies in advance if anything feels poorly worded, This is my first time opening an issue on github and all i want is this engine to succed, it is quite a good piece of software, coming from fusion 2.5, this is such a better experience!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions