Monthly Archive for August, 2010

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




Social Widgets powered by AB-WebLog.com.