View on GitHub

Tech, Games and Whisky

The Sebr's Blog

Data Oriented Physic Solver

|

I found this twitter post today:

and I was totally blown away when I read the blog post it linked to. The author, Rasmus Barringer exposes in great details how he created a data oriented single file Physics solving library. This library is also SIMD optimized. This is a super dense amount of buzz words for a library!

The post is great because it explains how the library came to be and how the constraints of the library design (data oriented and no hidden state) would drive the evolution and iteration of the API.

The code for the library is well organized and the section with all the functions handling all sorts of SIMD operations could in itself be repackaged as a separate library that would be useful to other 3D Transformation Oriented projects.

Box2D

Rasmus explains he uses an “impulse” approach to physics solving after having seen a GDC presentation by Erin Catto at GDC (was it this presentation?). Erin is the creator of the IMMENSELY populate 2D physics solving library: Box2D. Box2D is originally a C++ library but it has since been ported to all languages known to game developers. Even Blackberry.

This page showcases a lot of other publications and presentation by Erin.