Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

cocos2d for iPhone v2.0.0 Release Notes

IMPORTANT

cocos2d v2.0 has only been tested with Xcode 4.0+. Do not report bugs if you are using Xcode 3.x

Download

You can download cocos2d for iPhone v2.0 from here:

Compatibility

  • API is not %100 backwards compatible with v1.0. It is pretty similar but take into account that:
    • A few features were removed
    • A few classes were renamed
    • A few methods were renamed
  • It only runs on iOS >= 4.0. It might crash on iOS 3.x
  • It only runs on OpenGL ES >= 2.0 devices. It won't run on OpenGL ES 1.1 only devices. Supported devices:
    • iPhone 3GS or newer
    • iPod Touch 3rd gen or newer
    • iPad 1 or newer
  • Use Xcode >= 4.0. It has not been tested with Xcode 3.x
  • Use llvm as compiler. It has not been tested with llvm-gcc

Documentation

You can find the v2.0 documentation here:

Performance

To understand how fast cocos2d v2.0.0 is, please see the performance tests

New Features / Improvements

  • OpenGL ES 2.0 support
  • Much Faster Motion Streak
  • Improved Progress Timer
  • Sprite / Batch Sprite / Node: much simpler and easier to maintain code
  • Sprite: removed support for Honor-Parent-Transform
  • New Sprite Animation file format and API
  • New Retina Display code
  • Super easy to create a “Double Resolution” sprite in Retina Display
  • Improved Profiling API / Macros
  • Simplified ccConfig file
  • JSCocoa integration
  • Better integration with physics engines
  • Includes Chipmunk v6.1.1 and Box2d v2.2.1

ARC Compatible

cocos2d is ARC compatible. It means that if you are developing an ARC project you can use cocos2d if you follow this instructions:

XXX TO BE COMPLETED XXX

List of open bugs

Changelog

Changes in v2.0

version 2.0 8-Jul-2012
  • [FIX] EventDispatcher: fixed ccMouseEnter/Exit
  • [FIX] LabelTTF: supports multiline even if no dimensions are provided
  • [FIX] Macros: CCLOGERROR defined in ccDeprecated as CCLOGWARN
  • [FIX] Scheduler: removeUpdateFromHash calls [target release] at the very end to prevent a possible crash
  • [FIX] Templates: Generate no-flicker-at-startup code
    • Improved Physics templates: multitouch and gravity+accel works OK
  • [FIX] TexturePVR: wrong type when calculating PVR lenght
  • [FIX] Xcode: Fixed compile errors and warnings in Xcode 4.5
  • [3RD] libpng: updated to 1.2.49
