open-duelyst / duelyst

Duelyst is a digital collectible card game and turn-based strategy hybrid, developed by Counterplay Games.
Creative Commons Zero v1.0 Universal
3.62k stars 556 forks source link

[P0] Viewport / screen rotation should be disabled on Mobile #221

Open willroberts opened 1 year ago

willroberts commented 1 year ago

Summary

The game should always operate in landscape mode. However, mobile browsers support screen rotation. Since this results in a viewport changed (and a forced app reload), let's disable screen rotation.

Impacted services

Steps to reproduce

  1. Open https://staging.duelyst.org in a mobile browser
  2. Rotate the device

Environment information

KenAKAFrosty commented 1 year ago

A UX note: We should allow, encourage even, portrait mode for the login screen, or anywhere where typing is needed.

Once a text input is engaged and the mobile keyboard expands, there's VERY little screen real estate left when in landscape mode. Makes logging in an act of faith.

But otherwise I'm fully behind the idea that when playing the main app, landscape mode is locked in 👍

Related (dont know another good place for this right now): Consider us setting frame rate default to 30 on mobile. It runs a bit rough right now on mobile when playing (I'm on a Google Pixel 3. Not brand new but still a pretty solid device). This may be an easy win for that. Similarly, default to medium quality on mobile perhaps?