World Generation

World Generation

The game world is an infinite grid of sectors, each an independent dungeon floor generated deterministically from a seed.

Deterministic Generation

One seed controls world generation. The same seed always produces the same world, so everybody plays the same one without any of it having to be stored.

Sector Structure

Each sector is a dungeon floor generated by the ROT.js Digger algorithm, which carves rooms and corridors into a grid. Sector width and height are fixed for a given world.

Grid tiles use two values:

  • 0 - Floor (walkable)
  • 1 - Wall (blocks movement)

Biome System

The world is divided into 7 biomes, each selected via 2D simplex noise. Biomes determine the visual and mechanical character of each sector.

Biome Character
CITY Urban ruins with structured layouts
MOUNTAIN Rugged terrain with cliff-dwelling creatures
ALLEY Narrow passages and tight corridors
GARDEN Overgrown organic spaces
LABYRINTH Complex maze-like structures
CORRIDOR_ZONE Long connecting passages
PLAZA Open areas with scattered rooms

Each biome has its own:

  • Tile colors and visual properties
  • Wall surface properties (grain, roughness, metalness)
  • Digger configuration (room sizes, corridor lengths, dug percentage)
  • Monster roster
  • Room pool

Biome configurations live in server/world-biomes/*.json.

Rooms

Special rooms are stamped onto generated dungeons, providing gameplay functions:

Common Rooms (all biomes)

Room Function
Meditation Sanctum Rest/meditation for HP/mana/stamina regen; technique crafting
Supply Cache Item spawns
Utility Closet Item spawns
Fabrication Bay Forging a material into equipment — the last crafting step
Market Players sell to each other, priced in shards

Biome-Specific Rooms

Each biome can define additional room types in server/world-rooms/biome/<BIOME>/.

Boundary Portals

Adjacent sectors connect via boundary portals placed at sector edges. Moving through a portal loads the next sector, maintaining the illusion of a continuous world.

The Market is the first room bigger than one tile

Every other room is a single tile. A market is three by three, which is what lets it be a place rather than a vending machine — several people can stand in one.

It also means a market is nine tiles of one room, and its stock belongs to the room rather than to whichever tile you happen to be on. Two players in the same market see the same shelves; a market in the next sector has its own. See market.md.

Doorways are not inside. A door tile belongs to the room it opens onto, but standing in one means standing in the doorway — the same distinction the Meditation Sanctum makes for resting.

Generated from world-generation.md.