Physics & AI Demo
University project · Physics and pathfinding
This project implements a custom physics component and a set of grid search algorithms, then reuses both in a playable maze demonstration. The physics component maintains linear and angular state, accumulates forces and torque, and advances motion using Explicit Euler, Semi-Implicit Euler or Runge-Kutta 4. Swept movement supplies collision detection while the component handles bounce, friction, drag and resting behaviour rather than delegating the simulation to Chaos.
The pathfinding grid supports eight movement directions and prevents diagonal routes through blocked corners. Five search algorithms expose path cost, elapsed search time and explored node counts for comparison. In the maze game, the same systems drive pursuing ghosts and projectiles that temporarily stun them.
Technical highlights
- Compare Explicit Euler, Semi-Implicit Euler and Runge-Kutta 4 integration.
- Visualise five search algorithms and inspect path cost, search time and explored nodes.
- Combine pursuing ghosts with projectiles driven by the custom physics component.
Technical details
Custom physics
The component tracks linear and angular motion, accumulates forces and torque, and advances the simulation with the chosen integration method. Swept movement detects collisions without handing the simulation over to Chaos. Collision response accounts for bounce, friction, drag and resting objects.
Pathfinding and gameplay
The grid supports movement in eight directions while preventing diagonal paths through blocked corners. A*, Dijkstra, Best-First Search, Breadth-First Search and Depth-First Search report comparable metrics. The maze game reuses these systems for ghosts that chase the player and projectiles that temporarily stun them.
Project context
The project contains a physics test map, an interactive pathfinding map and a maze game. Each demonstrates the systems from a different perspective.