O'Reilly logo

Cocos2d for iPhone 1 Game Development Cookbook by Nathan Burba

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a top-down isometric game engine

By making some modifications to Box2D we can turn a 2D world into a 2.5D world. We will see this 2.5D sandbox in action in this recipe.

Creating a top-down isometric game engine

Getting ready

Please refer to the project RecipeCollection02 for full working code of this recipe. Also note that a large amount of code from this recipe has been omitted for brevity.

How to do it...

Execute the following code:

@interface GameIsoObject : GameObject { @public float yModifier; //This is typically half the height of the object. It allows us to change the sprite y. float actualImageSize; //This is the actual size of the image (48x48, 96x96, etc) float inGameSize; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required