$ show GameFoundry/B3DFramework
B3DFramework (namespace `b3d`, legacy `bsf` path prefixes) is a cross-platform C++17 game/application engine framework. Production code reveals a complete runtime: a scene/component model with ECS fragments, dirty-flag transform hierarchy propagation, prefab/scene serialization, async resource handles, and a plugin architecture with GPU backends (Vulkan, D3D12, Metal, Null), physics (PhysX), audio (FMOD, OpenAL), and a default renderer (RenderBeast). The engine implements its own shader language (BSL) with a compiling pipeline, a custom RTTI/reflection system with versioned binary serialization and delta compression, and a Mono-based C# scripting layer generated from C++ types via a codegen toolchain.
The LLM identified 4 files worth highlighting for reuse:
Two-Level Segregated Fit (TLSF) memory allocator providing near-O(1) allocation/free with bounded fragmentation — a classic choice for real-time and embedded systems. Self-contained header/inline pair with no engine coupling, extractable into any low-latency project. Demonstrates non-obvious craft in free-list segregation, splitting, and coalescing.
Core templated math module covering vectors, matrices, quaternions, transforms, planes, rays, AABBs, and angle/unit abstractions with SIMD-friendly layout. The math directory is a clean, dependency-light library that can be lifted wholesale into another engine or graphics project; shows disciplined template design and careful edge-case handling.
Sparse-set container forming the backbone of the engine's ECS storage: contiguous packed entity iteration, O(1) index mapping, and swap-and-pop removal. Self-contained and reusable for any data-oriented entity storage, demonstrating the classic packed-array/sparse-index pattern that underpins modern ECS implementations.
Template-based GPU resource-barrier tracking that records per-resource state and batches required pipeline barriers uniformly across Vulkan/D3D12/Metal backends. Isolates non-obvious synchronization logic (layout transitions, subresource tracking, hazard classification) behind a backend-parameterized template; the pattern generalizes to any explicit-API renderer and is backed by dedicated unit tests.