Skip to content

About

Interactive browser light garden built with JavaScript, Canvas 2D, and WebGL; a playful artificial-life simulation.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

murmuration.

Life, in a different light.

A living light garden in your browser. Feed the curious, stir the water, and make a little universe bloom.

Enter the pond →

Murmuration: luminous schools and ribbons of light in a dark pond

Play

  • Feed: click or drag to leave food. Nearby organisms turn toward it.
  • Stir: drag through a school to create a local swirling current.
  • Seed: introduce a new family of organisms.
  • Inspect: select a little light to see its species, generation, energy, age and speed.
  • Make it bloom: add a colorful burst of life. Try B, Space, or double-clicking the water.
  • Switch between Bioluminescent reef, Midnight nebula and Ember lagoon.
  • Turn on optional ambient sound, save a picture, or open the menu to save/load a pond.

Keyboard: 1–4 choose a tool, P pauses, B / Space blooms, Escape closes menus and inspection. Controls also work with touch. The simulation starts more slowly when reduced motion is requested; pause remains available.

Run locally

Node.js 20 or newer. There are no npm dependencies to install.

git clone https://github.com/hamanakam1/murmuration.git
cd murmuration
npm run dev

Open http://127.0.0.1:4173. PORT=4174 npm run dev selects another port.

npm test       # deterministic simulation and saved-state validation
npm run build # static files in dist/

Serve dist/ on a static host, or serve the repository root directly. Paths are relative so the site works under a GitHub Pages project path. No backend, accounts, API keys, analytics, model inference or paid service is required. Google Fonts is an optional external typography request; system fonts are the fallback.

How the little universe works

Four species follow local separation/alignment rules, a drifting flow field and nearby food. Organisms spend energy, feed, reproduce and pass on slightly mutated speed/size traits. This is a simplified artificial-life toy, not a biological model or trained intelligence. Population is capped at 1,600 and food at 160 particles.

Canvas 2D renders organisms, translucent medusae, persistent trails and bloom. A WebGL shader adds the procedural water backdrop; the canvas experience remains available without it. Decorative current ribbons visualize the atmosphere, independently of organism genetics.

The current implementation is JavaScript + Canvas 2D + WebGL. Odin/WebAssembly is a proposed next-stage simulation kernel, not part of this release. The immediate goal was to make the browser experience playable and visually reviewable first.

Seed links reproduce starting conditions (seed and habitat), not a user's evolved world or interactions. Save this living pond exports current simulation state, including the random generator, for continuation. Different frame/input timing can produce different live outcomes. Imported files are size-limited and validated before replacing the world.

Contribute

Useful next contributions: small habitats, better touch interaction, performance profiles on real devices, self-hosted fonts, accessibility improvements and an Odin/WASM kernel with behavioral parity checks. Keep simulation, rendering and UI responsibilities separate. Add reproducible cases when changing simulation behavior. Do not commit private data, credentials, generated dependency trees or local browser traces.

See the handoff for the actual validation boundary and next steps. Inspired by artificial-life and flocking systems; this implementation is an original, deliberately small playground.

MIT licensed. Made for curiosity.

About

Interactive browser light garden built with JavaScript, Canvas 2D, and WebGL; a playful artificial-life simulation.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages