Create Your First Project
Start adding your projects to your portfolio. Click on "Manage Projects" to get started
Mini ECS Demo
A small Entity-Component-System (ECS) implementation in C++, built from scratch to explore data-oriented design and measure its real performance impact against a traditional inheritance-based ("OOP") architecture.
Three collision implementations are benchmarked head-to-head:
• OOP baseline — classic GameObject base class, virtual dispatch, heap-allocated objects
• ECS, naive O(n²) collision — sparse-set component storage, but brute-force pairwise checks
• ECS, spatial hash grid — sparse-set storage + broad-phase spatial partitioning
At 10,000 entities, the spatial-grid ECS is ~7.2x faster than the OOP baseline and ~14.2x faster than the naive ECS collision. The naive and OOP curves both grow superlinearly (roughly quadratic, as expected for O(n²) pairwise checks); the spatial-grid implementation scales much more gradually with entity count.



