DOD Circles

DOD and Optimisation


This project was developed as an exercise in DOD principles, multithreading and optimisation. In the default scenario, half of the circles are moving, and collide with the other stationary circles. Currently visualising 100K circles at around 45 FPS. Rendered using my custom DirectX 12 engine in C++.

Several scenarios are supported, including moving-moving collisions, circle health and death, walls, and using a random radius for each circle.

Line sweep and Multithreading

The collision function is multithreaded by utilising a thread pool. Each thread checks the collision for a section of the circles. A line sweep in the X direction is used to minimise the circles being checked for collision for any given moving circle. This in combination with DOD principles allows for the simulation of very large numbers of circles. The circles are rendered using multithreaded rendering in DirectX 12, to ensure rendering performance is as high as possible

Further Development

Current development includes using template functions to support the same scenarios in 3D using spheres, and further optimisations.