A game is easier to judge and to play without the editor around it.
The Game tab and the game link now both have a button that puts the
game view itself into fullscreen, not just the browser window.
- The Game tab header has a fullscreen button on the right. It hides
toolbar, panels, tab headers and console and keeps the zoom from the
picker. A running game keeps running.
- A corner button at the top right, or Esc, leaves fullscreen and puts
the view back into the tab where it was.
- The game link shows the same corner button. Over a running game it
hides after 2 s without mouse movement and returns on the next move.
- A click on the corner button never reaches the game.
- Stop ends fullscreen. Stop switches back to the Scene tab, and any
switch away from the Game tab ends fullscreen, so no empty screen is
left behind.
- src/viewport/fullscreen.ts wraps the Fullscreen API and holds the
rule for when the button shows. FullscreenCorner.ts is the button
used by both pages. Two SVG icons are new.
- Editor.showGameFullscreen moves the GameViewport into the root while
fullscreen is on.
Tests:
- ./check.sh: 195 files, 2815 tests, exit 0 (3 new unit tests).
- e2e 60: 2 new checks for the corner button on the game link.
- e2e 61 (new): 4 checks for fullscreen in the editor.
- Full e2e run (local): ALL PASSED, 1580 checks.
- Counter-checks fail as expected: rule without "no game running",
no stopPropagation (60h), no end on tab switch (61c), no reparenting
of the view (61a).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The released game only ever zoomed in whole steps up to 400%, so a
small camera on a large screen stayed far smaller than it could be.
The "Click to play" caption was drawn in the 11 px panel title size
and was easy to miss.
- GAME_SCALE_STEPS gains 300%, 500% and 600%. The game tab picker,
Auto in the editor and the game link all read the same list.
- The start caption takes its size from the new Theme.captionSize
(16) instead of a constant in GameScreen.
- The player page keeps the default arrow cursor at all times. It no
longer switches to the hand over the caption.
Tests:
- view.test: Auto for 320x180 in 2000x2000 is now 6, with cases
for 3 and 5. play-settings.test takes 2.5 and 8 as invalid steps.
- e2e 60 checks the caption against the panel title size and the
arrow cursor before and after the start. Module 03 follows the new
step list.
- ./check.sh 2808 tests, CHECK EXIT 0 (before the last Theme tweak,
which changes no test). Full e2e run ALL PASSED, 1574 checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A project could only be played inside the editor, behind the login.
To show a game to someone else there was no way short of an account.
A release freezes the saved project under a random token and serves
it on a page that holds nothing but the game view.
- Menu -> Release... opens a dialog with the state of the release,
the link with Copy link and Open, Publish or Update release, and
Take down behind a confirmation.
- Publish saves first and refuses while anything is unsaved, like
snapshots. Updating keeps the link. Take down kills it, and a new
Publish hands out a new token.
- The link is play.html?game=<32 hex>. The page needs no session,
paints Theme.colors.background, zooms with Auto and waits for
"Click to play" so that sound and keyboard focus are allowed.
- The game always starts in the start scene. Persistent variables
are stored per link in the browser. Plugins are not loaded, and the
dialog warns about them and about a project without a scene.
- GET ?r=releases/{token} is the only route besides auth/* that works
without a login. The public answer carries the token as project.id,
so the project id stays hidden. Release files are written with 0640
and nginx does not serve them directly (measured 403).
- Starting, the frame and Load scene moved into runtime/GameRun.ts.
Play in the editor and the play page run through the same code.
- WorldViewport moved to src/viewport/ and no longer needs the
EditorState. Pointer forwarding (gamePointer.ts) and setting up
textures, fonts and sounds (projectFiles.ts) exist only once.
- Vite builds two pages. The play page loads 4 kB of its own code
plus the shared chunk (Pixi, runtime, drawing, 653 kB) and Rapier,
without the editor.
Found on the way, not fixed here: data/projects/<id>.json answers 200
without a login because the files are 0644.
Tests:
- ./check.sh: 194 files, 2808 tests, exit 0.
- tests/php/releases.test.php: 20 checks, also added to CI.
- New e2e module 60 with 10 checks, played in a browser without a
session. Module 46 counts the menu entries and was updated.
- Full e2e run: 1572 checks passed.
- Counter-checks: 3 unit, 2 PHP and 3 browser mutations all fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>