2.9 KiB
Thermal Snake
An infrared arcade for your terminal. Chase heat through a 22 × 13 chamber as your snake grows and the pace climbs. Thermal Snake runs entirely on the server and opens directly over SSH.
Start the server
Install Go 1.26 or later, then run this from the project directory.
go run ./cmd/thermal-snake
The server listens on 127.0.0.1:2222 by default. To make it reachable by other machines, choose a listen address and optionally set a dedicated data directory.
go run ./cmd/thermal-snake -addr 0.0.0.0:2222 -data ./snake-data
The data directory defaults to .thermal-snake/. Keep scores.db and host_ed25519 there across restarts to retain score history and the server's SSH identity. The server prints its host key fingerprint at startup so players can verify the connection.
Connect and play
Use a Unicode terminal with at least 50 columns × 23 rows. At 76 columns the chamber gains a side panel. The server accepts SSH public-key authentication. Use an existing key or create a dedicated one once.
ssh-keygen -t ed25519 -f ~/.ssh/thermal_snake
ssh -t -o IdentitiesOnly=yes -i ~/.ssh/thermal_snake -p 2222 arcade@127.0.0.1
Use the same key on later connections to keep your callsign and scores. The server assigns each authenticated key a unique callsign. The SSH username has no effect on your identity.
| Keys | Action |
|---|---|
| Enter | Launch, resume a paused run, or replay from the debrief |
| Arrows or W A S D | Steer |
| P, Space, or Esc | Pause or resume during a run |
| L / H | Open the shared rankings / your run history from the lobby or debrief |
| Tab, ← / →, R, Esc | Switch record tabs, page through results, refresh, or go back |
| Q or Ctrl+C | Exit |
Each ◆ is worth 100 points and grows the coil by one cell. Collect three to raise the heat level and speed up. The first pickup is straight ahead. The pointed head shows your direction, and × marks an impact. Shrinking the terminal below the minimum pauses the run until you resize and resume.
A wall strike, a collision with your own coil, or filling the chamber ends a run. Every completed run goes into your history, including zero scores and scores below your best. Exiting mid-run leaves it unfinished. The shared rankings show each pilot's best score. If scores tie, the pilot whose best was recorded first ranks higher.
Code and tests
internal/gameowns movement, collision, pickups, scoring, and pace. It has no terminal, network, or storage dependencies.internal/arcadeowns the Bubble Tea session, countdown and pause states, terminal layout, and records screens.internal/scoresstores pilots, runs, and bests in bbolt. Each completed run is recorded in one transaction.cmd/thermal-snakewires together Wish, public-key authentication, and the server lifecycle.
go test -race ./...