Description
Multithreading real-time applications can sometimes be a tricky process — physics based applications even more so. This program shows a technical demonstration of an approach to multithreading a common spatial partitioning technique (chunking).
The goal of this tech demo was to significantly improve the complexity of collisions between basic shapes in a physics environment as well as show the relative performance increases from method to method.
Controls
- Left Click — Spawn Balls
- Shift — Spawn 1000 Balls (random)
- Space — Toggle Vortex
- 1–4 — Change Demo Mode
- Numpad 1–9 — Change Thread Count (multi-threaded only)
- Ctrl — Toggle Graphics
- The physics model used for collision resolution is extremely basic and doesn't take into consideration mass or ball size. Additionally, it does not attempt to solve the stacking problem or be an efficient collision resolver. The purpose of this project is solely to speed up collision detection in a scene using parallelized spatial partitioning techniques.
- There are some minor bugs related to balls being removed from the collision simulation (and a minor spelling mistake — woops). Regardless, these shouldn't affect the purpose of the demo.
- Take care with the "no partitioning" demo mode as it has an O(N^2) growth pattern which can quickly introduce the reciprocal of "frames per second" — this was the problem that was being solved after all.
Gallery






File Downloads
Demo – MSP_Project.zip
Final Documentation – MSP_final_doc.pdf