Skip to content

grav2ity/firebolt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

20 years ago or so when Half-Life 2 stunned the world with its physics (among other things)...

firebolt

This is a 3D rigid body physics simulator I wrote as a high school graduate (which is an important distinction from a college student – if I were one at that time I might get some guidance on how to do this properly).

The challenge was to write everything from scratch, avoiding any external libraries. I was crazy enough to believe that doing the most difficult thing would land me a job as a game programmer even though I had no degree. This was before indie games and platforms like Unity.

I did manage to get a slow simulation running. Cuboid boxes only (as I didn’t have inertia tensor calculations for arbitrary meshes) and frictionless. The core algorithm was unforgiving and already dated. Ultimately the whole thing derailed on numerical instability. I tried to code a linear programming solver and all the sensitive polygon intersection routines, which in hindsight was pure insanity.

Setup

I have checked that it compiles under Visual Studio 2022 after installing this ancient DirectX Software Development Kit.

Right now this is a bad formatting, magical numbers and poor design galore. Maybe one day I’ll port it to OpenGL and modern C++.

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published