Archive for the 'physics engine' Category

LevelSVG map editor

My second game will be a platform game.
One of the most time-consuming tasks in developing platform games is creating good level maps. Therefore, I have put a lot of effort in trying to ease this task by creating an SVG parser that supports:
  • Basic physics objects like: rect, circle, lines, bezier paths and nested transformations
  • The possibility to edit physics properties like: density, friction, restitution and isSensor
  • The possibility to link SVG elements with pre-defined physics objects and cocos2d sprites
  • Collision detection logic between these elements
  • Jump logic (the hero only jumps when touching the ground)
  • Movement logic (tilt, d-pad)
Example video:
The source code of this level “editor” will be available for purchase in a few days.

Experimenting with cocos2d + physics engine

Coding real games is the best way to evaluate how useful a game library is (like cocos2d).

I’m really happy with cocos2d, and the way it has evolved, but I think cocos2d needs to have better integration with a physics engine (box2d, chipmunk, or any other physics engine).

And by integration I mean:

  • An easy way to edit a physics world (bodies, shapes, etc.)
  • An easy way to edit visual world (eg: using tile map)
  • An easy way to match the physics world and the visual world

Ideally all these steps should be integrated using just 1 editor.

But before coding 1 editor that integrates physics + visual worlds, I’m exploring the existent alternatives.

For example, the tiled editor is a really good tile map editor (supported since cocos2d v0.8.1), and inkscape can be used to draw physics edges. But is it easy to mix those editors ? What are the alternatives ?

Well, that’s what I’m doing now… I’m building a platform game with the idea to evaluate how easy is to code it using cocos2d.

The 1st step I took was to learn box2d. If you want to test the latest box2d version (from svn) inside the iPhone without cocos2d, use this patch. And if you want to use the latest box2d version with cocos2d, then you should use the latest cocos2d svn revision.

Did you code a platform game using cocos2d ? Would you mind sharing your experience ?