Component-Based 2D Physics Engine
A C++ Entity Component System with 2D Rigidbody & Collider physics.
Project Demonstration
The demonstration implementation for this project allows the user to possess a circle, using WASD and Space to bounce around. The demo level features a circle and a box as physics objects which the user can push around, as well as an immovable physical environment [in the form of static rectangular boxes].
Rigidbodies & Colliders
A range of functionality is supported for the project’s Rigidbodies, including adding momentum through either Force or Impulse, modifying elasticity during runtime, and toggling between being static [ie. immovable physical object] or not. The project supports collider types for Circle, Box, and Capsule colliders.
Entity Component System
In this project, every object starts as an empty entity, and is engineered to have components added onto it. In addition to the Rigidbody and various Collider types, Box Renderer and Circle Renderer components are supported for drawing these objects to the screen.
The project also supports shortcuts for setting up these objects, where component macros can be used to set up renderer, rigidbody, and collision components on an object with just one function call.