Skip to content

Play the games ​

All the games on one page →

Sixteen games written in the game language, each a single .q file in projects/, built by quantum run, replayed in CI from input tapes, and exported here by Godot 4.4.1 for the browser, Linux and Windows. The browser builds run as they are; the desktop builds are a zip with one executable inside (on Linux, chmod +x it first). The site rebuilds them from main with scripts/export-games.py. Each game's source has a page of its own (the Source column below, or View the source on the games page): every line highlighted and numbered, each tag a link to its entry in the reference, and what a tag or an attribute does shown when it is pointed at.

Each game has its options: Options on its title (or, in Robot, Drift and the RPG, in the menu Escape opens): how loud the music and the sounds are, the full screen, and the keys, each chosen by pressing it; they are kept for the next time. On a phone's browser the games show their controls under the fingers: a stick and the buttons each game needs. Keep keeps three games apart: each of Game 1, Game 2 and Game 3 starts anew or goes on where it was left. scripts/export-games.py also builds a Mac app (--preset macOS), and with the Android SDK an .apk (--preset Android); --preset iOS writes an Xcode project for a Mac to build.

Pong, Arena, Chess and Towers are played by two, on one keyboard or over the network: on the title, one machine chooses Host a game, the other types the host's address and chooses Join, and both run the same game in lockstep (PLAN_MULTIPLAYER.md in the repository says how). Bricks is played by two to four, each on their own machine: it starts as the fourth joins, or when the host chooses Start now with two or three. Siege is played by one, or by two each on their own machine: the second is the knight. The command line skips the title:

./pong.x86_64 -- --q-host=7777            # player 1 hosts on port 7777
./pong.x86_64 -- --q-join=HOST:7777       # player 2 joins

Two browsers, through a relay ​

A web page cannot host, so two people in their browsers meet at a relay: quantum relay, a small server that opens a room for each name it is asked for. Each room runs the game itself in a headless Godot that takes no seat and passes each player's inputs on to the other. A page served over HTTPS, like this site, may only open a secure WebSocket, so the relay needs a domain and a certificate:

pip install "quantum[websocket]"
quantum relay --port 443 --cert fullchain.pem --key privkey.pem

Then both players open the same link, with any room name they agree on, and choose Join on the title (the address field already holds the room):

https://quantumframework.net/games/pong/?join=wss://relay.example.com/pong/friday-night

The first to join is player 1. The relay never sees the game, only the inputs. Every second the lockstep compares the two games and reports any difference. A player who leaves (a closed tab, a lost connection) can come back: the other waits, and whoever opens the same link and joins takes the seat, catching up the game so far in a few seconds. When the last player leaves, the room closes. Without a certificate, quantum relay --port 8765 serves ws://, which is enough on a local network with a page served over plain HTTP. A desktop build joins the same rooms: --q-join=wss://relay.example.com/pong/friday-night.

Running the relay ​

deploy/relay/Dockerfile is the relay as a container. It holds Godot and the networked games, compiled when the image is built, and listens on plain ws:// on port 8080. The host in front of it gives it HTTPS. A request without a WebSocket upgrade (GET /health) answers what the relay holds, as JSON, for the host's health checks.

On Fly.io, from the repository's root (deploy/relay/fly.toml says the same):

fly launch --no-deploy --copy-config --config deploy/relay/fly.toml --name my-quantum-relay
fly deploy --config deploy/relay/fly.toml --dockerfile deploy/relay/Dockerfile
fly scale count 1 --config deploy/relay/fly.toml

The players then join wss://my-quantum-relay.fly.dev/pong/ROOM. Keep one machine: a room lives on the machine its first player reached. Any host that runs a container and terminates TLS works the same way (Render, Railway, a server behind Caddy or nginx).

To give the games page a Play online button on each networked game, set the repository variable QUANTUM_RELAY_URL to the relay's address (wss://my-quantum-relay.fly.dev). The site's next build adds the button. It makes a room of its own and a link to send to a friend.

