You can download cocos2d for iPhone v0.99.4 from here:
You can find the v0.99.4 documentation here:
If you are new to v0.99.x, you should also read:
To understand how fast cocos2d v0.99.4 is, please see the performance tests
IMPORTANT : If you notice an slowdown while loading jPG images, see below, Issue #886
CDSoundSource class for looping sounds and modifying sound properties over time.
Property modifier actions for changing properties such as pitch, pan and gain over time.
Convenience methods for fading in/out background music, sound effects and CDSoundSource objects.
Dynamic allocation of buffers, no need to specify buffer maximum any more.
Simplified CDAudioManager initialisation, now by default creates a single sound source group the same as SimpleAudioEngine.
Sound source groupings can be dynamically modified.
Automatic resign handler correctly handles use cases where user exits app and starts/stop audio in another app.
More examples including a recommended practices example, see GameSoundManager in TomTheTurret.
Issue #883
EAGLView splited in 2: EAGLView and ES1Renderer
Director doesn't create the EAGLView automagically. It should be created manually or by using Interface Builder
ViewPort and DisplaySize are updated automatically if the EAGLView is resized
Added support for high-res devices (iPhone4). High-Res is simulated when the device doesn't support it.
Samples:
How to create a Director using Interface Builder:
EAGLViewTest
-
How to create a Director manually:
SpritesTest.m This sample explains how to use High-Res in iPhone4
-
Also, read How to create buffers in v0.99.4
Added support for Particle Designer v1.2
Quad Particle renders the texture correctly, not upside-down
Particle Samples are subclass of Quad particle and not Point Particle (performance reasons)
Issue #732
Trimmed sprites generated with Zwoptex can be flipped
Use CCArray, a faster implementation of NSArray
Templates were updated to use Xcode 3.2.3 with
SDK 4.0. Default deploy target is iOS 3.0.
Issue #886
CCTextureCache will transform
JPEG images into
PNG images before creating the texture to prevent “dark” textures in iOS4 in 3rd and 4th generation devices.
Apparently the cause of “dark” JPEG images are due to a bug in iOS4, and not in cocos2d. So the bug can't be fixed in cocos2d. Instead, this bug was worked around.
IMPORTANT: The work around, works around the JPEG bug, but it will load the JPEG images much slower. So, if you want faster loading times, you should use PNG images.
Issue #910 is still open.
The workaround is to edit CCTextureCache.m and make the following changes:
//# work around for issue #910
#if 0 // <---- change it to #if 1
UIImage *image = [UIImage imageNamed:path];
tex = [ [CCTexture2D alloc] initWithImage: image ];
#else
// prevents overloading the autorelease pool
UIImage *image = [ [UIImage alloc] initWithContentsOfFile: fullpath ];
tex = [ [CCTexture2D alloc] initWithImage: image ];
[image release];
#endif //
Again, issue #910 is not a cocos2d bug, but an iOS4 bug. ”@2x” images are not loaded if you use UIImage initWithContentOffile (but the documentation says it should work). So the work around is to use UIImage imageNamed, but it is not enabled by default because it will consume much more memory.
[NEW] CocosDenshion: switching between background and foreground music (issue #928)
[FIX] CocosDenshion: fixed memory leak weak reallocing buffers (issue #919)
[FIX] CocosDenshion: SimpleAudioEngine's enable works as expected (issue #927)
[FIX] ccCArray: ccCArrayAppendValueWithResize fixed function signature (issue #926)
[FIX] Director: 2d projection + HighRes works OK (issue #918)
[FIX] Director: purgeCachedData doesn't purge the SpriteFrameCache (issue #922)
[FIX] EAGLView: removed unused 'delegate_' ivar
[FIX] EAGLView: it is possible to resize the view (issue #914)
[FIX] EAGLView: projection is recalculated after view is resized (issue #924)
[FIX] GLES-Render: solid objects' colors synced with box2d repository
[FIX] Scheduler: Doesn't reschedule already scheduled method. It only updates the interval.
[FIX] Templates & Tests: added App Delegate foreground & background callbacks
[FIX] All: Import ccCArray instead of ccArray (compiles in case sentive file system)
[FIX] CCArray: fixed overflow (issue #901)
[FIX] CocosDenshion: Fixed bug in CDBufferManager, added test case to FadeToGrey, fixed Info.plist
[FIX] RenderTexture: works in HiRes mode (issue #898)
[FIX] Director: Avoid re-scale initial issue (issue #899, issue #350)
[FIX] Director: convertToUI works as expected (issue #902)
[FIX] Director: renamed mainLoop → drawScene
[FIX] Director: appended '_' to ivars (eg: FPSLabel → FPSLabel_)
[NEW] CCArray: Internally uses CCARRAY_FOREACH. Improved performance
[NEW] Templates: BaseSDK 4.0. Deploy
OS Target: 3.0
[FIX] CocosDenshion: compiles with LLVM v1.5
[FIX] Removed artifacts from PageTurnTransition (issue #751)
[FIX] Templates: calls Director#purgeCachedData on memory warning
[FIX] Templates: sets CD_DEBUG=1 in debug configuration
[FIX] Texture2D:
JPEG images are displayed correctly in iOS4 (issue #886)
[NEW] Director: supports “setContentScaleFactor” (high-res support natively)
[FIX] Effects: Creates correct color buffer
[FIX] Director: Sets correctly portrait upside-down orientation
[FIX] Sprites: flipX/Y works with offsets (issue #732)
[FIX] Templates: Bundle Version is 1.0 (issue #871)
[NEW] CDSoundEngine loadBufferFromData method added for loading custom buffer data.
[NEW] CDSoundEngine channel groups renamed source groups to make function clearer.
[NEW] CDSoundEngine source groups can be dynamically modified using defineSourceGroups.
[NEW] CDSoundSource new object oriented sound
API
[NEW] CDSoundEngine added soundSourceForSound method to create CDSoundSource objects
[NEW] CDSoundEngine buffers are automatically increased as needed (no more CD_MAX_BUFFERS)
[NEW] CDPropertyModifier class for modifying properties such as pitch and gain over time
[NEW] CDXPropertyModifierAction class for modifying properties such as pitch and gain using cocos2d actions
[NEW] Convenience methods for fading volume of background music, sound effects and CDSoundSource objects
[NEW] SimpleAudioEngine soundSourceForFile method for creating CDSoundSource objects
[NEW] SimpleAudioEngine rewrote buffer management code using new CDBufferManager class
[NEW] CDBufferManager - class for associating buffer ids with a file name
[NEW] CDAudioManager simplified initialisation. Now by default creates a single source group containing all sources
[NEW] CDAudioInterruptProtocol - implemented by classes that can be muted or enabled such as CDAudioManager
[NEW] Mute now works like television mute i.e. audio continues but is silenced use the enabled property to disable sound.
[NEW] CDAudioTransportProtocol - implemented by classes that can be played, paused, stopped and rewound.
[NEW] CDAudioInterruptTargetGroup container for objects that implement CDAudioInterruptProtocol so that groups of objects can be set mute/enabled.
[NEW] CCArray: added high performance array. Used by CCNode, CCSpriteSheet
[NEW] Director: added support for high-res resolutions
[NEW] EAGLView: renderer is an object. EAGLView creates a ES1Renderer object (issue #883)
[NEW] EAGLView: it's possible to create a EAGLView manually, or by using Interface Builder
[NEW] Particle: QuadParticle supports subrects (issue #870)
[NEW] TextureCache: Added removeTextureForKey: instance method
[NEW] Tests: Added PerformanceNodeChildren performance test
[FIX] Particle: Added support for ParticleDesigner 1.2
[FIX] Particle: QuadParticle renders the image correctly (not upside-down) (issue #872)
[FIX] Particle: ParticleSamples are subclass of 'quad' particle and not 'point' particle
[FIX] Tests: removed ParticleView, AccelViewPortDemo since they were deprecated
[FIX] Tests: fixed some tests so they look OK on the ipad
[FIX] Xcode: default family is: iPhone/iPad