Files
VoxelForge/Standalone/SHARED_CPP_LIBRARY_PLAN.md
T
Fr0zkaandClaude Opus 5.5 3f300b912a wip(standalone): paused by the owner -- hashed maps + inline allocator (no speedup yet), streaming in progress
Hashed TMap/TSet and real TInlineAllocator storage did not move level 0 (72.1 -> 74.1 s, within
noise): the slowness is elsewhere. StreamingWorld.h started (first build hit an int64/uint64
mismatch), library plan drafted (SHARED_CPP_LIBRARY_PLAN.md), before-normal captures saved.
Uncompiled/unmeasured parts: streaming. Resume by forking session 01a0fd2e-3c3b-7050-b4e9-628fdcc4d553.

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

1.7 KiB

Shared C++ library plan

Library contents

Move the deterministic CPU world pipeline into a portable VoxelForgeCore library: plain voxel and world types, math/noise, density operations and caches, cave and passage fields, strate composition, marching cubes, and desired clipmap tile selection. Keep renderer, file loading, asset/reflection access, gameplay actors, and task scheduling in the host applications.

Compatibility boundary

The library should expose standard C++ value types and explicit immutable world inputs. Unreal adapters convert UObject settings/assets into those inputs and convert mesh results back to Unreal types. The standalone loader maps its JSON snapshot into the same inputs. No Unreal headers, reflection macros, UObject, or host allocator should cross the library boundary.

Plugin integration

Build the core as one C++20 static library and link it from both the standalone viewer and the VoxelForge Unreal module. The plugin keeps ownership of asset loading, worker admission, cancellation, collision, game-thread mesh application, and per-frame upload budgets; workers call the shared density and meshing API with immutable contexts. The standalone keeps its D3D11 renderer and JSON loader and calls the same API.

Preventing drift before extraction

Until the move lands, keep the standalone copies synchronized from the plugin source with a small manifest of shared files and a checked sync script. The script should compare hashes and refuse an ambiguous two-sided edit. Run the exported 3,436-sample bitwise parity corpus after every density change, then remove the duplicate source only when both hosts build against the shared library.