All posts about Box2D

Understanding Box2D’s one-way platforms, aka CLOUDS

One of the new features introduced with Box2D 2.1a is the improved contact listener class which comes in hand when we want to create one-way platforms, or “clouds”. This can be made thanks to a function called before the contact is processed… something like “hey, two bodies are about to collide, what should I do?”… […]

Box2D Flash game creation tutorial – part 2

After seeing the character creation in Box2D Flash game creation tutorial – part 1, it’s time to add some coins to collect. This process will involve some interesting Box2D features, like sensors and custom collision management. I would suggest to read the basics of sensors at Erase Box: the tutorial and custom collision management at […]

Box2D Flash game creation tutorial – part 1

My first Flash game tutorial ever was Flash game creation tutorial – part 1. It was the first of a series to create a game like jmtb‘s ball games. It was an old AS2 series, and some steps have been ported in AS3 with Create a Flash ball game using AS3. The “ball” game is […]

Understanding Box2D applicable forces

In Box2d, bodies aren’t only affected by gravity and collisions, but you can also apply forces to them. Knowing the right force to apply is very important when you want to control a body, as you may want to do in a Flash game Let’s see the forces you can apply: Applying a force public […]

Create incredible particle effects with Partigen 2

Do you remember Partigen? Andrew Fitzgerald from Desuade released the new version, of his amazing particle effects engine: Partigen 2. Featuring over 120 exclusive preset effects, Partigen 2 is the first and only extension for Flash that let’s you to create complex particle effects in just a click. The list of features is huge, so […]

Box2D tutorial for the absolute beginners – revamped

About a year ago I published a Box2D tutorial for the absolute beginners. With 2.1 release, a lot of things changed, so it’s time to publish another tutorial for the absolute beginners. In this tutorial we’ll cover needed libraries to import, world creation, debug draw and the creation of static and dynamic boxes and circles. […]

Box2DFlash 2.1a released – what changed

Some days ago Boris the Brave released the new version of the popular physics library. There are some critical changes that won’t make old projects run in the new environment. The most important ones are: It is now not necessary to specify a size for your world, it’ll always be large enough. Improved collisions system […]

Way of an Idea Box2D prototype – Step 3

Welcome to the 3rd part. In part 2 we allowed the player to draw the chalk track in a “paused” Box2D environment and then run the simulation. Now it’s time to delete our chalk track. A bit of theory: although the simulation is paused, the chalk bodies are already placed in the Box2D world. So […]

Shrink it Box2D prototype – Step 2

In the previous step I showed you how to shrink/expand any kind of polygon. Anyway in the original game, you can’t expand objects as much as you want, because you need mass to do it, and this adds strategy to the gameplay, because you have to shrink objects to gather the necessary mass to expand […]

Way of an Idea Box2D prototype – Step 2

It’s time to apply the concepts seen at Pausing a Box2D simulation with Way of an Idea Box2D prototype to create a paused Box2D simulation that will start only when you’ll press SPACE, and meanwhile you can draw paths, just like in the original game. The only problem with this technique is you can’t use […]