Simulation Islands
box2d.org
box2d.org
He mentions Jolt physics in this blog. That’s another example of “holy shit look at what one person can do”. I’ve found myself wishing I had Unity source so I could performantly inject that engine instead of being stuck with PhysX.
https://github.com/jrouwe/JoltPhysics
http://jrouwe.nl/architectingjolt/ArchitectingJoltPhysics_Ro...
Swapping physics engines for Unity's ECS world should already be very doable, but people understandably aren't leaping to it.
[0] https://forum.unity.com/threads/multiple-physics-options-for...
I did find this arxiv paper from April which claims to have one: https://arxiv.org/abs/2304.09331
My understanding is that they process batches of edges at a time. If they "conflict" (meaning they want to do different things to the data structure) then they're processed in serial, otherwise all edges in the batch are handled sequentially. They provide a bound on how often edges should conflict, and use that to show the complexity.
One of my favourite reads! Would read again.
class b2Island
{
b2Body** bodies;
b2Contact** contacts;
b2Joint** joints;
int bodyCount;
int contactCount;
int jointCount;
};
I understand that this is a physics engine and performance is paramount.There is absolutely no real reason to use raw double pointers here, in my opinion there is likely a zero Overhead datastructure one could come up with to do exaftly the same thing, but unit-testable.
Further, why `int`? This isn't java, and this will cause any size comparisons to become unsigned-vs-signed comparisons, which likely will also be of different sizes. I'm saying those could and should be size_t, unless I'm missing something(?). Why would a count be negative? Why only allow a count up to int max, whatever that is on a given platform?
It just baffels me that people write serious business code in this style, still.
Edit: If the pointers are non-owning, there are references for that... Not that they're safer, but at least more idiomatic
TLDR; with iterative methods stiffness of things depends on the physics timestep size and number of iterations of constraint solving.