Planck.js – JavaScript Rewrite of Box2D Physics Engine | HTML5 Game Development (original) (raw)

Planck.js demos

There’s a new 2D physics engine in town called Planck.js. It is a JavaScript rewrite of Box2D, the free, open source 2-dimensional physics game engine famously used to create Angry Birds. (Side note: Angry Birds didn’t originally credit Box2D).

Box2D is written using C++ and is platform-independent. The creator of Planck.js wanted a readable and maintainable JavaScript code, with a library optimized for web and mobile platforms.

So he is developing Planck.js, motivated to provide a JavaScript-friendly API that takes advantage of Box2D’s efforts and achievements.

Several interesting demos are available for testing. Below are some of our favorites:

Car – Drive a car through a hilly terrain and encounter a bridge, some barriers, and gaps along the way

Planck.js demo - car

Asteroid – Shoot at asteroids, which break into smaller and smaller pieces. Avoid getting hit!

Planck.js demos - asteroid

Theo Jansen – Move small circle objects using a large arachnoid kinetic sculpture.

Planck.js demos - Theo Jansen

Pyramid – Topple down a large pyramid made up of numerous squares

Planck.js demos - Pyramid

Mobile Balanced – Play around with a hanging mobile

Planck.js demos - mobile balanced

Learn more about Planck.js here.