Skip to content

0025. Arcade template, touch controls as data, responsive play

  • Status: Accepted 2026-11-29 (Phase 5b; owner decisions 2026-11-29: a vertical space shooter, touch controls as data in game.json, an expand scale mode, high scores kept per player in saves)
  • Date: 2026-11-29
  • Phase: 5

Phase 5b adds the third genre and makes games comfortable on phones. Since Phase 3, published games have had basic on-screen buttons from a code plugin (left/right plus a few buttons). Games render at one fixed resolution, and letterboxing makes them small in portrait.

  • Arcade kit, as data.

    • Scene waves: timed groups of a prefab, entering in a formation along a path.
    • Mover: line, sine, zigzag and dive paths.
    • Shooter: bullets from a prefab, fired automatically or while an action is held, aimed down, up or at the player, with a spread.
    • Score: points to a counter when the entity is defeated.
    • Offscreen: despawns entities that leave the view; KeepInView keeps the player’s ship on screen.
    • A recordBest action keeps the highest value of a counter in the player’s saves (best.<key> binds it). Platform cloud saves are used when signed in; shared leaderboards stay in Phase 6.
  • Template. templates/arcade: an original vertical space shooter with art and sound made in code, waves, power-ups, lives, score, a high score, and a bot that clears the waves in a headless test.

  • Touch controls as data. A touch section in game.json:

    • a virtual joystick (fixed or floating) bound to one or two axis actions;
    • buttons bound to actions;
    • a pause button;
    • positions by screen side.

    When the section is missing, defaults come from the input actions:

    • two move axes give a joystick;
    • one move axis gives left and right buttons;
    • jump, fire, interact and the like become buttons.

    Controls show only on touch screens (or with ?touch). Joystick and buttons write into the input system like a gamepad, so games need no changes.

  • Responsive play. A new scale mode, expand. The design height stays, and the view widens or narrows between minWidth and maxWidth to fill the screen’s shape, so the camera shows more or less world. The HUD and menus anchor to the real edges and follow resizes and rotations. orientation (any, landscape, portrait) shows a “rotate your device” hint when the screen does not match.

  • Brick breaker or endless runner: fewer new reusable pieces.
  • Touch controls in each game’s code: invisible to the AI and the editor.
  • Letterbox only: small games on phones.
  • The view width can change at runtime. Systems read it from the Viewport resource instead of keeping it from the start.
  • More components and a scene field to document for the AI.
  • Scenes without a follow camera centre on the design area, so a wider expand view shows more on both sides.
  • Shooters give their bullets a physics body (overlaps need one), so bullet prefabs need only a trigger Collider.