Physics Engine 13x Faster than Matter.js
github.com
github.com
https://kinetics.vercel.app/docs/demo
I benched the results without rendering (more or less focused on backend game physics), I'm not sure how it'd work with rendering since FPS lag would probably hinder performance to the point theyre both equal. In the event someone wants to make my library more efficient with rendering, they can always use WebGL with WASM
Can you provide a high-level view of how you achieve that speed? I have also heard of eXtended Position-Based Dynamics as one of the latest improvements in physics engine. Do you have a perspective on that?
As for the speed the engine provides, not much. I just optimized my spatial hashgrid. It used to iterate over every entity, found the cell it was in, and checked the objects in that cell. I replaced it by iterating over each cell, and checking the entities in the cell. Performance went up significantly (iirc 1k squares took around 6-7 mspt, now its 0.4mspt)
The engine actually uses position based dynamics (the penetration depth changes position), as for extended position dynamics, I looked into it but "softness" isn't a field in the entity object, so I decided to not implement it (extended pbd iirc just fixes softness)
If you want to prove something is efficient, pick a 5 year old low end spec.