version 2.0-rc2 3-Jun-2012
  • [NEW] Added Javascript test using JSCocoa (Mac only)
    • ActionTests, SpriteTests (WIP)
  • [NEW] Director: Added popToRootScene method
  • [NEW] RenderTexture: Added support for Depth Stencil
  • [FIX] Actions: CardinalSpline#copy uses tension (issue #1377)
    • CallFunc: fixed possible crash when releasing the action (issue #1369)
  • [FIX] ccArray: Implementation is no longer inlined. Needed for gen_bridge_metada.
    • Make it compatible with C99
    • Added cplusplus #ifdef in header
  • [FIX] CocosDenshion: Fixed buffer overrun while resizing buffer (issue #1372)
  • [FIX] Director: Fixed memory leak when createStatsLabel was called more than once (issue #1373)
  • [FIX] FileUtils: easier to override the search folder
    • Added cplusplus #ifdef in header
  • [FIX] LabelTTF: improved loading time. Label is updated only if the string is set.
  • [FIX] Macros: CCLOG doesn't log the function name. Only CCLOGWARN
  • [FIX] MenuItem: setIsEnabled can be called before setting the images
  • [FIX] Particle: Handles premultipled images correctly
    • Fixed possible memory leak when changing textures.
    • Examples: Removed ARCH_OPTIMAL_PARTICLE_SYSTEM since PointParticle is no longer supported
  • [FIX] SpriteFrameCache: plist is not loaded again if it was already loaded (performance)
  • [FIX] Texture2d: JPEG are loaded correctly on iOS4 (re-re-fixed issue #886)
    • Improved iOS5 allocation bug warning and internal conversions.
    • Fixed alpha when converting RGBA8 textures to RGB5A1
  • [3RD] Chipmunk Physics: Updated to v6.1.1
version 2.0-rc1 19-Apr-2012
  • [NEW] v1.1 Forward-ported changes:
    • CCArray: new sorting methods, replaceObjectAtIndex, isEqualToArray
    • CCArray: equalilty is tested by isEqual instead of comparing pointer addresses
    • CCArray: CCARRAY_FOREACH macro is now ARC compatible
    • DrawPrimitives: Added new functions: ccDrawRect, ccDrawSolidRect
    • Macros: CCLOG logs the class/method name
    • Particles: The scheduler is removed on dealloc
    • TMX: fixed bug on release when parsing errors.
  • [NEW] Actions: Added Catmull Rom By/To and Cardinal Spline By/To actions
  • [NEW] ActionManager: Added support for pause/resume all actions of target
  • [NEW] Configuration: logs in which thread the director is running (Mac only)
  • [NEW] DrawingPrimitives: added ccDrawCatmullRom, ccDrawCardinalSpline
  • [NEW] FileUtils: It is a singleton (easier to subclass)
    • NSFileManager and NSBundle are properties (can be changed in runtime)
    • Added “fallback suffix” support for “get full path” and “remove suffix” (disabled by default).
    • On iPad the default suffix is ”-ipad”. Before it was ””
  • [NEW] LabelAtlas: added .plist config file support. Easier to migrate games to higher resolutions.
  • [NEW] LabelTTF: Added support for vertical alignment
  • [NEW] Tiled: TMX tile rotation is supported
  • [FIX] All: Fixed compiler warnings. Format strings changed from %08X to %p
  • [FIX] Deprecated: displayedFrame points to displayFrame avoiding infinite loop (issue #1347)
  • [FIX] Director: Fixed projection. ViewPort is the size of the screen. Projection adjusted (issue #1355)
    • Fixed crash when calling “end” on RetinaDisplay
    • Only enable DepthTesting is the view has a depth buffer
    • Does not raise assert if startAnimation is called when it is already animated.
  • [FIX] Events: onMouseExit/Enter fixed on Mac
  • [FIX] LabelBMFont: can be “init” without further arguments
    • Glyphs with big yOffset are rendered correctly (issue #1343)
  • [FIX] LabelTTF: Better support for custom TTF (Mac)
    • Alignments and LineBreak modes values are the both on iOS and Mac. Needed for editors.
  • [FIX] MotionStreak: Fast mode works with textures (issue #1358)
    • The initial position will be the 1st “new” position. Prevents “tail” from (0,0)
  • [FIX] NSThread+Block: fixed crash due to block not being copied to the heap
  • [FIX] OpenGL: VAO are initialized on the cocos2d thread on machines that don't support shareables VAOs
  • [FIX] Scheduler: Logs warnings with better precision (.4f instead of .2f) (issue #1362)
  • [FIX] Sprite: setTexture when Batched, don't raise exception. Only if texture id is <> than batch.texture id
  • [FIX] Templates: LICENSE_cocosdension → LICENSE_CocosDension (issue #1363)
  • [FIX] Texture: If defaultAlpha is RGBA8888 and image has no alpha, use RGBA8 instead of RGB565
    • PVR textures sets the glTexParams before creating the texture. faster.
    • PVR texture logs warning if NPOT + 16-bit textures, or if RGB888 textures are being used on iOS5
    • PNG” textures: converts NPOT + 16 bit textures to POT on iOS5
    • More permissive assert on setTexParams() when CLAMP is used on NPOT textures
version 2.0-rc0 12-Mar-2012
  • [NEW] v1.1 Forward-ported changes:
    • Actions: CCRepeat ends as expected (issue #1288)
    • ColorLayer: incorrect size in init method
    • Denshion: Background music fades ok (issue #1304)
    • MenuItem: removed warning when deleting item
    • ParticleSystem: prevent bursts of particles due to too high emitCounter (issue #1201)
    • Sprite: fixed possible setColor and opacity
    • TileMap: Flipped tiles can be changed during runtime (issue #1264)
    • TileMap: Fixed a problem with multiple layers and multiple tile sets that could cause TMX maps to not load if rotation is used (issue #1302)
    • Types: Added convenience function to create a ccColor4F from color components
  • [NEW] Actions: Added ActionTargeted action. Useful to target other nodes from a sequence.
  • [NEW] Animation: Added new animation format that supports delays per frame, loops and notifications per frame
  • [NEW] Deprecated: Added CC_ENABLE_DEPRECATED in ccConfig.h. All deprecated functions, methods and classed are included by default.
  • [NEW] Director: When the stats are on, the number of GL draw calls per frame are displayed
    • Added support for main-thread director (Mac only. Needed for some editors)
    • Added KVO for isPaused (issue #1324)
  • [NEW] DrawingPrimitives: Added ccDrawPoly() free function
  • [NEW] LabelTTF: fontName, fontSize and dimensions are properties.
    • It is possible to init one without parameters
  • [NEW] LabelBMFont: added setFntFile method (issue #1119)
    • Added support for image offset in order to share the texture (issue #762)
    • Added support for any unicode char (issue #770)
    • Consumes less memory. Only defined Glyphs are allocated.
  • [NEW] FileUtils: Added support for iPad RetinaDisplay files (default suffix is: -ipadhd )
  • [NEW] Menu: could be created/initialized using NSArray
    • Menu could be created without items
    • Menu could be enabled/disabled (no events will be accepted when it is disabled)
    • It is possible to change its priority on runtime
    • Renamed kCCMenuTouchPriority → kCCMenuHandlerPriority
  • [NEW] MenuItem: SpriteItem: Added setters for enabled,disabled,selected sprites
    • Added setter for targe:selector and block
  • [NEW] Node: Added userObject. Similar to userData, but it holds an id.
    • zOrder property is readwrite
  • [NEW] Particle: It is possible to resize the particle in runtime
  • [NEW] Sprite: spriteWithBatchNode / initWithBatchNode were removed. Use initWithTexture:batch.texture / spriteWithTexture:batch.texture instead
  • [NEW] TextureAtlas: Added option to not use VAO (might be a bit slower, but it consumes less memory)
  • [NEW] Texture2D: Added kCCTexture2DPixelFormat_RGB888 to the list of “default alpha pixel formats”
  • [NEW] TileMap: polygon, polilines and gid are parsed from the objects (issue #1311)
  • [FIX] All: replaced some NSLog() with CCLOG() is some parts of the code (issue #1250)
  • [FIX] Actions: Instant actions are trigged on stop and not start (issue #1305)
  • [FIX] CocosDenshion: fixed memory leak on CDBufferLoadRequest (issue #1286)
  • [FIX] CocosDenshion: fixed issue when background music looping was not respected on resume if playback was stopped (issue #1284)
  • [FIX] Director: It is possible to re-init a director after it has been quit (issue #1313)
  • [FIX] Director: becomes firstResponder after toggling fullscreen (Mac only) (issue #1189)
  • [FIX] DrawingPrimitives: drawColor4f() uses GLFloat instead of GLbyte (issue #1307)
  • [FIX] GLProgram: report error correctly if vertex shader has compile issues
    • Base shaders are no longer parsed files. Instead they are parsed from memory. Faster and ease the migration to v2.0
  • [FIX] GLView: Fixed memory leak while dispatching events (Mac only)
  • [FIX] GLView: MSAA support is working (issue #1315)
  • [FIX] Label: LabelBMFont fixed y-offset in RetinaDisplay (issue #1309)
  • [FIX] Node: flip, visible are no longer bitfields to prevent signed issues (issue #1314, issue #1287)
  • [FIX] Particles: Fixed memory leak in fillWithEmptyQuadsFromIndex
  • [FIX] Progress: works with rotated sprite frames (issue #1303)
  • [FIX] RenderTexture: If (running thread != cocos2d thread ) then it locks the OpenGL context. Prevents nasty crash
    • added newCGImage (issue #1214)
    • Added save buffer support on Mac
    • Refactored save code: easier to read and mantain
  • [FIX] Sprite: adding family of sprites to a batchnode works as expected (issue #1217)
  • [FIX] SpriteBatch: Quad extensions are public
  • [FIX] Templates: added -all_load -ObjC on “other linkers”
  • [FIX] Tests: LabelTest with custom TTF font works on Mac too
  • [FIX] Texture2D: initWithImage renamed with initWithCGImage
    • JPEG: No need to convert JPG to PNG on iOS4 (issue #886 re-fixed)
    • BMP: Images are displayed on iOS4 like on iOS5 (without alpha channel) [iOS5 BUG]
    • 'Delete texture' is executed on current thread (not on main thread)
  • [FIX] TextureCache: async invokes callback on cocos2d thread (and not on main thread)
  • [FIX] Types: kCCResolutionStandard renamed to kCCResolutioniPhone
version 2.0-beta2 - 17-Jan-2012
  • [NEW] v1.1 Forward-ported changes:
    • LabelTTF: word wrap works on Mac (issue #1074)
    • Node: Added onExitTransitionDidStart (issue #792)
  • [NEW] ActionManager: It is no longer a singleton. It is an ivar of director
  • [NEW] Director: it is a subclass of UIViewController (iOS only)
  • [NEW] Director: pushScene is the new recommended way to start the scene. Director will start the animation
    • automatically once the view is displayed (iOS only)
  • [NEW] Director: FPS & seconds per frame are displayed at the same time
  • [NEW] EventDispatcher / TouchDispatcher: They are no longer singletons. They are an ivar of director.
  • [NEW] GL View: Some classes were renamed to have more API concistency:
    • MacWindow → CCWindow (Mac)
    • MacView → CCGLView (Mac)
    • EAGLView → CCGLView (iOS)
    • ESRenderer → CCESRenderer (iOS)
    • ES2Renderer → CCES2Renderer (iOS)
    • GLProgram → CCGLProgram
  • [NEW] Macros: Using __CC_PLATFORM_IOS/MAC internally. Suggested way for games too.
  • [NEW] Menu: API CHANGE. “itemFrom…” was replaced with “itemWith…”
  • [NEW] Menu: target/selector pattern simulated with blocks. Before, blocks were simulated with target/selector
  • [NEW] MenuItem: overrides “cleanup” in order to break circular references.
  • [NEW] Node: Supports custom scheduler and actionManager
  • [NEW] Scheduler: It is no longer a singleton. It is an ivar of director
  • [NEW] Template: AppController use a navigation controller (like the cocos2d's tests)
  • [NEW] Template: cocos2d v2 and v1 templates can be installed at the same time
  • [NEW] Template: Added option for Device Family
  • [NEW] Test: Added Director tests. Tests integration with GameCenter and other UIKit components (iOS)
  • [NEW] Transitios: Added new transitions: CCTransitionProgressHorizontal, CCTransitionProgressVertical,
    • CCTransitionProgressInOut and CCTransitionProgressOutIn
  • [NEW] Transitions: CCTransitionRadial… renamed to CCTransitionProgressRadial…
  • [FIX] Actions: IntervalAction works OK in rewind mode
  • [FIX] Actions: EaseIn/EaseOut actions support float arguments
  • [FIX] Director: Uses DisplayLink timestamp. More stable delta times (iOS) (issue #1277)
  • [FIX] Director: CC_DIRECTOR_INIT() centers main window (Mac)
  • [FIX] Effects: 2D Effects and Transitions work as expected with a 2D projection
  • [FIX] Events: Events are removed/added from outside an event (Mac)
  • [FIX] Events: Fixed memory leak when removing delegate (Mac)
  • [FIX] Grid: Fixed two big memory leaks (issue #1280)
  • [FIX] Grid: CCGrid3D was allocating 2x memory on Mac
  • [FIX] Menu: Blocks API doesn't crash on Mac
  • [FIX] RenderTexture: Works with RGB888 (issue #1293)
  • [FIX] RenderTexture: Supports NPOT textures (issue #1291)
  • [FIX] Shaders: example shaders have the “example_” prefix
  • [FIX] Sprite: isFrameDisplayed takes into accout the offset (issue #1295)
  • [FIX] Tests: ActionProgress, Box2dtest, ChipmunkTest, LayerTest, MotionStreakTest, NodeTest, RotateWorld and SceneTest work on Mac
  • [FIX] Tests: MenuTestBlocks removed. Merged into MenuTest
  • [FIX] Tests: ShaderTest works (issue #1285)
  • [FIX] Tests: ShaderTest centers shaders (Mac and iOS Retina Display)
  • [FIX] Texture2D: Uses CGImageRef instead of UIKit for iOS API
  • [FIX] TileMaps: Re-added “cc_vertexz” property
  • [3RD] Chipmunk: Using Chipmunk v6.0.3
version 2.0-beta - 27-Nov-2011
  • [NEW] All: forward-ported changes from v1.1 branch:
    • reorderSprite: faster reordering sprites/nodes
    • Particle batches: Particles support batch rendering
    • TMX parse from memory
    • events fixes
    • ARC compatible
  • [NEW] Director: Added API to display Milliseconds Per Frame
  • [NEW] LabelBMFont: Added support for alignment, also in multiline
  • [NEW] Node: Added glServerState property. Ideal to enable/disabled blending for certain nodes.
  • [NEW] Particle: ParticlePoint removed
  • [NEW] Shader: Added AlphaTesting shader
  • [NEW] DrawingPrimitives: DrawPoint and PointSize fixed both on Mac and iOS. DrawPoly fixed on Mac
  • [FIX] Node#draw() Added helper macro to setup draw
  • [FIX] Node#draw() removed [super draw]. Draw() should be “atomic”. It shall not depend on a possible state of super class.
  • [FIX] ccGLState: Added cache for texture unit and GL_BLEND
  • [FIX] Paticles: Faster initialization: texCoords are generated only once.
  • [FIX] SpriteFrameCache: readded API to create spriteFrames from CCTexture2D
  • [FIX] Shaders: Using correct precision. Fixed performance issue with iOS 5
  • [FIX] Shaders: Improved internal API and constants names
  • [FIX] Templates: Works when the project name contains spaces
  • [3RD] Chipmunk: Using Chipmunk v6.0.2
version 2.0.0-alpha - 18-Sept-2011
  • [NEW] Action: Added new CallBlockO action
  • [NEW] AtlasNode: added init method
  • [NEW] ccConfig: removed CC_USES_VBO since VBO is always used
  • [NEW] ccConfig: removed CC_OPTIMIZE_BLEND_FUNC_FOR_PREMULTIPLIED_ALPHA since the ccBlendFunctions keeps state
  • [NEW] ccConfig: removed CC_SPRITEBATCHNODE_DEBUG_DRAW. CC_SPRITE_DEBUG_DRAW can be used both for batches and non batches.
  • [NEW] ccConfig: renamed CC_COCOSNODE_RENDER_SUBPIXEL to CC_NODE_RENDER_SUBPIXEL
  • [NEW] ccGLState: added helper functions that keeps the GL state
  • [NEW] CProgressTimer:
    • Convenience class constructor now passes in CCSprite (this gives developers easier access to timer with CCSpriteFrames, CCSprites, etc)
    • Reduced the progress timer types to just radial and bar - added in reverse, midpoint, barChangeRate to be have more flexible options to modify the progress.
    • Supports Tint + Color
  • [NEW] Director: Removed Fast, FastThreaded and NSTimer director. The only one available is DisplayLink.
  • [NEW] Director: Orientations are no longer supported. Only Portrait mode is supported. Use a ViewController to rotate the EAGL view.
  • [NEW] Director: The FPS position can be configured via ccConfig.h file
  • [NEW] Director: Fast FPS is the only supported way to display FPS. Removed the CCLabelTTF way of doing it
  • [NEW] Macros: ccgl* replaced with ccGL*
  • [NEW] Macros: CC_ENABLE/DISABLE_DEFAULT_STATE: Removed. No longer needed.
  • [NEW] MotionStreak: Using new motion streak code. 10x faster than the old one.
  • [NEW] OpenGL ES: Added support for OpenGL ES 2.0. OpenGL ES 1.1 is no longer supported
  • [NEW] ParticleQuad: Uses VAO for rendering. Indices are part the VBO.
  • [NEW] ParticlePoint: removed code. It is a subclass of ParticleQuad for compatibility.
  • [NEW] Profiler: API heavily updated to make it easier to integrate into any kind of component
  • [NEW] Sprite: initWithTexture:rect is the designated initializer
  • [NEW] Sprite: removed pixels API.
  • [NEW] Sprite: useSelfRender / useBatchNode replaced with setBatchNode
  • [NEW] Sprite: Improved API in order to make it easier to create DoubleResolution sprites
  • [NEW] SpriteBatchNode / Sprite / Node: Simplied rendering. Easiert to integrate with physics engines. Just subclass nodeToParentTransform().
  • [NEW] SpriteBatchNode: Removed support for HONOR_PARENT_TRANSFORM.
  • [NEW] SpriteFrameCache: addSpriteFramesWithFile:textureFile renamed to addSpriteFramesWithFile:textureFilename to be consistent with the new API
  • [NEW] Templates: Removed Xcode3 templates. Updated Xcode4 templates.
  • [NEW] Templates: Box2d & Chipmunk templates use new way to sync cocos2d and physics engine by using PhysicsSprite
  • [NEW] Tests: All tests use RootViewController
  • [NEW] Tests: Box2d + cocos2d test: Added PhysicsSprite and other Box2d best practices
  • [NEW] Tests: Chipmunk + cocos2d test: Added PhysicsSprite and other Chipmunk's best practices
  • [NEW] Tests: FontTest uses “bundle” fonts instead of FontLabel
  • [NEW] Tests: Removed HelloWorld* tests
  • [NEW] Tests: TextureTest has TextureCache#asyncWithBlock test
  • [NEW] Tests: Removed Chipmunk iOS TestBed since it was outdated
  • [NEW] Texture: Uses NPOT textures (gles20 already supports them)
  • [NEW] Texture: PVRTC-RAW format is no longer supported. Use the non-raw format instead.
  • [NEW] TextureAtlas: Uses VAO for rendering
  • [NEW] TextureCache: Added asyncWithBlock method
  • [NEW] Tiled: cc_vertexz property is no longer supported. Will raise exception if found.
  • [FIX] All: Removed deprecated methods and classes that were scheduled for removal post 1.0
  • [FIX] Node: slightly faster nodeToParentTransform()
  • [FIX] ProgressTimer: reverse renamed to reverseDirection in order to prevent possible collision with action#reverse
  • [FIX] RenderTexture: getUIImageFromBuffer doesn't return artifacs
  • [FIX] TextureCache: Uses “self” instead of “CCTextureCache” in shared instance
  • [FIX] Sprite: displayedFrame correctly returns originalSize
  • [FIX] SpriteFrameCache: it doesn't retain the textures when they are loaded from a dictionary file (issue #1227)
  • [FIX] Xcode: cocosLive: Removed. Use OpenFeint or GameCenter instead
  • [FIX] Xcode: FontLabel: Removed since in iOS 4 you can load custom TTF
  • [FIX] Xcode: TouchJSON: Removed. No longer needed since cocosLive was removed
  • [FIX] Xcode: Tremor / vorbis: Removed. Experimental sound engine is no longer supported
  • [FIX] Xcode: iOS 4 is minimun required to run
  • [3RD] Box2d: Using Box2D 2.2.1
  • [3RD] Chipmunk: Using Chipmunk v6.0.1
  • [3RD] Kazmath: New external library. kazmath library for matrix and projection operations, and matrix GL stack
  • [3RD] Kazmath: Added ARM NEON Matrix Multiplication from Oolong project
release_notes/2_0_0.txt · Last modified: 2012/07/09 05:49 by admin
Trace: 2_0_0
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