Skip to content
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

Minor WebGL/Emscripten resolution issue #297

Open
StarWitch opened this issue May 8, 2021 · 1 comment
Open

Minor WebGL/Emscripten resolution issue #297

StarWitch opened this issue May 8, 2021 · 1 comment

Comments

@StarWitch
Copy link
Member

The Emscripten build is mostly looking good, but there's a couple of issues I've noticed with the resolution setting:

  1. At launch, the default resolution has the game go off the screen. This can be fixed by accessing settings and manually changing the resolution (somewhat). (See 1st screenshot.)
  2. When changing the resolution, the available settings seem a bit limited, and the default ones available tend to make the game pretty small on the screen. (See 2nd screenshot.)
  3. Flipping "Fullscreen" on and off tends to not work, and/or distort the display area of the game. Basically, it seems to lock to resolution to the "overscanned" behaviour of the first screenshot permanently. It might be worth disabling that for WebGL and letting the browser itself handle fullscreen.

Screenshots are of Safari on macOS (with the "experimental" WebGL 2.0 extension enabled), but the behaviour is the same on iPadOS, and also with Firefox on macOS. I also tested with Firefox on Ubuntu and it seemed to have the same behaviour.

Again, these are pretty minor issues, and the game plays fine otherwise (even on iPad!).

image

image

@Akaricchi
Copy link
Member

1 and 2 may be a high-DPI UI scaling specific problem. Have you tried it on a low-DPI/unscaled display? I couldn't reproduce it without scaling on both Chromium and Firefox (Linux, Wayland); haven't tried scaling yet.

Fullscreen seems to work fine for me in Chromium, but has a really weird tri-state behavior in Firefox. It feels like the game and the browser both try to interpret the F11 key and conflict with eachother.

It might be worth disabling that for WebGL and letting the browser itself handle fullscreen.

Might be a good idea, but requires writing some JS to detect fullscreen and size the canvas appropriately & inform the game. Not high on my priority list for now, so patches welcome.

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

No branches or pull requests

2 participants