Game engine from scratch #3 - ECS and transform hierarchy

20 January 2024

Progress on writing a custom ECS implementation with the ability to support a transform hierarchy with the least amount of matrix multiplications needed.

I decided it would be a great idea to implement my own entity component system (ECS). Learned a lot about template metaprogramming in C++ and how to efficiently compute a transform hierarchy with a minimal amount of matrix multiplication using dirty flags and sorting.

Next step: stress test the system with as many instances as possible. And sort the mesh renderers to automatically batch draw calls of objects that contain the same mesh and materials.