🌍 HOW TO CREATE THE WORLD

From empty void to living world — the complete guide
FoundationLawsTerrain PlayerInterfaceEconomy AestheticTesting

🏗️ FOUNDATION: The Technical Stack

1 Server. Node.js + Express + SQLite. One file can hold the whole world — routes, game state, economy. Start simple, grow additively.

2 Client. three.js for 3D rendering. Served as static files. The client renders; the server validates. Never trust the client.

3 Database. SQLite for game state (positions, inventories, world objects). One file, zero config, survives restarts.

4 Hosting. A VPS with root access (Hetzner, DigitalOcean). systemctl for process management. The world must survive reboots.

// Minimal world server
const express = require('express');
const app = express();
app.use(express.static('public'));
app.get('/world', (req, res) => {
  res.send(renderWorldPage());
});
app.listen(3000);
THE ADDITIVE RULE: Never delete, only build upon. Every change is additive. If something breaks, you fix forward — you don't roll back and lose work.

📜 THE LAWS: Non-Negotiable Principles

These laws govern every world. They are not suggestions.

THE MINIMUM LAW
The smallest rendered thing is 0.13 world units. Nothing is created smaller than this by default. All scale derives from Minimum: the player is ~38 tall, a build grid cell is ~15.4. window.MINIMUM = 0.13. When the law fires, the world speaks: "DEFAULT MINIMUM REACHED."
THE ZERO LAW
"We never build at lat zero any more." Nothing is ever placed on the zero lines (LAT 0 or LON 0). Every build goes at real coordinates, off the axes. The zero lines are not real places.
THE SPAWN LAW
"We never land at lat 0 to spawn." The player never spawns on the zero lines. Spawn is always at real coordinates.
THE FRAME LAW
"You never delete the frame." The layered foundation (surface + steps below + solid blocks) is permanent structural frame. Everything builds upon it. Never deleted.
THE INTERFACE LAW
"No types no keys no numbers." Controls are purely visual and tappable. No typed input, no keyboard keys, no numbers. Icons only — children tap. Exception: the code bar (that's how you talk to the game).
THE HUMAN THUMB LAW
Every button must be tappable by a human thumb. Minimum 48px. No overlaps. Nothing hangs off the panel. Panel scrolls instead of covering the screen.
THE BODY POSE LAW
Bodies and hands pose only in natural, appropriate ways. No backwards joints, no inappropriate positions. For the children. Bodies build inside-out: spine → movement → muscle → skin shell.
THE WORLD NATURE LAW
Everything moves according to its nature. Trees sway, water runs, birds flap or glide — each within natural limits. The world feels alive because everything respects what it is.
MAP RESPECT LAW
"No breaking other players' maps." Your systems never destroy another player's builds. Ever.
DYNAMICS LAW
"Dynamics can be updated, never replaced — just logged with all the mistakes." UI elements update in place. Every change is logged with mistakes included. The history is the record.

🏔️ TERRAIN: Building the Land

1 Start with the frame. Lay the foundation layers: surface on top, baby steps below, solid blocks at the base. This is permanent.

2 Bake the topography. Never use y=0 with flat placement. Compute the ground height at each (x,z) and set the y value to absolute land height. The y value must be the land height, not an offset from zero.

3 Plan districts first. Don't scatter landmarks randomly (the lesson of the messy city). Plan districts, space landmarks with room to breathe, infrastructure before monuments.

4 One vision. Enforce a single aesthetic (Sovereign Deco). Gather styles only to import and improve — never copy.

5 Permanent ground. Floor and streets load at start and self-repair if removed. Like the buttons: always there, never gone.

🤴 THE PLAYER: Avatar, Movement, Camera

Avatar

Movement

Camera

👆 INTERFACE: Controls & Buttons

The standard is "the advanced toggles and the buttons of gold" — rich, tactile, permanent controls.

CACHE IS THE ENEMY. iOS Safari caches aggressively. Use Cache-Control: no-store on game pages. Bump ?v= on every JS change. Duplicate critical CSS in a <style> block after the <link> tag.

💰 INTEGRATING THE ECONOMY

The Sovereign Economy plugs into any world. Here's how:

1 Install the package. Follow the redistribution guide.

2 Add world pickup. Include /economy-pickup.js, call init(), setPlayerPos(), animate(). Three lines.

3 Hook durability. When tools are used, call /api/economy/durability/use. When broken, disable until repaired.

4 Award XP. Call /api/economy/pass/xp for kills, quests, discoveries.

5 Place vendors. At meaningful world locations — spawn, market district, hidden areas.

6 Link the panels. Add a button in your game UI that opens /economy (player panels).

THE PURCHASE FUNNEL: See → Inspect → Buy → Receive → Show. Every purchase must flow through these five stages. The player sees the item, inspects it, buys with one tap, receives instantly, and can show it off.

🎨 AESTHETIC: Sovereign Deco

The visual language of the world:

👁️ TESTING: Proof-First

THE PROOF LAW: The player's eyes are the only verification. Never announce completion ahead of their screen. State partially-verified claims plainly: "code is in the file, syntax clean, not yet verified."