Skip to content

xem/mini2Dphysics

Repository files navigation

Mini 2D Physics

Mini 2D Physics is a minimalistic physics engine, designed for codegulf competitions such as js13kgames.

More info on https://xem.github.io/codegolf/mini2Dphysics.html

How it works

The code here assumes that you use squares and circles in a 2D world under the influence of gravity. It features collision detection and respects reciprocal forces between objects.

Each frame is drawn after the canvas element got cleared.

mini2Dphysics in the wild

If you use this code here, please fill a Pull Request to add your project to this list. I can't wait to see how you used it!

License

This code is released into the Public Domain.