Rotate the layout without restarting the player's progress
Analysis
By Juliet Ramos, Playable Production Editor — 2 min read
View author profile
Rotate the layout without restarting the player's progress. A runnable teaching fixture with synthetic cases, a broken branch, and explicit untested cells.
A resize handler can accidentally behave like a new game. This fixture checks the boundary between presentation state and the player's progress when the available orientation changes.
This edition is a laboratory fixture. Node and the companion HTML page execute the authored functions against synthetic cases. No physical device panel was run, no ad network reviewed the build, and no campaign result is inferred from a passing test.
What the documentation actually supplies
MDN: orientation state is the governing reference for the browser primitive. MDN documents ScreenOrientation's change event as a notification that screen orientation changed. Receiving that event does not require an application to discard game state. The fixture policy around that primitive is ours.
The failure the fixture isolates
The input contains a score and remaining moves plus the new dimensions. The corrected branch updates the presentation fields while preserving progress. The broken branch rebuilds an initial state and loses both values. The test therefore reproduces a state-management error without claiming to rotate a physical device.
The broken branch is retained so a producer can see the exact mistake, not only the repaired output.
| Case | Input | Expected (fixed) | Broken output |
|---|---|---|---|
| mid-game landscape | `{"score":7,"moves":2,"w":640,"h":360}` | `{"score":7,"moves":2,"orientation":"landscape"}` | `{"score":0,"moves":5,"orientation":"landscape"}` |
| portrait return | `{"score":9,"moves":1,"w":360,"h":640}` | `{"score":9,"moves":1,"orientation":"portrait"}` | `{"score":0,"moves":5,"orientation":"portrait"}` |
| initial state | `{"score":0,"moves":5,"w":360,"h":640}` | `{"score":0,"moves":5,"orientation":"portrait"}` | `{"score":0,"moves":5,"orientation":"portrait"}` |
All 3 fixed-branch cases matched the spec when executed in Node on 19 September 2026.
What a pass does not prove
A passing result proves that the supplied progress survives this model transition. It does not prove that sprites, hit regions, audio or the actual host's resize events behave correctly. State preservation and geometric correctness are separate acceptance conditions; both must pass before a real playable is considered usable after rotation.
Untested cells in this edition: physical devices, host SDKs, network packaging limits, store-opening callbacks, and campaign performance. Those remain empty on purpose.
Next check on a real build
Keep canonical game state outside the layout constructor. When integrating with a browser or SDK, make resize events idempotent and test them during a drag, during a transition and on the end card. Record the state before and after each event rather than relying on a screenshot alone.
Open the runnable fixture to re-execute the cases in a browser. Download the case record to keep inputs, expectations and limits with a QA ticket.
Background in the archive: Playable ad device testing matrix and Playable spec sheet before you build. Those guides describe practice; they are not a substitute for this fixture and this check does not recertify their every claim.
Featured
Related posts
measurement
playable ads
·1 min read
Playable completers vs video viewers: downstream payer quality
measurement
playable ads
·3 min read
Stop simulation time while the document is hidden
measurement
playable ads
·3 min read
Fit the whole playable stage inside a narrow viewport
measurement
playable ads
·2 min read
Require both intersection and document visibility before advancing
More from the Measurement desk
measurement
·2 min read
Airbridge adds Amazon Ads as an app measurement channel
measurement
·2 min read
When to freeze a cohort for payback review (and when not to)
measurement
media buying
·1 min read
Using predicted LTV in bids: disclosure checklist for the UA team
measurement
media buying
·1 min read