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

Add support for viewport scaling to exported HTML #161

Open
pushfoo opened this issue Nov 8, 2021 · 1 comment
Open

Add support for viewport scaling to exported HTML #161

pushfoo opened this issue Nov 8, 2021 · 1 comment

Comments

@pushfoo
Copy link
Contributor

pushfoo commented Nov 8, 2021

Expected behavior

Near full-width scaling while in portrait orientation or full-height scaling when in landscape orientation, optionally with a tiny bit of margin left over, regardless of whether the file is used bare or as an embed for itch.io.

Actual behavior

I know the issue affects Android Chrome and Chrome's desktop mobile emulation mode. I don't have access to a recent iOS device to verify the issue on those. The game still appears to be executing rather than frozen, even if parts are cut off.

If it's troublesome to come up with a single style that works for both itch.io embed and a bare file, then a practical solution could be to make a tailored itch.io export option in the web IDE.

Itch.io uploads

Portrait Orientation

The screen's and keypad's sides are cut off when the screen is narrower than 516px. I am unsure whether this corresponds to actual pixels the units in the inspector.

Before tapping/clicking to enable the keypad:
image

After tapping/clicking to enable the keypad:
image

Landscape orientation

This seems to trigger when the screen is shorter than 480px. I am unsure whether this corresponds to actual pixels the units in the inspector.

Before tapping/clicking to enable the keypad:

image

After tapping/clicking to enable the keypad:
image

From local files

Portrait Orientation

Before tapping/clicking to enable the touchpad:
image

After tapping/clicking to enable the touchpad:
image

Landscape Orientation

This works completely fine.

@pushfoo pushfoo changed the title HTML export with Chip-8 keypad sizes incorrectly on some mobile screen sizes & orientations Add support for viewport scaling to exported HTML Nov 3, 2023
@pushfoo
Copy link
Contributor Author

pushfoo commented Nov 3, 2023

This is still relevant in 2023, but the nature of the problem has changed since itch's embed handling appears to have changed.

Example:

Vertical view Horizontal view
image image

I think there might be two steps to this:

  1. Add documentation on how to set up an itch.io page with correct browser viewport sizes (Add documentation on itch.io export issues #179)
  2. See if there are ways of dealing itch's weird viewport behavior

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