🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

I wrote a Physics Engine and Articles for Beginners

Started by
3 comments, last by alwekyerp 6 years, 9 months ago

I wrote a 3D Physics Engine in C++ that uses GJK, EPA, and a Sequential Constraint Solver. I wrote it with two goals in mind:

  1. Stacking blocks - it's stable at around 200, and a lot of fun to watch when they all fall down
  2. Education - I wanted to create a Physics Engine I could write about to help other people learn.

Point #2 is why I'm sharing today. I've written 11 posts that aim to teach the Physics Engine. I start from the beginning, Points and Vectors in 3D, and move up to the GJK algorithm for collision detection. There's a lot more I could cover, but I thought I'd share what I have so far to see if anyone is interested. 

The engine itself is on github: https://github.com/SaintDubious/DubiousEngine
And the articles are on my website: http://dubiousoft.com/2017/01/23/dubious-engine-table-of-contents/

If anyone is interested in learning how to make a Physics Engine, I hope you'll find this useful. I'd greatly appreciate feedback, discussion, questions, corrections, etc.

Thanks.

Advertisement

Cloned the repo, had trouble building in 64bit, couldn't find your Utils.h include. Tried 32 bit and couldn't find SDL. Maybe you could try including the SDL headers into your project so people can just download and build without tinkering?

Thank you for this. I'm not in need of one now (I'm working on 2D games atm and, coincidentally, using ^^^ that guy's ^^^ 2D collision library), but I've bookmarked it for when I move to 3D in the future.

I had a glance through some of the articles you wrote, and they seemed very clear and straightforward.

On 10/6/2017 at 12:35 AM, Randy Gaul said:

Cloned the repo, had trouble building in 64bit, couldn't find your Utils.h include. Tried 32 bit and couldn't find SDL. Maybe you could try including the SDL headers into your project so people can just download and build without tinkering?

Thanks for the feedback, I really appreciate every extra set of eyes. You're right, the build is a mess, I haven't looked at it in ages. I've created an issue for myself to clean it up. I'm not sure if I'm allowed to include SDL within my own github repo, but I can certainly provide some clear build instructions so no one else has to flail.

Edit: I've finished with the cleanup. Now the 64 bit stuff seems to work as well. I hope everything has been sanitized. Unfortunately it's still a bit tough to figure out how to get OpenCL for your graphics card, I'm not sure how I can clean that bit up, but the SDL stuff it simpler.

Thank you.

This topic is closed to new replies.

Advertisement