#worldfabric — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #worldfabric, aggregated by home.social.
-
In #WorldFabric there are world events that run on world objects, and an event can only edit the object it's running on. All computation is localized to enforce the maximum speed of information, which means there can't be some overarching system orchestrating physics. So, I've split each frame up into 20 frame steps, and then I've interwoven the steps of the physics engine into them. The bodies and the constraints all know which steps they're supposed to act on. They'll queue up events to execute at a specific time during each frame, read the nearby objects, and update themselves. At step 3 + 2*k each constraint calculates the impulse it wants to apply for step k in the solver, and then at step 3 + 2*k + 1 each body reads all of its connected constraints and applies their impulses. The collision detection gets multiple steps because the cell can be further away, so it needs a little extra time for the info to move from the bodies, through the cell, and then back out to the constraints.
-
I've got static physics bodies replicating over the network. Now, I "just" need to convert the constraint solver to #WorldFabric events.