Eject cartridge
02 SQUAD TACTICS / SHERMAN EXPANSIONv1.0.0 / MIT

DOM BattlefieldSherman Bytes, a whole platoon.

Command a squad of up to twelve Sherman tanks on a cyberpunk grid built from real page elements. Plan every wingman's route before the shooting starts, then redirect them under fire in Command mode. Breach cover, take the enemy HQ, repair at yours. It is a separate app layered on Sherman Bytes: same tanks, its own battlefield.

Coming soon Multiplayer: two players, two pages, one battle.

Created by · coded.design

24tanks on the field (12 a side)
48×30largest battle grid
<30 kBgzip for the whole app
0bytes added to Sherman Bytes
HOW IT IS LAYERED

Four layers. One borrowed tank.

  1. MODEL

    Rules with no DOM

    Maps, terrain health, squads, orders, pathfinding, aiming, combat, repairs and objectives are plain serializable data. Commands carry no elements, so the same state could one day sync over a network.

    src/model.ts
  2. VIEW

    The grid is real DOM

    Every square is an element in a CSS grid and every tank is a button. Destroyed cover changes a data attribute instead of rebuilding the board, and the camera is native scrolling.

    src/view.ts
  3. ART

    Sherman draws the tanks

    Each tank button holds a small cached canvas drawn by Sherman Bytes' own sprite code, snapshotted with its SHA-256 provenance. Battlefield adds zero bytes to the Sherman game.

    shared/sherman-sprites.ts
  4. SHELL

    One loop, a mobile cockpit

    Input, aim modes, the follow camera and the HUD share one fixed 60 Hz loop with bounded catch-up. On phones a gate holds the battle until landscape and full screen, with thumb rails clear of notches.

    src/client.ts
NERD NOTES · GITHUBHow DOM Battlefield works under the hoodControls, boundaries, budgets and release notes in the README