Move world generation outside the engine and into mods and data files
This commit is contained in:
@@ -283,7 +283,8 @@ engine assets in `assets/`.
|
||||
| Mining: tool speed, `requires_tool`, drops | engine (`client/game_mode.ts`, `server/game/game_server.ts`) | Phase 5 |
|
||||
| Day and night lengths, sky colors | engine (`common/time.ts`, `client/rendering/game_renderer.ts`) | Phase 5 |
|
||||
| Where new players spawn | engine (`server/game/world.ts`) | Phase 5 |
|
||||
| Terrain, biomes, trees and ores | engine (`common/worldgen/`, `common/generation.ts`) | Phase 6 |
|
||||
| Terrain, biomes and ores | `mods/bworld/worldgen/` (data) | Done |
|
||||
| Trees | `mods/bworld/scripts/trees.ts` (a code feature) | Done |
|
||||
|
||||
### Rules That Keep Existing Worlds Working
|
||||
|
||||
@@ -340,10 +341,10 @@ and dropped, containers clicked, players moving between chunks, entities.
|
||||
rules become something `mods/bworld` sets, with the engine asking it on both sides so clients still predict breaking.
|
||||
Check: all tests pass unchanged, and old saves still load.
|
||||
|
||||
**Phase 6: world generation.** First a golden fixture: a SHA-256 of the final blocks of 64 chunks for 3 seeds, recorded
|
||||
from the current code. Then port `common/worldgen/` to `mods/bworld/scripts/worldgen.ts` as the `bworld:overworld`
|
||||
terrain generator (with `register_terrain`), and the ore table to `mods/bworld/worldgen/ores.json`. The server refuses
|
||||
to start without a terrain generator. Check: the fixture matches exactly.
|
||||
**Phase 6: world generation.** Moved to data instead of a worldgen script, see [GENERATION.md](../GENERATION.md). The
|
||||
golden fixture, the ore table, and the terrain, biomes, surface and water as data are done: the server refuses to start
|
||||
without the `bworld:overworld` generator, and the fixture matches exactly. Trees are a code feature in bworld's worldgen
|
||||
script.
|
||||
|
||||
**Done when** searching `client/`, `common/` and `server/` for `"bworld:` finds only `bworld:air`, removing
|
||||
`mods/bworld` gives an engine that starts and says it needs a terrain generator, the base game uses no engine access,
|
||||
|
||||
Reference in New Issue
Block a user