cocos2d v0.99.5-beta2 released. Added Mac support.

cocos2d v0.99.5-beta2 is available for download:

Release Notes:

API Reference:

Full ChangeLog:

Highlights:

  • Added support for Mac. Your cocos2d / CocosDenshion game can be ported to Mac with minimal changes

Regarding the Mac Port

cocos2d for Mac works as excepted with the following exceptions:

  • CCParticleSystemPoint is not supported. Use CCParticleSystemQuad instead.
  • CCTexture2d / CCLabelTTF don’t support FontLabel
  • CCRenderTexture doesn’t support “save image” yet
  • It doesn’t work with garbage collection yet
  • It doesn’t support fullscreen mode yet
  • It doesn’t support touches yet.

To port your cocos2d / CocosDenshion game to Mac, you have to:

  • Modify the way you initialize / create the CCDirector and the OpenGL view.
  • Replace the touches and/or accelerometer events with Mouse and/or keyboard events
  • The rest is the same.

The cocos2d-mac.xcodeproj includes several tests that show how to support mouse events and how to initialize the CCDirector / OpenGL view.

The game Sapus Tongue was already ported to Mac. You can find some details about how it was ported in this thread.

Are you porting your game to Mac ? Let use know when the game is finished! :)

New cocos2d games page: Admin section

Hi, we have added an admin secion for the cocos2d games page, so if you have added any of your games there, and you did enter your forum username on the add form, then you can manage them here:

http://www.cocos2d-iphone.org/games/cms

Just use your username/password from the forum, if you have one. Once logged, see the main navigation under the banner, “Games” to list and edit your games, and “Categories”, a read-only list of our cocos2d categories.

Once editing a game you will see the iTunes info, with a link to refresh (may take some time) and if you scroll down the page, you will see the cocos2d categories and the cocos2d version used, please try to fill all them. If you find your game doesn’t belong to any of our categories, please let us know.

Also note the subnavigation on the left, “Reviews” and “Videos”, so you can add more specific information. Use “Reviews” to add information related to other websites reviews, or even to link to the forum section.

And if you didn’t enter your username when you created the game, no worries, you can go again to:

http://www.cocos2d-iphone.org/games/add/

And fill in all information, including your forum username, and this will update the database and you will be able to use the CMS.

Please have a look and shout if any problems.

Autorotation in v0.99.5 templates

In order to be iPad compliant, v0.99.5 will include updated templates that support autorotation.

Basically the new templates will have 3 new files:

  • GameConfig.h
  • RootViewController.m (and .h)

The RootViewController.* files contain the code to handle the autorotation.

And in GameConfig.h you will be able to configure how to handle the autorotation:

  • No autorotation
  • Autorotation handled by cocos2d
  • Autorotation handled by UIViewController (default)

No Autorotation: It means just that. The EAGLView won’t be autorotated

Autorotation by cocos2d: The EAGLView will be “rotated” using CCDirector#setDeviceOrientation.

  • [+]: It is the fatest way to “rotate” the EAGLView since it uses one glRotatef() command (technically the EAGLView is not rotated).
  • [-]: If you are going to add UIKit objects to the EAGLView, then you will need to rotate them manually.

Autorotation by UIViewController: The EAGLView will be rotated by the UIViewController

  • [-]: The UIViewController will rotate the EAGLView and it is bit slower than using a single glRotate() command.
  • [+]: There is no need to rotate any UIKit object contained by the EAGLView.

If you want to understand how to implement autorotation manually, or if you are interested in understanding the technical details, I suggest reading this article:

And if you want to try the new templates now, then you should download the latest code from the “develop” branch, and reinstall the templates.

Update: Bill Hollings wrote an interesting article regarding autorotation where he describes another approach. Includes sample code: cocos2d an UIViewControllers

cocos2d v0.99.5-beta released

cocos2d v0.99.5-beta AKA “CJ the artifact killer” is available for download:

Highlights:

  • Fixed possible artifacts in CCBitmapFontAtlas, CCSprite, CCTMXTiledMap, CCTileMap, CCLabelAtlas
  • Added support for PVR non compressed formats
  • Added support for multi-lines in CCBitmapFontAltas
  • Added support for Zwoptex rotated images

Full Changelog:

API Reference:

Regarding artifact fixes, please, read this thread. There is an ongoing discussion, and there might be new changes.

Update: If you want to compile CocosDension with SDK 3.2, please download the patched CDAudioManager.m file.

Update 2: And this file too: CDAudioManager.h (thanks marcotronic)

A word of notice

As the lead developer of cocos2d and with the aim of avoiding any misunderstanding or the creation of false expectations  I, Ricardo Quesada, would like to clarify that I am not associated or related in any way whatsoever with Steffen Itterheim (AKA gaminghorror) or his site.

I never asked for his endorsement and I don’t want it. Whatever he has done or might be doing regarding cocos2d, he is acting on his own.

cocos2d & Git

A few months ago cocos2d was migrated from SVN (Google Code) to Git (GitHub). There are several benefits of Git over SVN, but this post is not to discuss them. It is just to mention some of the interesting cocos2d forks that you can find on the different Git hosting servers:

Official cocos2d repository, from where the official packages are made:

Steve Oldmeadow repository. Contains the latest CocosDenshion features/fixes:

Zwoptex repository. Contains the latest Zwoptex features/fixes:

Manu Corportat repository. Contains different fixes and improvements:

Jon Kean repository. Contains different fixes and improvements:

OHM Interactive repository. Contains different improvements & fixes:

And many more:

cocos2d v0.99.4 released

cocos2d for iPhone v0.99.4 has been released.

Download: cocos2d-iphone-0.99.4.tar.gz

Release Notes: release_notes

Full Changelog: CHANGELOG

API Reference: API Ref

Highlights:

  • Big CocosDenshion update, including new license: MIT
  • Added support for Retina Display (iPhone4)
  • Added support for iOS4. Templates generates iOS4 ready code
  • Xcode v3.2.3 compatible
  • plus many bug fixes and other improvements

Many thanks to the community for submitting several patches, for testing the different release candidates in the different configurations, and for opening issues!

New cocos2d games page

Jose Miguel Gomez Gonzalez and Piero Tofy have been working on a new cocos2d game page.

You can sort the games by name, date, review, price, and you can filter them by categories.

The page is currently in Beta, and new features will be added soon, like an administration area.

cocos2d v0.99.4-rc3 released

Yet another cocos2d Release Candidate is available for download:

Highlights (from v0.99.4-rc2):

  • More iOS4 + iPhone4 bug fixes

Release Notes:

Full Changelog:

cocos2d in WWDC 2010 Keynote

Two cocos2d applications were featured in WWDC 2010 keynote!!

The Elements, which was mentioned in a previous post,  was presented by Steve Jobs.

And FarmVille, the popular Facebook game, which is now available for the iPhone / iPod Touch.