A perpetual peer-to-peer life-sim. You're a worm in a 2D meadow. Eat dots to grow. Crash into another worm and you die. One move per worm every five seconds.
No backend. No accounts. No servers. Players gossip moves directly over Hyperswarm. The game state is just an append-only log of signed moves; everyone runs the same deterministic world simulation.
pear run pear://d1xbkcpcbi1xa8dexp49rsendra5r67w3qh5a9k8t44oemm4k16y(Pinned on the HiveRelay network for 24/7 availability — the game is reachable even when no individual player is online.)
- Pear app — Bare main process plus a Chromium renderer via
pear-electron - Multiplayer over Hyperswarm — peers discover each other through the DHT, gossip moves on a drive-derived topic, exchange Ed25519-signed entries
- Detects PearBrowser Desktop — when running inside PearBrowser v0.3+, uses
window.pear.swarm.v1directly. Outside PearBrowser, it falls back to single-player local mode - Saturday-morning-cartoon aesthetic — pastels, sun with a smile, gentle synth pad
┌──────────────────────────────────────────┐
│ Chromium renderer (ui/) │
│ - canvas2d game loop │
│ - signed move entries │
│ - identity.js (ed25519 keypair) │
└──────────────┬───────────────────────────┘
│ pear-bridge pipe
│ { kind: 'join'|'leave'|'broadcast'|'send', ... }
│ { kind: 'peer'|'message'|'peer-leave', ... }
▼
┌──────────────────────────────────────────┐
│ Bare main (index.js) │
│ - Hyperswarm (lazy) │
│ - peer connection multiplexer │
│ - drive-derived topic │
└──────────────────────────────────────────┘
Hyperswarm is lazy-loaded so any native-module surprise crash happens after the window opens — the game stays playable in local mode rather than failing at boot.
index.html page shell, viewport, mount point
index.js Bare entrypoint — pear-electron runtime + lazy swarm
ui/
game.js wires identity + network + world + renderer
network.js peer gossip
identity.js ed25519 keygen + localStorage + backup/import
schema.js canonical signing helpers
worm.js client Worm: rendering + interpolation + color
world.js tracks worms + food, applies entries, deterministic seeding
renderer.js Canvas2D draw routines
input.js keyboard + touch + cooldown gate
audio.js synthesized SFX over WebAudio
config.js biome key + tuning constants
style.css saturated 90s-cartoon aesthetic
landing/ static landing page (for direct hyper:// browsing)
No build step. Pure ES modules. The only runtime download is @noble/ed25519.
npm i -g pear
pear
pear run pear://d1xbkcpcbi1xa8dexp49rsendra5r67w3qh5a9k8t44oemm4k16yOpen it on two different machines (or two windows on the same machine) and they'll find each other through the DHT.
cd ui
python3 -m http.server 8080
# open http://localhost:8080The game detects no window.pear.swarm.v1 and falls back to local-only mode.
git clone https://github.com/bigdestiny2/hiveworm
cd hiveworm
npm install
pear run -d . # dev mode, live-reloadpear stage default .
pear release default .Built on:
- Pear Runtime — Bare + Chromium for desktop
- Hyperswarm — peer discovery + NAT traversal
- HiveRelay — always-on pin infrastructure
- PearBrowser Desktop — runs HiveWorm via
window.pear.swarm.v1
License: Apache-2.0