Files
VoxelForge/CLAUDE.md
T
Fr0zkaandClaude Opus 5.5 bc0f9ee791 wip(step3): 12.5 cm voxels, fall-through fixed, brick evaluator in game, organic tunnels -- speed gate FAILS
Stopped by the owner's decision (in-game lit captures were eating the round); he judges the look in
game instead.
1. Fall-through with the research field: fixed. Deep drop, gate on: 2 holds (0.50 s), min foot
   clearance +43 cm; gate off: penetrates (-278 cm). Stress fixture offsets converted to metres.
2. VOXEL_SIZE 25 -> 12.5 cm. Physical sizes kept in metres (player, steps, gate, insets, research
   field sizes, dig radii, test thresholds); class defaults that count chunks/voxels doubled
   (ClipRadius 6, RenderDistanceChunks 1536, ViewDistance*, StrateViewMargin 6,
   PawnCollisionRadius 2, SkirtCells 4, EdgeSealThickness 128, decoration spacings, density volume
   res 256). Asset values override these defaults: the owner must double his own.
   Ring scale, six workers, idle, step-2f field before the look changes: 64 m cube (519^3) 4.55 s;
   32 m cube (259^3) 0.95 s.
3. In game: tiles go through the brick evaluator (proved by a log marker); profile switch rebuilds
   the loaded world (~5,800 tiles); full-detail fill 12.4 s after spawn in the visible-window test.
4. Look: round winding tunnels, per-column ellipsoid/lattice caches. All step-2f geometry gates pass
   at 12.5 cm (0 crumbs, 1 solid component per profile, solid share 69-87%). 259^3 ring, six workers:
   1.08-2.02 s (worst HyperComplex) -- the 600 ms gate FAILS. Lit captures failed (hidden/off-screen
   window, then blank frames); not pursued.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
2026-10-01 21:21:45 +02:00

3.1 KiB

CLAUDE.md — VoxelForge

UE5 density-field voxel terrain plugin (strates / Marching Cubes / async streaming). Don't re-read the whole plugin — use the map.

⛔ #1 rule: NEVER build or compile

Jahni runs every build himself (he has the editor open; running it via Claude just burns cost). When code changes are done, stop and say "ready to build" + list likely compile-error spots, then wait for his results / pasted errors. Same for in-editor checks — ask for a screenshot, don't try to run anything.

Read first (in order, load only what the task needs)

  • CODEMAP.md — ALWAYS. Navigation: what it is, data-flow (§2), symbol→file:line index (§3), "I want to change X → go here" (§5), conventions & gotchas (§6). Trust symbol names over line numbers (lines drift).
  • ARCHITECTURE.md — when touching generation / strates / passages / biomes. The deep design (archetypes, (0,0) spine, disturbances, content/atmosphere, biomes) and the §8.10 performance invariants ("don't regress").
  • fable-idea.md — before planning PERF or FEATURE work. Ranked perf+feature roadmap with verified hot spots; check it so you don't re-propose done/known work. (A perf pass already shipped: game thread solved ~3.94 ms, CullTiles spiral fixed, region-granular foliage.)
  • REVIEW_FINDINGS.md — open quality/cleanup items (cross-check vs fable-idea before acting; some may already be addressed).

Hard rules (these prevent real bugs — verify against code, don't assume)

  • Density sign: negative = solid, positive = air (MC convention at the mesher). FVoxelModification::Strength negative = carve. The #1 source of confusion.
  • Density functions take VOXEL coords, not cm. One voxel is 12.5 cm; one 32³ chunk is 4 m. Conversions live in VoxelTypes.h.
  • Determinism: all randomness = hash of (coord, seed, strateIndex). No RNG state — same seed ⇒ same world. Player edits (diff layer) are the only non-deterministic overlay.
  • Async safety: worker tasks only READ Generator/Mesher, must check bShuttingDown, and return via the result queues — ProcessQueue and its CriticalProcessQueue / EditedProcessQueue / NearProcessQueue siblings (all must stay EQueueMode::Mpsc). EndPlay blocks on ActiveTaskCount → 0.
  • Carry the Epoch through any new async path (stale results are dropped on mismatch).
  • Don't "optimize" the perf invariants in ARCHITECTURE §8.10 — the thread_local box-valid caches, two-pass MC loop, SSE noise, and clipmap streaming are intentional.
  • Never edit Binaries/, Intermediate/, *.generated.h. Comments are French + English — match the surrounding file.

Discipline (keep the map alive)

  • Add / rename / move a symbol → update its CODEMAP §3 row (symbol-first; line is a hint).
  • Change generation/strate design → update ARCHITECTURE §8.
  • Resolve a checklist item → tick it in REVIEW_FINDINGS.md.
  • Don't duplicate content across these files — each has one job (map / design / findings / rules).