Much of the code is poorly written, optimized, and generally messy (😅 I was learning a LOT at this point...)
I may return to this project at some point (and start over lol) but for now, the project is archived.
This project is a simple 2D Physics Engine made with Python and Pygame.
It may be used to build a game later on, but for now the engine itself is still under development.
The engine is based off of bodies, shapes with a position and size that can be collided with.
Static Body VS Kinematic Body
The Static Body is the base class for all bodies. These bodies cannot move - they are in a fixed position. They have a material type, coefficient of friction and elastic collision energy return value.
The Kinematic Body inherits from the Static Body. These bodies can move - They have mass, velocity, acceleration, force, coefficient of friction, gravitational acceleration, air resistance and momentum transfer (with each other)
The collision system needs to be completely rewritten. Overtime it has become spaghetti-code that is increasinlgy hard to debug, and the way it is structured could be improved. Currently, collisions are a method of the bodies themselves, which was a poor choice. Instead, body interactions/collisions should be its own class, taking in two bodies as parameters and dealing with both of them at synchronously in an organized fashion.
Body Linking
Rotational Motion
Ramps
Circular Collision Masks