A 2D open world that runs in the browser. The world is infinite and procedurally generated from a seed. Villagers and deer make their own decisions based on their needs, personality and surroundings, and settlements grow over time.
Live: https://lemonhub-io.github.io/open-world/
| Key | Action |
|---|---|
| WASD / arrows | Move |
| E | Gather from the tile you face |
| T | Talk to the nearest villager and see what they are doing |
| G | Give a berry to the nearest villager |
| Q | Eat a berry |
| B | Build a house on the tile you face (5 wood 2 stone) |
| R | Store your goods at the nearby settlement |
| Esc | Pause menu (save, new world) |
The game autosaves to the browser's localStorage.
- Drag anywhere on the map to move with a floating stick
- Tap or click the map to walk there, tap a tree, bush or rock to gather it, tap a villager to talk
- The buttons at the bottom right cover every keyboard action, Gather repeats while held
- Phones and small windows get a compact HUD and larger tiles, tablets and desktops keep the full layout
- The game pauses and saves when the app goes to the background
No build step. Open index.html in a browser, or serve the folder:
python3 -m http.server 8000index.htmlandstyle.css- page shell and flat HUDjs/util.js- hashing, noise and seeded randomjs/world.js- terrain, resource nodes, settlementsjs/ai.js- utility-based agent decisions, pathingjs/render.js- canvas drawing and day/night lightingjs/game.js- game loop, input, save and HUD.github/workflows/pages.yml- deploys the site to GitHub Pages on push tomain