NOTE: This library is work-in-progress!
Header-only implementations of Half-Life physics primitives with performance as the primary goal. The secondary goal is the minimal setup and easy of use. No special tooling or libraries to hunt down and install before you can start experimenting with Half-Life physics, beyond the standard C++ toolchain you can install with a single command in most macOS and Linux distribution, or with a download of Visual Studio on Windows. The compute routine APIs are all plain and bare.
Just import one header file:
#include "strafelib.hpp"
When building your research code with this library, it is recommended that you pass in these flags to GCC:
-flto -Ofast -mtune=native -march=native
I will give you an idea of the single-core performance of this library. My CPU is a stock Intel Core i7-8700.
- Using the
fme_vel_theta
with default Half-Life settings and 1000 fps, without any precomputations, it calculates roughly 80,000,000 velocity vectors per second. - By precomputing speeds using
fme_maxaccel_speed_C
at 100aa and 1000 fps, and using the speeds infme_vel_theta
, it calculates roughly 500,000,000 velocity vectors per second.
No building is needed to start using this library in your own code. However, you may wish to build the tests for this library by running
$ make test
$ ./test_strafelib