Files
dino-isle-online/README.md
T
deepseek 764da2ee6c Dino Isle Online: multiplayer dino survival game (The Isle-like)
- Zero-dependency Node server: HTTP static + hand-rolled RFC6455 WebSocket + 20Hz authoritative simulation
- Seeded island worldgen (tiles, forest decor, spawns)
- 4 playable species, needs (food/water/stamina), rest, growth stages Hatchling->Apex
- AI fauna: critters, fish shoals, Dryosaurus/Psittacosaurus herds; carcass feasting
- PvP with knockback, kill feed, chat, leaderboard, minimap, day/night cycle
- True top-down procedural dino renderer shared by menu cards and in-game
- Developer mode (` key): god-mode, x6 XP, instant evolve, spawn AI, Alt+Click tp
- Headless smoke tests, real-browser visual tests, pixel match checks
2026-08-23 07:00:08 +00:00

74 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🦖 Dino Isle Online
A multiplayer dino-survival island game in the spirit of *The Isle* — playable
in any browser. Eat, drink, rest, grow through 4 evolution stages, hunt AI prey,
and devour the other players.
**Zero dependencies** — pure Node.js (HTTP + hand-rolled WebSocket) and vanilla
JS canvas on the client.
## ▶ Play
```
node server.js # default port 8095 (PORT=xxxx node server.js to change)
```
Open **http://localhost:8095** — open more tabs / other devices on the LAN for
multiplayer. Everyone plays on the same persistent island.
## 🎮 How to survive
| Key | Action |
|---|---|
| `WASD` / arrows | Move |
| `Shift` | Sprint (drains stamina) |
| `Space` / left click | Bite (hunt & fight) |
| `E` (hold) | Context action: eat carcass · graze plants · drink at water |
| `R` | Rest — regenerates stamina/HP fast, but you're defenseless |
| `Enter` | Chat · `M` mute |
### Survival loop
- **Food** decays constantly; sprinting drains it faster. Starving hurts.
- **Water** decays faster; stand in shallow water or at the shore and hold `E`.
- **Health** only regenerates when fed & hydrated — or fast while resting.
- **Growth**: every meal gives XP → **Hatchling → Adolescent → Adult → Apex**.
Each stage makes you visibly bigger, stronger and tougher (camera zooms out).
- Diets matter: herbivores graze grass patches & berry bushes, carnivores hunt,
omnivores eat everything.
- **Fauna**: skittish critters roam land, fish shoals dart around shallows — wade
in and time your bite when they tire — and **AI dinosaur herds** (*Dryosaurus*,
*Psittacosaurus*) graze the plains: medium prey that flee hard but drop big
carcasses worth feasting on.
- **PvP**: everyone can attack everyone. Kills drop a carcass — feast on your
rivals for big XP. Death shows a recap screen; respawn keeps playing.
- Watch the day/night cycle — nights are dark and dangerous.
### 🛠 Developer mode (testing helpers)
Press **`` ` ``** (backquote) in-game to toggle. While active:
- God-mode: no hunger/thirst decay, HP & stamina stay full
- **×6 growth XP**, ×2.5 bite damage, +28% speed
- Hotkeys: **`1`** full heal · **`2`** evolve one stage instantly ·
**`3`** spawn an AI dino nearby · **`Alt+Click`** teleport to cursor
## 🧪 Tests
```
node test/smoke.mjs # headless 2-player integration test (join, sync, move,
# hunt, AI-dino hunt, PvP kill, carcass feast, respawn,
# chat, developer mode)
node test/visual.mjs # real-browser UI test via playwright-core (menu → play)
```
## 🗂 Structure
```
server.js HTTP static server + WebSocket upgrade + game loop (20 Hz tick)
sim.js Authoritative simulation: species, needs, growth, AI, combat
worldgen.js Seeded island generation (tiles, forest decor, spawns)
ws.js Minimal RFC6455 WebSocket implementation (no deps)
public/ index.html · style.css · client.js (canvas renderer, prediction)
test/smoke.mjs Headless multiplayer smoke test
```
Notes: `DEBUG_CHEATS=1` enables a `{t:'tp'}` teleport message used by tests.