4 ms·
This example is using box2d for something that can be implemented with very simple code dropping this important dependency IMHO. Box2d is a great fit when real
by antirez 14y ago
This example is using box2d for something that can be implemented with very simple code dropping this important dependency IMHO. Box2d is a great fit when real 2D physics simulation is needed, but for apples falling at constant speed and jumps, it's not worth it.
- 1qaz2wsx3edc 14y agoThis example also has bugs. 1. Rapidly pressing up executes multiple jumps. 2. You can climb up the side of a block/group or just get stuck on it. Also the jump feels off.
- silv3r_m00n 14y agothe climbing on the side of the block is actually default box2d behaviour with bodies having friction. to make it slide off the side needed a bit of complex construction which i avoided to keep the tutorial simple.
- DanielRibeiro 14y agoThere is also this simple game using box2d in both Clojurescript[1] and Coffeescript[2], which can also help those starting with it. I wrote a little abut it[3]. [1] http://danielribeiro.github.com/ClojureCoffeeScriptGame/ http://danielribeiro.github.com/ClojureCoffeeScriptGame/ [2] http://danielribeiro.github.com/ClojureCoffeeScriptGame/clojure/physicsGame.html http://danielribeiro.github.com/ClojureCoffeeScriptGame/cloj... [3] http://metaphysicaldeveloper.wordpress.com/2011/08/28/clojurescript-vs-coffeescript/ http://metaphysicaldeveloper.wordpress.com/2011/08/28/clojur...