Rather than trying to explain it, here is a video with a poorly improvised commentary:
That was made about two years ago. I don’t know why I like making physics engines… That is probably my 5th or so attempt. Before that, I had been working on a project called GMPhysics (which I will post more on later), which was a DLL extension for a program called GameMaker. Today, I’m working on some really awesome physics stuff for my pet project, which I hope I can share with you soon.
GameMaker is actually what got me into programming and game development. Maybe I’ll return to GMPhysics sometime in the future…
Here are some technical details for those that care:
- Supports rigid bodies, SPH fluid, and particle based granular
- Iterative constraint solver for collisions
- Spatial hashing used for everything to prune collisions
- Narrow-phase collision detection speed is almost shape independent
- Semi-robust SPH boundary handling
- Visco-elastic fluid
In the near future, I will probably release the static library so that you can use it in your own application.
I have tested this only on windows 7 (64-bit), but it should work on any version of windows. See the readme for controls, as they are a bit confusing.
I hope you get some ideas out of it, and maybe even a little fun. I wonder if I could turn this into a drinking game? Hmm…