Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
tools/player_target_verify.tscn \
tools/worldgen_cactus_verify.gd \
tools/worldgen_tree_verify.gd \
tools/worldgen_cave_verify.gd \
tools/frame_pacing_verify.gd

- name: Upload check logs
Expand Down
14 changes: 7 additions & 7 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ Current state: the TerraForged-inspired staged pipeline is live under `world/wor
- [ ] Structures / POIs — deterministic, seam-safe ruins, abandoned camps, mineshafts, and watchtowers placed from global anchors. Must respect player edits and regenerate consistently across chunks; loot and inventory hooks stay with the gameplay pass

### Caves and underground
- [x] Phase 1 — wormhole tunnels: connected cell-anchored tunnel segments and sparse seam-safe diagonal surface entrances replace the old per-voxel threshold caves.
- [x] Phase 2 — large caverns: cell-anchored varied caverns and rare mega-caves, lava lakes, aquifers, damp floor patches, and ceiling/floor stone formations.
- [x] Phase 1 — endless hybrid cave network: Minecraft/Luanti-inspired absolute-coordinate spaghetti and cheese density fields provide organic seam-free tunnels/chambers, while a five-depth-band deterministic 48-block graph guarantees that every canonical trunk continues indefinitely. Curved trunks, cross-links, mandatory vertical connectors, and node chambers replace the isolated 2-4-segment worms; surface entrances now join graph nodes instead of ending blindly in stone.
- [x] Phase 2 — large caverns: graph-attached chambers, cell-anchored varied caverns and rare mega-caves, lava lakes, aquifers, damp floor patches, and ceiling/floor stone formations.
- [x] Phase 3 — underground features: damp mud/mycelium cave patches, depth-banded ore veins, aquifers, lava pockets, and stone formations. Random deep cobblestone variation was removed so cobblestone remains player-made; mineshafts/ruins remain separate future structure work.
- [ ] Cave-aware lighting and meshing — verify sky-light flood fill around large openings, that caves stay dark, and that `ChunkMesher` light-volume bounds hold for big caverns.
- [ ] Cave dressing — stalactites/stalagmites, dripstone columns, moss, and small underground pools so cave interiors are not bare stone
- [ ] Cave biomes — lush and deep-dark variants with distinct ambience, vegetation, and materials layered onto `world/worldgen/biome_catalog.gd`
- [ ] Geodes and crystal formations — rare hollow geodes and mineral deposits so deep exploration has landmarks beyond ore veins
- [x] Cave-aware lighting and meshing — `ChunkMesher.build_light_volume()` exposes the temporary 3x3 volume to deterministic fixtures; missing chunks are closed light boundaries rather than daylight leaks, water/leaf side seeds use their real attenuation, flood queues grow instead of silently truncating, and edits/commits invalidate all eight sampled neighbors (including pending-job races). `tools/worldgen_cave_verify.gd` pins sealed darkness, a large opening's finite falloff, colored crystal light, and exact cavern-volume bounds
- [x] Cave dressing — the sparse global cave lattice now finds nearby floors/ceilings and places paired dripstone, short columns, damp moss/mycelium, hanging cave growth, sculk/deepstone patches, and small floor-supported pools without returning to a full 3D voxel scan
- [x] Cave biomes — `BiomeCatalog` appends `LUSH_CAVES`/`DEEP_DARK` as a separate coherent 3D region layer (surface IDs stay stable); exposed cave materials and vegetation follow that layer, while `VoxelWorld.get_cave_ambience()` scans to the loaded column top so even tall mega-caves receive distinct green/teal fog and light floors. Cave regions cover most underground territory, and the HUD replaces the surface-biome label while one is active
- [x] Geodes and crystal formations — rare global-cell spheres clip seam-safely across chunks with a dark shell, calcite lining, hollow core, amethyst deposits, and emissive crystal buds that automatically seed the RGB block-light flood
- [x] Ore distribution overhaul — deterministic cell-anchored coal, iron, and gold vein segments use depth bands and replace stone after caves are carved.
- [x] Cave performance guardrails — cell-anchored carving replaces full-height 3D cave scans; clipped ellipsoids hoist column limits, aquifer decisions are chunk-local, and normal full generation averages ~40 ms in the pinned CLI benchmark.
- [x] Cave performance guardrails — noise carving scans only eligible stone below each column's protected surface and Y100 cap; graph/cavern stamps clip to the target chunk from bounded owner halos; aquifer decisions remain chunk-local. The richer network raises pinned normal full generation from ~44 ms to ~58 ms while compact LOD remains ~16 ms. The cave verifier follows 128 trunk cells and flood-fills a 5x5 independently generated hybrid fixture: 6.9% air with a 32,128-block component spanning the full 80x92x80 volume.

### Verification
- [x] Tree integrity / groves / cactus closure — fuller connected broadleaf crowns cover limb ends; immutable tree-site decisions and overlap regressions prevent chunk-owner/canopy disagreements. Forest, taiga, and jungle use a dedicated deterministic grove field with denser patches and clearings while respecting density controls. Cactus placeholder margins are cropped in runtime texture preparation to close cube edges/caps; opacity and stacked-mesh tests pass. Forward+ grove and cactus captures inspected.
Expand Down
6 changes: 6 additions & 0 deletions assets/placeholders/caves/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Cave placeholder textures

These 64 px cave-biome, geode, and crystal textures were generated specifically
for RedotCraft. They do not contain third-party artwork. Regenerate them with:

`redot --headless --path . --script res://tools/gen_underwater_textures.gd`
Binary file added assets/placeholders/caves/amethyst.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions assets/placeholders/caves/amethyst.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bssw0p7uk6sgb"
path="res://.godot/imported/amethyst.png-0cde5fa74b6905b31e22984ea15c58ed.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/placeholders/caves/amethyst.png"
dest_files=["res://.godot/imported/amethyst.png-0cde5fa74b6905b31e22984ea15c58ed.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/placeholders/caves/calcite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions assets/placeholders/caves/calcite.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cs4hm0mylpa6q"
path="res://.godot/imported/calcite.png-7c0ce0733faa21e689a38ff8d7030e82.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/placeholders/caves/calcite.png"
dest_files=["res://.godot/imported/calcite.png-7c0ce0733faa21e689a38ff8d7030e82.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/placeholders/caves/cave_moss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions assets/placeholders/caves/cave_moss.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://djj7jv32u30f4"
path="res://.godot/imported/cave_moss.png-5201fb2f2914988116317446b7226b2a.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/placeholders/caves/cave_moss.png"
dest_files=["res://.godot/imported/cave_moss.png-5201fb2f2914988116317446b7226b2a.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/placeholders/caves/crystal_bud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions assets/placeholders/caves/crystal_bud.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dg8yb1mp24fo8"
path="res://.godot/imported/crystal_bud.png-e8ccc3785aba8837f0f9debd73667796.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/placeholders/caves/crystal_bud.png"
dest_files=["res://.godot/imported/crystal_bud.png-e8ccc3785aba8837f0f9debd73667796.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/placeholders/caves/deepstone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions assets/placeholders/caves/deepstone.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://tg805wlc8lcd"
path="res://.godot/imported/deepstone.png-2a124d1c922891eb04599749b7a25f8c.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/placeholders/caves/deepstone.png"
dest_files=["res://.godot/imported/deepstone.png-2a124d1c922891eb04599749b7a25f8c.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/placeholders/caves/dripstone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions assets/placeholders/caves/dripstone.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://ntjo5a8ho7ic"
path="res://.godot/imported/dripstone.png-9be3c3e5da0a10b7254f0f30e939ebff.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/placeholders/caves/dripstone.png"
dest_files=["res://.godot/imported/dripstone.png-9be3c3e5da0a10b7254f0f30e939ebff.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/placeholders/caves/geode_shell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions assets/placeholders/caves/geode_shell.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bser0d1y3div3"
path="res://.godot/imported/geode_shell.png-ed3ef6bbc110e2cc5e9efdcd8ec05818.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/placeholders/caves/geode_shell.png"
dest_files=["res://.godot/imported/geode_shell.png-ed3ef6bbc110e2cc5e9efdcd8ec05818.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/placeholders/caves/moss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions assets/placeholders/caves/moss.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://c5aksb0cb2fdj"
path="res://.godot/imported/moss.png-6b4d5d2319373a7371b0f6c26496a8da.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/placeholders/caves/moss.png"
dest_files=["res://.godot/imported/moss.png-6b4d5d2319373a7371b0f6c26496a8da.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/placeholders/caves/sculk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading