Skip to content

About

A browser world of student-built pygame islands — teaching materials for a two-session vibe-coding class

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Islands World

A browser world made of islands, where each island is one student's pygame game. Players walk a shared overworld and step into each other's islands to play them. Built to teach high-schoolers to vibe-code with Claude. The workshop ran in August 2026 and is over — this repo is the artifact.

overworld (white paper, black ink)          islands (black screen, white vectors)
┌──────────────────────────────┐            ┌──────────────────────────────┐
│  ╱‾‾‾‾╲          ╱‾‾╲        │            │ 20                           │
│ ╱ ROCK  ╲       ╱ BEN ╲      │   press E  │ ▲▲▲              WAVE 1      │
│ ╲HARBOR ╱       ╲____╱       │  ────────► │        ╱‾╲                   │
│  ╲____╱                      │            │       ╱   ╲      ◄▲          │
│      ▲ you                   │            │       ╲___╱                  │
└──────────────────────────────┘            └──────────────────────────────┘

What happened

Every student started from the same file: islands/_template/main.py, a 452-line Asteroids clone. Two sessions later, most of them were running something else entirely. Nobody was asked to keep Asteroids, and only one student did.

Island What the student built Lines
curie Mortal Kombat–style duel: 5 phases, each with a different robot fighting style, the landscape decaying from meadow to hell as you win 651
gardner Asteroids grown into a boss fight — 5 lives, hit-invulnerability, a shielded bullet-spray special, expiring power-ups 719
grotzer 4-lane rhythm game with hold notes, per-lane hit tones and a combo counter 506
heisenberg "God Valley" — a haki duel whose rival gets more aggressive as it loses health, with difficulty selection 620
planck Zoo security guard vs. an escaped lion that chases, pauses before biting, and has its own health bar 506
schrodinger Endless runner: a goat, double-jump obstacles, duck-unders, and a leaf you catch to fly 386
haley Asteroids, kept and extended — enemy rocks that shoot back and freeze your ship 661
kb Not a game: a rock vibraphone. Click drifting rocks to play a pentatonic scale 468
mr-b Rebuilt as a platformer — random platforms, chasing enemies, a purple bonus ledge only a big jump reaches 463
aalia Balance physics — leaning, rescue, risk-weighted scoring 680

How it fits together

Piece What it is Where it runs
islands/<kid>/ a student's pygame game their laptop (PyCharm) and the browser as WASM
islands_sdk/ submit_score() / game_over() bundled into every island
core/shell/ the overworld: map, avatars, iframe host, scoreboard the browser — the one networked, trusted client
core/server/ presence + scores a small always-on service

Islands are single-player, one fresh instance per visitor, sandboxed in an iframe with no network access. They postMessage their score to the shell, and the shell submits it. That's the whole contract.

Everything deploys from git: push to main → Actions builds changed islands → GitHub Pages.

core/shell/       overworld: map, avatars, iframe host, scoreboard, WS client
core/server/      presence + scores (Node + ws, Postgres or a JSON file)
islands/_template asteroids — the game every student started from
islands/<kid>/    one student's island
islands_sdk/      submit_score / game_over
scripts/          add-island, setup, share, update, build-islands, dev, check-*
site/             build output (gitignored)

The full design spec is in docs/islands-world-build-plan.md.


Current state

  • The static world still deploys. Push to main and Actions rebuilds any changed island and republishes to GitHub Pages. Self-contained; needs nothing running.
  • There is no server running, by design. render.yaml is a Render blueprint that stood up core/server/ — an always-on Node service plus a free Postgres instance — to carry the only two things that needed a network: seeing other players move around the overworld, and the shared scoreboard. Both were workshop features, so the services were torn down afterwards and the class scores went with them. It should be straightforward to stand a server and db up if this feature is desired.
  • The world still works without it. With no SERVER_URL configured, the shell simply never opens a socket, shows "PLAYING OFFLINE", and keeps showing your own score locally. Every island stays fully playable. Redeploying the blueprint and setting SERVER_URL (a GitHub Actions repo variable, which does not survive a repo transfer) is all it would take to bring multiplayer back.

Running it again

python3 -m venv .venv
.venv/bin/pip install pygame-ce pygbag
.venv/bin/python scripts/dev

Then open http://127.0.0.1:8787. scripts/dev --fast skips the pygbag builds when you're only touching the overworld.

.venv/bin/python scripts/check-island --all   # do all the games actually run?
node core/server/smoke-test.mjs               # does the protocol work? (needs the server up)
node scripts/check-bridge                     # does a score really get from WASM to the shell?

check-bridge is the one that matters — it drives a real Chrome, boots an island to WASM in a sandboxed iframe, and waits for a score to arrive.

Note that check-island proves an island starts, not that it works. It plays two seconds headless with nobody pressing keys, so nothing is ever shot, no rock splits, no life is lost and no run ends. Anything that only breaks on scoring or collision passes clean.

About

A browser world of student-built pygame islands — teaching materials for a two-session vibe-coding class

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages