Feel free to fix/add documentation to the wiki

cocos2d for iPhone v0.8.2 Release Notes

Download

You can download cocos2d for iPhone v0.8.2 from here:

http://cocos2d-iphone.googlecode.com/files/cocos2d-iphone-0.8.2.tar.gz

cocos2d v0.8.2 is SVN revision 1475

Documentation

You can find the v0.8.2 documentation here:

Performance

To understand how fast cocos2d v0.8.2 is, please see the performance tests:

New features

Actions: New Ease actions

Issue #530, #546, #568

New ease actions were added:

  • Support for Ease Elastic actions: In, Out and InOut
  • Support for Ease Bounce actions: In, Out and InOut
  • Support for Ease Back actions: In, Out and InOut

Full example:

Configuration file

Issue #551

You can customize at compile time certain features of cocos2d by editing the ccConfig.h file.

Features to customize:

  • Turn on/off debug draw functions in Label, Sprite and AtlasSprite objects
  • Turn on/off sub-pixel rendering
  • Turn on/off FontLabel support
  • Turn on/off some aspects of the Director

ccConfig.h file:

FontLabel Support

Issue #534, #582

FontLabel is a subclass of UILabel that let's you load any TTF (True Type Font) file.

Since cocos2d v0.8.2 you can use load your custom .ttf font using the Label class. Example:

// simple API
Label *label = [Label labelWithString:@"hello world" fontName:@"Abduction" fontSize:24];
 
// more complex API
Label *label2 = [Label labelWithString:@"hello world" dimensions:CGSizeMake(480,50) alignment:UITextAlignmentLeft fontName:@"Paint Boy" fontSize:32];

Full example:

Transition: New PageTurn transition

Issue #522

A new PageTurnTransition was added. It simulates the movement of turning a page. You can turn the page forward or backwards.

Full example:

Improved features

Actions

Issues #489, #562, #584, #586, #324

''stop'' improvements

  • Actions call [super stop] / [other stop]. Before v0.8.2rc1 there were certain compound actions that weren't calling [other stop]
  • stop sets the target to nil
  • start method was replaced with the startWithTarget:(id)target target
Internal Action OLD API
-(void) start
Internal Action NEW API
-(void) startWithTarget:(id)target

These improvements prevents certain crashes under complex actions.

