Biome framework plus snow and jungle biomes #21

Closed
opened 2026-11-07 18:28:30 +00:00 by claude · 1 comment
Member

Replace the single desert noise check with a horizontal biome map: biomes span x ranges that continue down into the underground. Each biome defines its surface/fill/stone/wall nodes, trees, ores and spawn table. Ship forest (current), desert (current), snow (ice, boreal trees) and jungle (mud, jungle grass, rich mahogany-style trees with original names).

Replace the single desert noise check with a horizontal biome map: biomes span x ranges that continue down into the underground. Each biome defines its surface/fill/stone/wall nodes, trees, ores and spawn table. Ship forest (current), desert (current), snow (ice, boreal trees) and jungle (mud, jungle grass, rich mahogany-style trees with original names).
claude added this to the v0.3 World & Biomes milestone 2026-11-07 18:28:30 +00:00
claude added the
priority
high
type
feature
area/worldgen
labels 2026-11-07 18:28:30 +00:00
eric added this to the Strata Roadmap project 2026-11-07 18:36:39 +00:00
eric closed this issue 2026-11-13 07:30:43 +00:00
Author
Member

Done in 0fe9a4b.

What changed

  • strata_mapgen has a biome table (mg.biome_list, mg.biomes[name]) with forest, desert, snow and jungle. mg.biome_at(x) picks from a heat noise (the old biome noise: snow at the cold end, desert at the hot end, so deserts are where they were) and a new humidity noise (jungle).
  • Each biome names its surface, fill, fill wall, stone and wall (these replace the layer's in the surface and underground layers, so biomes continue down until the cavern layer), soft pockets, tree, extra ores and a surface spawn table.
    • Snow: snow surface and fill, ice underground, frostpine trees (cone).
    • Desert: sand, sandstone underground, no trees.
    • Jungle: jungle grass on mud, mud-rich stone, redheart trees (10–16 tall, wide flat crown).
  • The world is always forest within 64 columns of x = 0, and the other biomes fade in over the next 192, so a new player never spawns in snow. Without this the default seed put spawn in a snow biome.
  • New blocks: snow, ice (slippery = 3), sandstone, mud, jungle grass; snow, ice, sandstone and mud walls. All original names.
  • strata.register_tree(name, def): the trunk knows its leaves and canopy reach, and strata.fell_tree clears that kind's leaves. All trunks drop plain Wood for now (follow-up below).
  • strata.spawn_candidates(y, tod, x) uses the biome's table on the surface layer. Every biome spawns slimes by day for now; v0.4 fills these in.
  • mg.node_at / mg.wall_at describe each cell. The mapgen and layer tests now compare the generated map against them instead of fixed node lists.

Tests (headless, tests/run.sh): 86/86 pass with zero ERROR lines (79 before). New in tests/biomes.lua: table completeness, spawn forest, biome shares over ±20 000 columns (forest 43%, desert 21%, snow 22%, jungle 14%), generated blocks at a sample site for each biome (emerged on demand), trees match tree_at/canopy with spacing, felling every tree kind, and biome spawn tables.

Needs a hands-on look in the client: placeholder textures for the new blocks and trees, and whether the biome sizes feel right.

Follow-up: #72 (biome woods).

Done in 0fe9a4b. **What changed** - `strata_mapgen` has a biome table (`mg.biome_list`, `mg.biomes[name]`) with **forest**, **desert**, **snow** and **jungle**. `mg.biome_at(x)` picks from a heat noise (the old `biome` noise: snow at the cold end, desert at the hot end, so deserts are where they were) and a new humidity noise (jungle). - Each biome names its surface, fill, fill wall, stone and wall (these replace the layer's in the surface and underground layers, so biomes continue down until the cavern layer), soft pockets, tree, extra ores and a surface spawn table. - Snow: snow surface and fill, ice underground, frostpine trees (cone). - Desert: sand, sandstone underground, no trees. - Jungle: jungle grass on mud, mud-rich stone, redheart trees (10–16 tall, wide flat crown). - **The world is always forest within 64 columns of x = 0**, and the other biomes fade in over the next 192, so a new player never spawns in snow. Without this the default seed put spawn in a snow biome. - New blocks: snow, ice (`slippery = 3`), sandstone, mud, jungle grass; snow, ice, sandstone and mud walls. All original names. - `strata.register_tree(name, def)`: the trunk knows its leaves and canopy reach, and `strata.fell_tree` clears that kind's leaves. All trunks drop plain Wood for now (follow-up below). - `strata.spawn_candidates(y, tod, x)` uses the biome's table on the surface layer. Every biome spawns slimes by day for now; v0.4 fills these in. - `mg.node_at` / `mg.wall_at` describe each cell. The mapgen and layer tests now compare the generated map against them instead of fixed node lists. **Tests** (headless, `tests/run.sh`): 86/86 pass with zero `ERROR` lines (79 before). New in `tests/biomes.lua`: table completeness, spawn forest, biome shares over ±20 000 columns (forest 43%, desert 21%, snow 22%, jungle 14%), generated blocks at a sample site for each biome (emerged on demand), trees match `tree_at`/canopy with spacing, felling every tree kind, and biome spawn tables. **Needs a hands-on look in the client:** placeholder textures for the new blocks and trees, and whether the biome sizes feel right. Follow-up: #72 (biome woods).
Sign in to join this conversation.