Pixel World is an open-source browser ecology sandbox where frogs and snakes move, hunt, reproduce, inherit traits, remember danger, and sometimes collapse the whole ecosystem.
Play now: hubertlim.github.io/pixel_world
- It is a tiny artificial-life playground you can open instantly in a browser.
- Simple rules create visible emergent behavior: population booms, starvation, predator pressure, territorial clusters, and lineage survival.
- The whole project is TypeScript, Vite, Canvas, and local browser storage. No backend, no account, no tracking.
- The roadmap is intentionally contributor-friendly: scenarios, event logs, family trees, replayable seeds, new species, and better mobile controls.
If you like small simulations, creative coding, open-source browser games, or artificial life experiments, a star helps more people find the project.
- Full-viewport pixel world rendered on canvas.
- Frogs and snakes with energy, aging, reproduction, hunting, starvation, and death.
- Inherited traits with mutation: speed, sense, boldness, fertility, and metabolism.
- Agent memory for food, danger, and kill events.
- Per-agent goals, home cells, generations, and parent lineage.
- Terrain painting for land, water, rock, and food.
- Live behavior cards for tuning frog and snake priorities.
- Population history chart and overlays for population, danger, food, habitat, and territory.
- Browser save/load plus JSON export and import.
- Retro CRT presentation layer with compact in-world controls.
- Open Pixel World.
- Click Scenario.
- Switch overlays between Risk, Food, and Home.
- Inspect a creature and watch its traits, memory, home, and generation.
- Copy the URL to share that seeded scenario.
- Tune the frog or snake behavior card and see whether the ecosystem survives longer.
| Input | Action |
|---|---|
1 |
Frog tool |
2 |
Snake tool |
3 |
Water tool |
4 |
Rock tool |
5 |
Land tool |
6 |
Food tool |
I |
Inspect tool |
Space |
Pause or resume |
| Left click | Paint, place, or inspect |
| Right click | Remove creature or erase terrain |
These are intentionally small, visible, and fun:
- Add more starter scenarios: snake invasion, island survival, food collapse, frog boom.
- Add an event ticker for births, deaths, hunts, mutations, and extinctions.
- Add named save slots instead of one browser save.
- Add a family tree view for selected lineages.
- Improve mobile controls for behavior cards, overlays, and inspection.
- Add exportable screenshots for sharing a world state.
Open an issue with an idea, or pick something from the roadmap.
npm install
npm run devThen open http://localhost:5173.
Docker also works:
docker compose up --build webnpm run check
npm run buildsrc/main.ts simulation logic and UI wiring
src/styles.css visual identity and layout
index.html app shell
ROADMAP.md planned simulation and agent milestones
docs/ launch and community materialsThe project roadmap lives in ROADMAP.md. The short version:
- Make the ecology sandbox more replayable and easier to share.
- Make individual agents feel more alive through memory, lineages, relationships, and territory.
- Keep the project small enough that contributors can understand it and safely add weird ideas.
Contributions are welcome, especially around simulation behavior, scenarios, UI polish, mobile usability, docs, and issue triage.
Start with CONTRIBUTING.md. For quick community-facing tasks, see docs/LAUNCH_TODAY.md.
- TypeScript
- Vite
- HTML Canvas
- Browser localStorage
- GitHub Actions
- GitHub Pages
MIT. See LICENSE.