Bezier improvements

  • BezierBy implements the reverse method correctly
  • Added BezierTo action
  • removed the startPoint from the ccBezierConfig structure (it wasn't needed)

Jump improvement

  • JumpBy/JumpTo uses parabolic jump instead of sine jump. It's more realistic

Rotate improvement

  • RotateTo: rotates using the minimum distance. A bug was preventing the minimum distance with certain angles.

BitmapFontAtlas

Issue #517, #536, #537, #538, #596

Improvements:

  • Fixed bugs related to the spacing and contentSize
  • Supports Cyrillic characters (unicode characters up to index 2048).

BitmapFontAtlas should render without problems fonts with any kind of spacing / padding.

Box2d Integration

Issue #494

Improvements:

  • Added Box2D r22.
  • Box2d + Cocos2d testbed were updated
  • Box2d demo updated

A new template that includes cocos2d + box2d was added. To use it, just do:

$ cd cocos2d-iphone
$ . ./install_template.sh

Chipmunk Integration

Issue #XXX

A new template that includes cocos2d + chipmunk was added. To use it, just do:

$ cd cocos2d-iphone
$ . ./install_template.sh

CocosDenshion

Issue #526, #545

Improvements:

  • Added muted property in SimpleAudioEngine
  • Added preloadBackgroundMusic and willBackgroundMusicPlay in SimpleAudioEngine

CocosNode

Issue #528

Improvements:

  • Added a method that returns the axis-aligned bounding box. It takes into account any possible transformation from it's ancestors. Useful for ad-hoc collision detection
CocosNode New API
+(CGRect) boundingBox

Director

Issue #531, #524, #560,

Improvements:

  • Fixed leaks en calling Director#end
  • Added 2 new types of Directors:
    • DisplayLink director, that uses CADisplayLink (only available on SDK 3.1 or greater)
    • Threaded director, that calls the main loop from a thread, but the main loop executes on the main thread.
  • added a way convert coordinates to the UI world.
Director New API
+(BOOL) setDirectorType:(ccDirectorType)
-(CGPoint) convertToGL:(CGPoint)
-(CGPoint) convertToUI:(CGPoint)
Director Deprecated API
+(void) useFastDirector
-(CGPoint) convertCoordinate:(CGPoint)

Parallax Scroller

Issue #565

Improvements:

  • Supports any number of children

Particles

Issue #241

Improvements:

  • Free movement uses world coordinates, useful in moving layers like parallax
  • Added Parallax + Particle test on the Particles test

RenderTexture

Issue #XXX

Improvements:

  • Added RenderTexture example

TMX map

Issues #574, #587

Improvements:

  • HUGE performance boost when loading the maps. Time reduced from 40 seconds to 0.5 seconds on big maps.
  • Supports Layers without tiles

Compatibility Issues

Compatibility issues with version 0.8.1

Deprecated /Removed API

Deprecated API New API
-(CGPoint) Director#convertCoordinate:(CGPoint) -(CGPoint) Director#convertToGL:(CGPoint)
-(void) Director#useFastDirector -(BOOL) Director#setDirectorType:(CCDirectorTypeMainLoop)
Removed API New API
-(void) Action#start -(void) Action#startWithTarget:(id)target

Added / Removed Files

New Files

The following files were added to cocos2d:

  • cocos2d/ccConfig.h
  • cocos2d/PageTurn3DAction.h
  • cocos2d/PageTurn3DAction.m
  • cocos2d/PageTurnTransition.h
  • cocos2d/PageTurnTransition.m
  • external/FontLabel/*

Removed Files

The following files were removed from cocos2d:

  • None

Changes from v0.8.1

Full changelog: CHANGELOG

Changes in v0.8.2-final

version 0.8.2 - 19-Oct-2009

  • Actions: Animate copy restoreOriginalFrame parameter (issue #602)
  • ChipmunkTest: uses new API to set director type (issue #XXX)
  • CocosLive: doesn't use deprecated methods (issue #604)
  • MenuItem: added isSelected property (issue #601)
  • Tests: removed copyrighted fonts (part of issue #596)

Changes in v0.8.2-rc1

version 0.8.2-rc1 - 14-Oct-2009

  • Actions: start/stop sets the target (issue #489 and issue #589)
  • Actions: Compound actions call “inner” stop (issue #489 and #issue #589)
  • Actions: Fixed BezierBy reverse. BezierBy doesn't use startPosition (issue #586)
  • Actions: added BezierTo (issue #562)
  • Actions: RotateTo uses min distance (issue #584)
  • Actions: JumpBy/To uses parabolic function (issue #324)
  • BitmapFontAtlas: added limited unicode support (issue #596)
  • Director: Rolling back buffer format. Default buffer format is RGB565.
  • FontLabel: updates version from git 2009-10-07 (issue #582)
  • Particles: FreeMovement uses World-Coordinates (issue #241)
  • Tests: Added Particle + Parallax test (part of issue #241)
  • TileMap: TMXLayers work without tiles (issue #587)
  • TileMap: TMX maps HUGE performance boost (issue #574)

Changes in v0.8.2-rc0

version 0.8.2-rc0 - 5-Oct-2009

  • Actions: Added EaseBack family actios (issue #568)
  • AtlasSprite: set atlasIndex to invalid on remove (issue #569)
  • Box2d: using google code r22 (pre v2.1.0) (issue #494)
  • CocosNode: Better message error on scale (issue #556)
  • Effects: [effect copy] works (issue #573)
  • Effects: restore orignal director projection (issue #573)
  • Extras: added Joystick (issue #XXX)
  • FontLabel: updates version from git (issue #582)
  • Macros: CCLOG uses the “cocos2d:” prefix (issue #XXX)
  • Parallax: fixed limit of 5 children (issue #565)
  • Templates: works with FontLabel (part of issue #534)
  • Templates: added cocos2d+chipmunk template (issue #XXX)
  • TextureAtlas: insertQuad fixed signed math (issue #575)

Changes in v0.8.2-beta

version 0.8.2 - XX-MMM-2009

  • All: ccConfig.h file added (issue #551)
  • Actions: added Ease Elastic actions (issue #530)
  • Actions: added Ease Bounce actions (issue #546)
  • Actions: added PageTurn3D action (issue #522)
  • BitmapFontAtlas: fixed contentSize (issue #536, #538)
  • BitmapFontAtlas: fixed offset/width (issue #537)
  • BitmapFontAtlas: only supports Latin 1 chars (issue #517)
  • Box2d: using google code r21 (pre v2.1.0) (issue #494)
  • CocosDenshion: muted property in SimpleAudioEngine (issue #526)
  • CocosDenshion: added preloadBackgroundMusic and willBackgroundMusicPlay to SimpleAudioEngine (issue #545)
  • CocosNode: improved doxygen documentation (issue #XXX)
  • CocosNode: added boundingBox method (issue #528)
  • Director: added convertToUI and renamed convertCoordinate to convertToGL (issue #531)
  • Director: fixed 2 leaks on Director#end (issue #524)
  • Director: Added a threaded FastDirector (issue #560)
  • Director: Added a CADisplayLink Director (issue #560)
  • Director: buffer default pixel format is RGBA_8888
  • Documentation: doxygen builds OK when there are spaces in the path (issue #540)
  • Label / Texture2D: Supports any .ttf via FontLabel (issue #534)
  • LabelAtlas: works with 256 different chars (issue #516)
  • RenderTexture: added RenderTexture test (issue #XXX)
  • Resources: improved directory structure (issue #552)
  • Template: using removeUnusedTextures (issue #550)
  • TileMap: TMX supports multiple tilesets (1 tileset per layer) (issue #510)
  • TileMap: TMX raises expection if map is not encoded and/or gzipped (issue #559)
  • Transition: ease actions can be overriden (issue #548)
  • Transition: added PageTurnTransition (issue #522)