Skip to content

feat: Add UI scaling using GameTools#251

Draft
Noojuno wants to merge 3 commits intochickensoft-games:mainfrom
Noojuno:ui-scaling-gametools
Draft

feat: Add UI scaling using GameTools#251
Noojuno wants to merge 3 commits intochickensoft-games:mainfrom
Noojuno:ui-scaling-gametools

Conversation

@Noojuno
Copy link
Contributor

@Noojuno Noojuno commented Nov 19, 2025

No description provided.

@jolexxa
Copy link
Member

jolexxa commented Nov 20, 2025

Thank you, this is awesome.

I think I figured out why the sizing is weird. You can see this discussed over in godotengine/godot#77149. If I'm reading this right, it sounds like the display scaling expert Calinou is saying that viewports don't really get resized for you because the dev is supposed to have control over the resolution at which a viewport sizes itself. Which makes sense for performance considerations.

We can probably introduce a solution like the one shown here or generalize it in GameTools to help assist projects which are using viewports. I would imagine a general solution will be tricky, so we might start with a simple script here and then generalize later once we test the game demo on each platform. Then, a future PR could leverage any improvements we make to GameTools.

@jolexxa
Copy link
Member

jolexxa commented Nov 20, 2025

Looks like this workflow got hung up due to the recent change in Chickensoft.Platform 😨 xrandr is the tool it uses on Linux to determine display scale size, but it's apparently not available in the headless Ubuntu environment. We may need to make the GitHub workflow run tests on Windows or macOS (which are slower) :/ — or find a way to emulate xrandr on the Ubuntu runner.

@wlsnmrk
Copy link
Contributor

wlsnmrk commented Nov 20, 2025

To fix the test failure, add x11-xserver-utils to the list of packages installed in the "Install Graphics Driver Emulators" step at line 54 of the visual_tests workflow. See my branch.

(Note: xserver, not server)

I'd have made the edit myself, but ran into this issue with maintainer edits on LFS-enabled repos and didn't feel like chasing down a workaround.

Added `x11-xserver-utils` to the packages installed in the visual_tests workflow. This installs xrandr and allows Chickensoft.Platform to determine the resolution of the virtual screen during tests.
@wlsnmrk wlsnmrk closed this Nov 20, 2025
@wlsnmrk wlsnmrk reopened this Nov 20, 2025
@wlsnmrk
Copy link
Contributor

wlsnmrk commented Nov 20, 2025

Went ahead and made the edit to get tests passing; had to do some fighting to get GH to re-run the workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants