first commit

This commit is contained in:
chelsea
2025-12-01 16:51:10 -06:00
commit 4978bb981a

49
README.md Normal file
View File

@@ -0,0 +1,49 @@
## Chelsea's MC Worldgen
Chelsea's take on Minecraft terrain lives here: a fast C port of my original Python generator with multithreaded chunk workers, Simplex noise, and just enough chaos to keep it interesting. Consider it about **3/4 vibecoded**—the math is solid, but a quarter of the surface area is vibes, instinct, and late-night tuning.
### What it does
- Generates chunk data compatible with vanilla region (`.mca`) files or raw binary dumps.
- Keeps the original Python ordering for noise, terrain, ores, and tree placement so worlds feel familiar.
- Splits work efficiently across threads so you can saturate multi-core machines or scatter jobs in a cluster.
### Build it
```sh
make
```
This drops the `worldgen` binary into `bin/`.
### Run it
```sh
./bin/worldgen --radius 2 --threads 8 --out output
```
Key flags:
- `--radius R` with optional `--center-x`/`--center-z` for quick square patches.
- `--min-x`, `--max-x`, `--min-z`, `--max-z` for explicit rectangles (great for splitting work across machines).
- `--threads N` to match your CPU.
- `--seed S`, `--sea-level L`, and `--format mca|bin` for the usual customization knobs.
`mca` (default) writes region files you can copy directly into a world directory under `region/`. `bin` preserves the older chunk-dump pipeline for custom tooling.
### Output anatomy
Each chunk blob contains:
1. `int32 chunk_x`, `int32 chunk_z`
2. `uint16 heightmap[16][16]`
3. `uint16 blocks[256][16][16]`
Chunks are independent, so spray out ranges across machines and merge by simply putting the files in the same output directory.
### State of the vibes
- Noise scaffolding is done.
- Decoration passes (ores, trees) mirror the Python original.
- Region writer is battle-tested, but I still keep eyes on biome edges.
- Feature ideas welcome—PRs, issues, or just DM me about the remaining 1/4 vibe debt.