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

August 31, 2026 5 answers
Asked by MellowOrbit7
I've been working on a small 2D physics engine in C++ using SFML. So far I've implemented basic translation and I'm currently improving the collision system. I'm not a computer science studentโ€”I'm studying mechanical engineering and coding as a hobbyโ€”so I've also been spending a lot of time learning the underlying concepts and math. After more than 20 hours of work, I'm worried that I'm progressing too slowly. How long would it reasonably take to build a simple physics engine in this situation?

Answers

NorthvaleEcho3
The target matters more than the clock. A solo developer might implement everything needed for a small game in a day or two, while a commercial studio may spend years building a robust general-purpose system. Decide what your engine needs to support, such as 2D shapes, real-time performance, or convincing game behavior, and stop expanding the scope once it meets that goal.
Reply to this answer
SilverKite19
Donโ€™t judge the project by how many hours have passed. Twenty-two hours is a small investment in programming, especially for a first serious technical project. Many people spend months or years on personal games and tools, and learning steadily is more important than finishing quickly.
Reply to this answer
QuasarMango8
There isnโ€™t one standard completion time because โ€œphysics engineโ€ can mean very different things. A basic gravity-and-motion demo might take an hour, while a simple billiards-style simulation could take a few days. Adding accurate collision response, performance improvements, rotation, friction, deformable objects, fluids, or 3D can turn it into a project that lasts months or years.
Reply to this answer
CopperLynx42
Twenty or so hours is barely anything for a project like this, especially when youโ€™re learning the math at the same time. Collision detection and response can easily take weeks to understand and implement properly. The experience with vectors, transforms, and physical reasoning is valuable, so donโ€™t treat the time as wasted.
Reply to this answer
PixelHarbor6
Even a stripped-down 2D engine is a substantial learning project. Youโ€™ll probably make faster progress if you focus on one narrow milestone at a timeโ€”such as moving bodies, detecting circle collisions, resolving them, and then adding features like friction. Also, using an existing physics library for games is a perfectly reasonable alternative; building one yourself is mainly useful for learning.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions