This simple DOD project highlights different implementations and design decisions between an OOP and DOD approach of generating a large number( >100k, even) of objects of a screen.
First, I started implementing this problem using OOP concepts, the ones that I am most familiar with.
Then, I tried implementing a DOD thinking: I used structured of arrays at first, then added grid spacing and multiplexing, giving me a more optimised cache-friendly code.
As I want to expand on my DOD approach, I will use familiar concepts, such as: Batch processing/SIMD, Object Pooling/Preallocation, Spatial Hashing, Data Compactness, Alignment for vectors etc.
Download the project and make sure to extract it to the desired location. Make sure you have SDL installed. Then, open the .slnx file (I used Microsoft Visual Studio). Enjoy!
2026-01-28.00-18-53.mp4