Last week I explained The magic of compound objects with Box2D, now it’s time to understanding custom polygons. First, let me tell you the difference between a compound object and a custom polygon. A compound object is an object made by two or more primitive objects (like the maze I created in this tutorial). A …
Box2D
You can call it complex shapes, compound shapes, complex objects, compound objects or even poisoned underpants, but you all want to create complex “things” with Box2D. Despite the “complex” word, it’s very easy to create one. You just have to add multiple shapes to a body. If you followed my latest Box2D tutorials, you will …
When you are about to create a complex script with Box2D – or even a simple one, but that’s complex for your skills – I suggest to enable debug draw. Debug draw will provide you everything you need in order to verify your script is working correctly, and once you are satisfied with the result, …
This is ideally the next part after Understanding pixels and meters with Box2D and how to select an object with mouse – part 2, but it’s so important understanding how to drag objects with Box2D that I decided to change the title. Anyway, in this uncommented example (a commented one will follow) you can select …
Ok, time to learn once for all how does Box2D manages object sizes, and how to set them right when working with AS3 In previous step I used a 90×90 pixel crate. The problem is Box2D does not works with pixels because it does not have a native pixel render engine. In other words, Box2D …
This will be the longest post title in blogging history… anyway I am about to explain you two things that seem to be still unclear about AS3 version of Box2D. The first one is Box2D measuring units that may seem weird until you realize Box2D works with meters where 1mt = 30 pixels. The second …
If you played Splitter in these days, you probably enjoyed the gameplay thanks to the knife cutting and slicing various objects in the game Obviously you can made your own splitter game with BOX2D, and the “only” problem seems to be the knife. Well, in the BOX2D official forum there is a thread where a …
Read all posts about "Splitter" gameI wrote about Box2D Flash version about a year ago, then I published Playing with Box2DFlashAS3 and Create a Flash game like Totem Destroyer as examples covering what you can do with this library. But I was really impressed by a thread on TriquiTips submitted by Hawdon called Box2DAs3 For Beginners! (read steps 1 and …
Read all posts about "Platform game" gameAn interesting game released these days is Totem Destroyer Your mission is to destroy the totems without letting the golden Idol (aka Tot) fall into the ground. It’s a game that can be easily done with the AS3 physics engine Box2DFlashAS3, recently updated at version 2.0.1 I already talked about it in the post Playing …
Read all posts about "Totem Destroyer" gameSome time ago I told you to watch Box2DFlashAS3 physics engine. I dont’ know if you did it, but I did. While the original Box2D project come to 2.0.0 version, the AS3 porting is “still” at 1.4.3, but soon it will be upgraded. So I think it’s absolutely time to play with this library. While …