GameWhat it isPlayDownloadSource
HopperA platformer: a world map, four levels (one drawn in Tiled), a block with a power-up, walkers to stomp, a pit, a checkpoint, spikes, a flag; the fourth with water to swim, snow that slides, a ladder and a hopping enemybrowserLinux · Windowshopper.q
KeepA top-down adventure: six rooms, slimes and bats, a sword, a key and a locked door, a switch that opens a gate elsewhere, a chestbrowserLinux · Windowskeep.q
DelveA dungeon crawl: a wall a lever opens and the skeletons that come through it, crushers, a skeleton archer, a vault two levers keep shut; alone, or two delvers over the networkbrowserLinux · Windowsdelve.q
DriftA vertical shooter: three waves from the scene's seed, drones and tanks that shoot, a boss with two phases, a high score kept between runsbrowserLinux · Windowsdrift.q
PongGodot's own Pong demo transcribed: two paddles, a ball that bounces; two players on one keyboard or over the networkbrowserLinux · Windowspong.q
BricksA brick breaker: three levels, steel bricks, bombs that break their neighbours, the last brick in slow motion; alone, or two to four paddles over the networkbrowserLinux · Windowsbricks.q
SiegeA keep under siege, seen from above: raiders in waves, an archer who aims with the mouse and charges a bolt that glances off the walls, a tower that zaps them; alone, or with a knight on a horse over the networkbrowserLinux · Windowssiege.q
CratesA box-pushing puzzle: three rooms drawn in Tiled, crates and barrels onto the pads, a foreman who talks and offers a choice, a gate the camera shows open, a key carried to a locked gatebrowserLinux · Windowscrates.q
RallyTwo cars round a circuit wider than the screen: on one keyboard the screen splits in two, a view for each car; over the network each machine follows its own; three laps winbrowserLinux · Windowsrally.q
MarchesA skirmish on a map of hexes, turn by turn: three riders hold the keep by the river against four raiders; forests, hills and marshes cost more to crossbrowserLinux · Windowsmarches.q
PandaFootA football manager after Elifoot 2, on a text screen of the DOS days: four divisions, a career from the fourth, an auction for every player, a cup drawn on screen, ratings for every match and the season's prizes; pick the eleven and the tactics, then watch the whole round live, every match in the same minute; one to four managers on one machine, in English, Portuguese or Spanishbrowser · what's newLinux · Windowspandafoot.q
CreepsGodot's "Dodge the Creeps" tutorial game transcribed: creeps from the border at random speeds, a point a secondbrowserLinux · Windowscreeps.q
TowersA tower defense: turrets that shoot the nearest dino, dinos down a road in waves, gold and a base; two builders over the networkbrowserLinux · Windowstowers.q
ArenaA one-on-one fighting game: moves with frame data, blocking, hit stun, rounds on a clock; two players on one keyboard or over the networkbrowserLinux · Windowsarena.q
ChessChess, its rules written in the language: castling, en passant, promotion, check, mate, stalemate; white and black on one board or over the networkbrowserLinux · Windowschess.q
RobotGodot's "Platformer 2D" demo transcribed: slopes and ledges, a robot that runs, jumps twice and shoots, crawling enemies, coins, lifts, a pause menubrowserLinux · Windowsrobot.q
RPGGodot's "JRPG" demo transcribed: a slime walks a grassy map cell by cell, talks, and fights another slime turn by turnbrowserLinux · Windowsrpg.q

Controls ​

  • Hopper: arrows or WASD, Space/Z/X to jump; on the map, jump enters a level. On a ladder, up and down climb; in water, each jump is a stroke.
  • Keep: arrows or WASD; Space swings the sword.
  • Delve: arrows or WASD; Space swings the sword; walk into a lever to pull it. Escape leaves the lobby.
  • Drift: arrows or WASD; Space fires.
  • Pong: W/S for the left paddle, the arrows for the right one.
  • Bricks: arrows or A/D move the paddle; Space, Up or W serves as it is let go. Over the network, Enter opens your name's box and Enter sends it; player 1 starts with Space.
  • Siege: WASD or the arrows walk; the mouse (or the right stick) aims; the left button or J shoots as it is let go, held most of a second a bolt. The knight: left and right turn the horse, up spurs it on.
  • Crates: arrows or WASD step; a click walks to a cell, or into a crate beside the worker, which pushes it; walk into the foreman to talk (up, down and Enter choose an answer); R starts the room over.
  • Rally: red W A S D, blue the arrows (over the network, each W A S D); the barrier lifts at the green light.
  • Marches: click a rider, then a hex (four moves a turn); click a raider next to a rider to strike; E or End turn ends the turn.
  • PandaFoot: arrows and Enter in the menus; F1 line-up, F2 tactics, F3 squad, F4 every player of the world (the arrows a position, Tab a division, O an order; Enter bids), F5 finances (the ground, the training center, the youth academy), F6 the transfer list (Enter bids, S puts a player of yours on it at the price you set, I in a bid pays in instalments), F7 table and top scorers (Enter on a club shows its squad), F8 history (Enter on a manager, the whole career); Enter plays the round. In it, a click (or Enter) on a match puts it in front, F3 shows both teams with their ratings so far, + and - change the speed, Space pauses (with two managers or more, a time-out) and in the pause F1 makes a substitution and F2 changes the style, Tab shows another division, C undoes an automatic change of tactics; on the results, R shows the ratings of your match.
  • Creeps: arrows or WASD; Space or Enter starts.
  • Towers: the mouse (or the arrows) points, click or Enter builds; 1 and 2 (or the wheel, or Tab) choose the turret; a click on a turret upgrades it, a right click (or X) sells it.
  • Arena: player 1 A/D, W jump, S crouch, J punch, K kick; player 2 the arrows, . punch, / kick. Hold away from the opponent to block. Down, forward, punch within half a second: the blast, felt on the other's joypad.
  • Chess: click a piece, then a square (white first).
  • Robot: arrows or A/D; Up, W or the joypad's A jumps (again in the air); Space, Z or Ctrl shoots; Escape pauses.
  • RPG: arrows or WASD walk (two at once, diagonally); walk into someone to talk; Enter, Space or a click shows the next line; in the fight, Attack, Defend, Potion or Flee.

A joypad works everywhere: the pad or the left stick moves, A jumps or selects, B cancels. Player 2 reads the second joypad.

The language they are written in ​

The tags, with every attribute, and each game whole: Games (Laboratory). Each project's README.md says what it is, and, for the transcribed ones, maps the original piece by piece and lists what the language had to grow to say it.

MIT Licensed · Built with VitePress