Devlog: Terrain, Rivers and a World to Walk Through
Chalice is a first-person, open-world RPG built around living in the world rather than saving it: learn a trade, build a reputation, and make your way through simulated towns full of people with lives of their own. The story is deliberately loose, just enough to teach you the systems.
The big systems (alchemy, brewing, blacksmithing, jobs, factions, crime and a per-body-part damage model) all need a world to live in first. So the engine work so far has gone into that world. Here’s where it stands.
Building the world
The world is a 128x128 grid of macro cells, roughly 8.1 km across. Base elevation and moisture come from layered simplex noise, and a few passes turn that raw noise into terrain that feels like a place.
Plains you can actually walk across. A power curve flattens the rolling hills into wide, open plains while leaving the mountain peaks sharp. Farmland needs room, and so do towns.
Rivers that carve. Springs start high in the mountains and flow downhill. Each step blends the slope with the river’s momentum, so rivers wander instead of running straight. As they go, they cut canyons, lower the surrounding slope and raise moisture along their banks.
Biomes with gameplay meaning. Each cell is classified from slope and moisture into Plains, River Valley, Forest, Marsh, Hills or Highlands. Cells also get tags like ORE_RICH, FARMLAND_VIABLE and OLD_GROWTH, which the economy and settlement systems can use later.
Detail that matches the terrain. Fine noise scales with the height of the macro map, so the plains are smooth dirt (about 5 cm of variation) while the highlands are jagged (up to 40 m).
Getting it on screen
- Terrain is split into chunks that are generated on background threads and uploaded to the GPU based on how far the player can see.
- Bilinear interpolation blends the large 64-meter macro cells, so chunk meshes join up without stair-stepped cliffs.
- Surface normals are computed per vertex from the height map, so lighting and shading look right.
- Regenerating the world from a new seed safely clears old chunk buffers and the low-poly distant terrain, then redraws.
Moving around
The player walks in a grounded mode pinned to the terrain surface. A free-fly mode with a sprint multiplier lets me cross the whole continent quickly while testing. Mouse look is clamped to prevent spinning and gimbal lock.
Under the hood
Entities are managed with hecs, a lightweight entity component system, which currently handles settlement anchors, cameras and the player controller. Destructive operations such as full world regeneration are queued and run between frames to avoid race conditions.
For development there’s an egui dashboard with a world-seed control. It’s disabled by a launch flag in player builds, along with free-fly mode and cursor unlocking.
What’s next
With terrain working, the next layers are the ones that make it a game: towns and NPCs placed on the generated map, followed by the job, crafting and reputation systems that give the world its economy.
More soon.