The aforementioned physics engines failed basic physics tests or had very complex code bases to the point that I think this route will be easier. I did notice that many of these engines especially PhysX and Bullet do a lot of tricks to correct their simulations. I assume one reason that they include such tricks is to optimize for performance on a wide range of hardware.
So I think it couldn't be that hard to write a simple (rigidbody) physics resolver that is only designed to run in a single thread on X86 based processors. And also I don't think I need to mess around with too many optimizations since the levels in my game are pretty small, so I might just be able to get away with it. I never dabbled too much into the nuts and bolts of a physics engine so I am quite unsure about certain things could be done.
For instance let's assume a simple case. I have a digital scale and I want to measure the weight of whatever's on top of it. So the way I would like to do it is to simply measure the amount of force that is being applied to the surface of the scale and display that. That way, when 2 objects are stacked on top of each other, it shows the correct stacked weight. Or if there is another object like a press, pushing towards the surface of the scale, then it also would show the force that the press is applying.
I don't know how to implement a system like this. Do you know of a cool way of achieving a system like this? Also if you have any tips or cool resources for physics simulations, I'd appreciate them!
That's for theory side. From engineering viewpoint the desire to create from scratch is always strong and most often regretted later. One thing you may not expect, for physics engine to detect and resolve collisions between various shape types (sphere, box, cylinder...), each combination of shapes needs to be implemented separately. This is a lot of code riddled with edge cases just for that feature. Maybe dig through a few papers that describe implementations before starting your own.
If your game loop is running at 60 fps then each frame exists for about 0.017 seconds. What happens if you have a 10 Kg weight sitting on your scale for the duration of half a frame (0.008 seconds), will your engine display 5 Kg on the scale, or what?
Interesting problems to solve, but can easily take up all your game development time.