A physics-based 2D stickman simulation using Box2D and Raylib. The project implements a ragdoll physics system with interactive controls and debug visualization.
- Physics-based ragdoll stickman with realistic joint constraints
- Interactive mouse dragging of body parts
- Camera movement and zoom
- Debug visualization mode(f3)
- Event-driven architecture for clean component communication
- Box2D (v2.4.x) - Physics engine
- Raylib - Graphics and input handling
- CMake - Build system
- Clone the repository
git clone https://github.com/admin01-afk/StickmanPhysics.git
cd StickmanPhysics- Create and navigate to build directory
mkdir build
cd build- Build the project
cmake ..
makeOr use the provided VS Code task:
- Press
Ctrl/Cmd + Shift + Bor run the "build stickman" task
- WASD - Move camera
- Q/E - Zoom camera in/out
- F3 - Toggle debug visualization
- P - Pause/unpause physics simulation
- Left Mouse Button - Drag stickman body parts
- ESC - Exit application
When debug mode is enabled (F3):
- Grid overlay showing world space
- Mouse position in both screen and world coordinates
- Physics body outlines and joint connections
The project is structured around several key components:
- Input processing with event emission
- Box2D physics simulation
- Raylib-based rendering
- Event bus for cross-component communication
- Centralized shared data management
- Implementation of a dual stickman system:
- Animation-driven skeleton for pose control
- Physics-based ragdoll that follows animations
- Realistic physical responses to impacts and forces
- Weighted force application for balance control
[Insert License Information]
[Insert Contribution Guidelines]