-
Notifications
You must be signed in to change notification settings - Fork 966
Integer scaling settings option for pixel art and different aspect ratios. #7495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
These modes are quite common and missing. The idea is to enlarge the game zone until there's no black bar at all. But on the other hand, the game could be cut off at the top and bottom as in the image bellow, or on the sides. |
I think the current "Extend or Crop" modes added last year would account for these, correct? |
I never used these so i wouldn't know... I didn't mention these because i was unsure if that was the case. |
Sorry, was explicitly replying to Bouh's comment, not your overarching ask. I actually think a lot of your ask may be accounted for by this PR from Davy, though: #7494 |
Not really, in fact, that PR was exactly the reason i made this issue, it solves the same issue in a different way. I was just answering your answer, it didn't really have anything to do with my comment, but i was interested is all. |
I had made a similar post some years ago :D |
Honestly, that's a shame... yours even has another type of scaling! |
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 :
"Letterbox" mode :
"Integer Letterbox" mode :
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 :
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!
The text was updated successfully, but these errors were encountered: