Von Physics Save Abandoned

"Arcade"-style game physics library

Project README

"Arcade"-style game physics

screenshot

After implementing far too many collision detection algorithms in my various experiments and games since 2009, I've decided enough is enough and compiled this tiny library of just the raw math behind collision detection and physical response.

It is meant to provide the minimal (and in most cases sufficient) system necessary for creating high performance real-time applications with dynamic objects interacting with each other.

Features:

  • Most efficient techniques for performant detection and response for axis-aligned 2D and 3D boxes and radial colliders
  • Mass and restitution only (sometimes less is more)
  • Continuous collision detection for 2D and 3D radial colliders
  • Signal dispatch on collision that provides collided entity and manifold describing the collision
  • "World" class with friction, gravity, and boundaries (infinity works too)
  • Memory-efficient broadphase (2D static grid)

Bonus 2D and 3D wandering behavior in the examples.

Note: If you use continuous detection and the broadphase grid, it can still miss some collisions because it doesn't check cells that the collider will be in after velocity is applied (it only uses position).

Full engines with readable code

These are engines that have fancy things like rotational torque, joints, and so on. If you want a "physics-based" game, use one of these instead. Or just use Unity, let's be honest. The web is terrible for games, if only because you can't safeguard your assets. Great for prototyping though, with the right tools :wink:

Resources

Other tricks

Open Source Agenda is not affiliated with "Von Physics" Project. README Source: vonWolfehaus/von-physics
Stars
36
Open Issues
0
Last Commit
7 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating