Get Updates By E-mail 

Cocos2D

News: Cocos2D Game Engine v1.0.0 Released

  •  
  •  
  •  
  •  
  •  

As you may have noticed if you have been reading this site for awhile, I occasionally mention product updates. This one is pretty significant as after numerous release candidates the incredibly successful open source Cocos2D iPhone game engine has finally released v1.0.0.

There are an incredible amount of feature updates since the previous official release of Cocos2D. This update from the last release candidate itself even adds support for non-power of two PVR textures.

If you are interested in some in-depth Cocos2D game development training please take this survey.

I will be getting together with a successful Cocos2D expert and putting together a comprehensive training course.

We will be giving out some free copies to those who fill in the survey. You can get to the survey by clicking here.

You can read the full feature list showing the updates included in v1.0.0 vs the last major release:
Cocos2D v1.0.0 Release Notes

Steffen Itterheim, author of the Learn iPhone and iPad Cocos2d Game Development book has created an installer that you can run on your Mac to easily install Cocos2D 1.0.0, Cocos3D and all the templates automatically.  You can find it here.

You can find the Cocos2D source on Github here:
https://github.com/cocos2d

Exciting news for Cocos2D devs.

Read more: iPhone Dev News


  •  
  •  
  •  
  •  
  •  

Open Source: 2D Isometric Action RPG Game Built With Cocos2D

  •  
  •  
  •  
  •  
  •  

Cocos2D has many features for those looking to develop isometric games. Handling of z-ordering, and tile maps are all built into the engine.

I’ve found an excellent open source game example known as KnightFight from Loz Archer of an isometric 2D tile based action rpg using Cocos2D. The game features a player controlled character that you move around the map, collisions between the player and map objects, simple computer controlled enemies, and basic player improvement through leveling.

You can find the source code on Github here:
https://github.com/lozarcher/KnightFight

A pretty simple game, but everything within it is very well done so if you are looking to create a tile based isometric RPG with Cocos2D this is a good example.


  •  
  •  
  •  
  •  
  •  

Tool: Easily Gather Sprite Data For Box2D And Generate Cocos2D Code

  •  
  •  
  •  
  •  
  •  

Found out about a pretty cool tool for those looking to develop games using Box2D (especially if you’re using Cocos2D — but really good for anyone using Box2D) called SpriteHelper.  It is a notch above the other tools I’ve seen doing similar.

What the tool allows you to do is easily gather information on any sprite such as UV, the vertex positions, position of the sprite within another image (for those of you using spritesheets), and the dimensions of the sprite’s rectangle — but most importantly the tool allows you to easily drag and create an outline around the shape, telling you if your shape will work with Box2D, you can then use the generated data, or even generate the actual Cocos2D code for your Box2D shape. Check out this video demo/tutorial:

The tool is currently only 0.99 cents at the moment in the Mac App Store. No word on whether it will go up in price.

You can find it here:
SpriteHelper

What I think really makes this tool different is just the ease of use, and the small details added to the tool that make things a bit easier.  If you are using Box2D, and especially Box2D and Cocos2D this should be a good time saver.

Thanks to the creator Vladu Bogdan for mentioning it in the iPhone and iPad development forum.


  •  
  •  
  •  
  •  
  •  

Handling Z-Ordering In Cocos2D Map Based Games

  •  
  •  
  •  
  •  
  •  

If you’ve used Cocos2D for awhile you may have had some difficult when trying to handle the display order of images.

Things get even more complicated if you are creating an isometric game.  The player character may need to be placed behind an obstacle such as a rock or a tree.  In v0.99.1 automatic z-ordering for tile maps was implemented, and the problem was somewhat solved, but some problems still exist and there is some tweaking to be done.

Another problem, especially with map-based games is creating a player HUD display as the images need to be placed at the right z-ordering and at a consistent location on the screen.

Nat Weiss has created a tutorial on how to overcome these problems by creating two different custom sprite classes which can be found here:
CCZSprite and HudLevelSprite

These two classes should be of help to anyone interested in creating a map-based game in Cocos2D.

Thanks for reading, if you like this please share it!


  •  
  •  
  •  
  •  
  •  

iPhone Game Physics Tutorial: Radial Gravity

  •  
  •  
  •  
  •  
  •  

Physics can be a great way to enhance your game.

The problem is that implementing physics in your game can be extremely challenging, but I found a couple of great examples showing how to enhance an iPhone or iPad game using radial gravity with Box2D.

The examples are from Nick Vellios, and as you can see in the example above they show how to implement radial gravity on an object so that other objects are drawn towards it (much like how planets are drawn to the sun).

The examples include:

How To Add Radial Gravity To Box 2D
Radial Gravity w/ Box2D SOURCE

And a third example on inverse radial gravity (think of objects exploding in all directions)
Bombs With Box 2D and Cocos2D

Cocos2D is used as the rendering engine in the examples.

By the way, can anyone remember the name of the nifty puzzle game that used radial gravity and won numerous indie gaming awards about 12 years ago? (yeah i’m stretching)

Thanks for reading, if you like this please share it!


  •  
  •  
  •  
  •  
  •