PROBLEM & BOUNDARIES
The Challenge & Constraints
Historical battle narratives have traditionally been trapped in static maps and dry text. Translating large-scale tactical movements into real-time interactive 3D browser simulations required balancing deep historical accuracy with consistent 60 FPS performance across consumer devices without requiring specialized hardware or native plugins.
CORE CONSTRAINTS
- #01Complex WebGL scene rendering with thousands of simultaneous entities and tactical formations
- #02Strict performance budget across mid-range laptops and integrated GPUs
- #03State synchronization between the 2D React DOM UI layer and the 3D WebGL scene graph
- #04Large spatial data sets requiring fast initial load and chunked asset streaming
ENGINEERING ARCHITECTURE
Real-Time 3D State Management & Rendering Pipeline
Deliberate technical choices evaluated against operational realities, performance budgets, and long-term maintainability.
01 /Decouple 3D simulation state from React component render cycles using an imperative scene controller
WHY THIS DECISIONStandard React reconciliation is too costly for high-frequency updates (60+ FPS) when updating hundreds of troop markers, camera trajectories, and formation vectors.
TRADE-OFF ACCEPTEDRequired manual lifecycle hooks and refs between React UI controls and Three.js object pools instead of pure declarative JSX.
02 /Use React Three Fiber and Drei for declarative scene graph composition paired with instanced meshes for troop formations
WHY THIS DECISIONInstancedMesh allows rendering thousands of historical soldier units and banners in a single GPU draw call, drastically reducing CPU overhead.
TRADE-OFF ACCEPTEDTransform matrix calculations for individual unit rotations and animations must be packed into buffer attributes.
03 /Adopt a monolithic Laravel + Inertia.js architecture for authentication, subscription billing, and battle content APIs
WHY THIS DECISIONEliminated client-server API version drift and reduced network hops, allowing instant page transitions with full server-side authorization.
TRADE-OFF ACCEPTEDTightly couples backend routing with frontend views, making standalone native app compilation less straightforward.
VERIFIED IMPACT
Measurable Outcomes
Observable metrics and verified deliverables achieved in production.
60 FPSTarget Frame RateConsistent across standard desktop hardware
64%Asset Size ReductionDraco compression & WebP texture atlases
1,000+Active 3D EntitiesRendered in single draw calls via InstancedMesh
- —Maintained rock-solid 60 FPS in 3D battle scenes on standard integrated GPUs (Intel Iris / M1)
- —Shipped full historical battle reconstructions featuring multi-phase troop movements and chronological points of interest
- —Reduced initial 3D asset payload by 64% through Draco geometry compression and WebP texture atlasing
- —Architected end-to-end subscription and multi-battle catalog management used in live production