How Long Does It Usually Take to Build a Simple Physics Engine?

September 2, 2026 5 answers
Asked by MellowCedar8
I've been working on a small physics engine in C++ using SFML for quite a while. So far I've implemented basic translation and I'm now refining the collision system. I'm not a computer science studentโ€”I'm studying mechanical engineering and learning a lot of the programming and math as I go. I've already spent more than 20โ€“22 hours on the project, and I'm starting to wonder whether that's an unreasonable amount of time for something this simple. How long should building a basic physics engine realistically take, especially for someone learning along the way?

Answers

RiverPine52
A useful alternative is to use an existing physics library when you want to focus on making a game or simulation. Building your own engine is a great learning project, but you donโ€™t need to finish a complete general-purpose engine before you can create something interesting.
Reply to this answer
QuartzMango27
Twenty-two hours is practically nothing for a project like this, especially since youโ€™re learning the underlying concepts instead of just copying an implementation. Collision detection alone can take weeks depending on how far you go. Keep at itโ€”building a first engine is mainly about developing intuition for vectors, transforms, and simulation.
Reply to this answer
BrightOwl41
There isnโ€™t one fixed answer because โ€œphysics engineโ€ can mean anything from applying gravity to simulating complex three-dimensional worlds. A falling box might take an hour, while a basic billiards simulation could take several days. Add requirements like accuracy, performance, friction, air resistance, large numbers of objects, or real-time operation, and the project can grow dramatically.
Reply to this answer
NimbleHarbor6
The amount of time depends entirely on the result you want. A solo developer might create the physics needed for a small game in a day, while professional studios can have entire teams improving physics technology for years. If your goal is learning, the time spent is part of the valueโ€”not a sign that youโ€™re doing poorly.
Reply to this answer
CopperSparrow19
Even a two-dimensional physics system can become a substantial project. You have to deal with collision detection, collision response, numerical stability, and edge cases. Itโ€™s fine to start with a narrow goal, such as circles and rectangles with gravity, then add features one at a time.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions