Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

cocos2d for iPhone v0.8.1-beta Release Notes

Download

You can download cocos2d for iPhone v0.8.1-beta from here:

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

cocos2d v0.8.1-beta is SVN revision 1268

Documentation

You can find the v0.8.1 documentation here:

Performance

To understand how fast cocos2d v0.8.1-beta is, please see the performance tests:

  • v0.8.1-beta performance tests is not available FIXME

See v0.8 performance test

New features

Tiled Map (TMX) support

Issues #462, #473

tiled is an open source tile map editor that supports:

  • orthogonal maps
  • isometric maps
  • and hexagonal maps

Since v0.8.1, it's possible to use the maps generated by tiled in your games.

For more information about how to use it, please, read the programming guide:

Example:

RenderTexture

Issue #XXX

The new RenderTexture class let's you render CocosNode objects into an OpenGL texture.

Features:

  • You can save the texture into a file: .PNG and .JPEG formats
  • You can edit the texture like any other OpenGL texture
  • You can create an UIImage from the texture

ParticleView

Issue #480

ParticleView is a cocos2d particle editor. It let's you edit all the particle's properties.

To run it:

  1. Open cocos2d-iphone.xcodeproj
  2. select the ParticleView target
  3. run the selected target

The ParticleView source code is in:

  • tools/ParticleView

Improved features

BitmapFontAtlas

Issue #464

Improvements:

  • .fnt files as well as .png files can be loaded from subfolders

Box2d integration

Issues #493, #494

Improvements:

  • Box2d svn r228 from SourceForge was integrated into cocos2d.
  • The DrawDebugData method can be used within cocos2d.

Box2d integration is also an stable feature (promoted from experimental)

How to use world#DrawDebugData:

-(id) init
{
	if( (self=[super init])) {		
		world = new b2World(worldAABB, gravity, doSleep);
 
		// add to the world, the Debug Draw object with the correct pixels-to-meters ratio
		m_debugDraw = new GLESDebugDraw( PTM_RATIO );
		world->SetDebugDraw(m_debugDraw);
 
		// which objects should we draw ?
		uint32 flags = 0;
		flags += 1	* b2DebugDraw::e_shapeBit;
		flags += 1	* b2DebugDraw::e_jointBit;
		flags += 1	* b2DebugDraw::e_controllerBit;
		flags += 1	* b2DebugDraw::e_coreShapeBit;
		flags += 1	* b2DebugDraw::e_aabbBit;
		flags += 1	* b2DebugDraw::e_obbBit;
		flags += 1	* b2DebugDraw::e_pairBit;
		flags += 1	* b2DebugDraw::e_centerOfMassBit;
		m_debugDraw->SetFlags(flags);
	}
	return self;
}	
 
// draw the shapes at "draw" time
-(void) draw
{
	[super draw];
	glEnableClientState(GL_VERTEX_ARRAY);
	world->DrawDebugData();
	glDisableClientState(GL_VERTEX_ARRAY);
}

Full example:

CocosNode

Issues #476 #482

Improvements:

  • parent property is set to nill only after calling onExit
  • added the userData property

The userData is a void* property can be used for the purpose that you want.

sprite1.userData = (void*) 10;
sprite2.userData = (void*) sprite1;
 
int value = (int) sprite1.userData;

MotionStreak

Issues #405 #484

Improvements:

  • The API was updated in a way that is uses the new cocos2d v0.8 structures.
  • New examples were added

The MotionStreak feature was promoted from experimental to stable.

Full example:

Template

Issue #469

A cocos2d application template was added, and the MyFirtGame project was removed. The template is more useful than MyFirstGame project, since it let's you start a new cocos2d empty project with a single click every time that you want.

How to:

  1. Install the template
    1. Open a terminal
    2. $ cd cocos2d-iphone
    3. $ . ./install_template.sh
  2. Open XCode
    1. XCode → File → New Project
    2. iPhone Application → cocos2d v0.8.1 Application

The template comes with:

  • cocos2d
  • CocosDenshion
  • cocoslive
  • and a HelloWorld scene

You can easily add/remove frameworks/libraries to the created project.

Compatibility Issues

Compatibility issues with version 0.8.0

Deprecated API

  • None

Added / Removed Files

New Files

The following files were added to cocos2d:

  • TMXTiledMap.h
  • TMXTiledMap.m
  • TMXXMLParser.h
  • TMXXMLParser.m
  • MotionStreak.h
  • MotionStreak.m
  • RenderTexture.h
  • RenderTexture.m
  • Support/ZipUtils.h
  • Support/ZipUtils.m
  • Support/base64.c
  • Support/base64.h

Removed Files

The following files were removed from cocos2d:

  • None

Changes from v0.8.0

Full changelog: CHANGELOG

  • BitmapFontAtlas: .png image can be in subfolders (issue #464)
  • Box2d: possibility to call world.DrawDebugData() from draw (issue #493)
  • Box2d: updated box2d repository. using r228 (issue #494)
  • CocosNode: parent is set to nil only after calling onExit (issue #476)
  • CocosNode: added user data (issue #482)
  • CocosLive: added support to request current ranking (issue #495)
  • MotionStreak: moved from experimental to stable. uses v0.8 API (issue #484)
  • MotionStreak: by default uses GL_SRC_ALPHA blend function (issue #405)
  • ParticleView: integrated Particle visual editor (issue #480)
  • Parallax: more precise absolute coords (issue #471)
  • RenderTexture: let's you render CocosNode objects into a texture (issue #XXX)
  • Template: added XCode cocos2d Template (issue #469)
  • TextureMgr: Async reuses EAGL context (issue #472)
  • tools: added mkatlas.pl script (issue #483)
  • TiledMap: Added support for the TMX format: iso, ortho and hex maps (issue #462)
  • TouchDispatcher: don't dispatch empty touches (issue #468)
release_notes/0_8_1_beta.txt · Last modified: 2009/08/10 19:09 by admin
Trace: tiled_maps index best_practices 0_99_0 start migrating_to_0_9 cocos2d_and_uikitlayer iphone_recommended_reading 0_8_1_beta
Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0