I'm trying to wrap my brain around how to getspeed up my collision resolution to work withby using multiple threads.
I'v read through theBox2D's source code of Box2D and while quiteit was challenging and educating, not something toit didn't really point me to how I could use multiple threads.
I'm ready to make some sacrifices with accuracy,. I just need to be able to use multiple threads, sinceam investigating this because I have boatloads of objects in the game objects.
My current implementation handles AABB checks for 100000 objects in about 10 ms. I have no idea if this number is good, but for my purposes it seems sufficient.
WhatNext, I'm trying to figure out next is how to resolve collisions.
What would be a good way to How could I get power out of multiple threads here?
This is what i'm currently planning to do: (Do you see any issues with it?)
- Calculate position for each object in separate threads based on manifold data
- Update existing manifolds in separate threads
- get New collisions for moved objects in separate threads
- Repeat 10 times or until no changes