A robust and efficient C++ physics engine for 2D/3D simulations, featuring collision detection, rigid body dynamics, and soft-body physics. Designed for easy integration into game engines and simulation projects.
David Iwezulu
- Rigid Body Dynamics: Simulate solid objects with mass, velocity, and acceleration.
- Soft Body Physics: Simulate deformable objects like cloth and jelly.
- Collision Detection: Detect and resolve collisions between objects.
- Extensible Design: Easily extend functionalities or integrate into existing projects.
- Cross-Platform: Compatible with Windows, macOS, and Linux.
- C++17 or later
- CMake 3.10 or later
- A compatible C++ compiler (GCC, Clang, MSVC)
git clone https://github.com/davidiwezulu/GamePhysicsEngine.git
cd GamePhysicsEngine
mkdir build && cd build
cmake ..
make./examples/RigidBodyDemo
./examples/SoftBodyDemo
Include the engine in your project:
#include "PhysicsEngine.h"
// Create a physics engine instance
PhysicsEngine physicsEngine;
// Add physics bodies
RigidBody* rigidBody = new RigidBody();
physicsEngine.addRigidBody(rigidBody);
// Run the simulation
double deltaTime = 0.016; // 60 FPS
physicsEngine.update(deltaTime);
Detailed documentation is available in the docs/ directory or can be generated using Doxygen.
Contributions are welcome! Please read the CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries, please contact David Iwezulu at me@davidiwezulu.co.uk.
---
## 📄 **CONTRIBUTING.md**
```markdown
# Contributing to GamePhysicsEngine
Thank you for considering contributing to the GamePhysicsEngine! Here are some guidelines to help you get started.
## How to Contribute
1. Fork the repository.
2. Create a new branch (`git checkout -b feature/NewFeature`).
3. Commit your changes (`git commit -am 'Add new feature'`).
4. Push to the branch (`git push origin feature/NewFeature`).
5. Create a new Pull Request.
## Coding Standards
- Follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
- Write doc blocks for all public classes and functions.
- Write unit tests for new features.
## Reporting Issues
Please use the [GitHub Issues](https://github.com/davidiwezulu/GamePhysicsEngine/issues) to report bugs or request features.
## Author
**David Iwezulu**