O'Reilly logo

Cocos2d Cross-Platform Game Development Cookbook - Second Edition by Siddharth Shekar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding 2D lighting

The SpriteBuilder project uses an older version of the Cocos2d-ObjC project. So, to add 2D lighting, let's take a look at how to download the latest version of Cocos2d-ObjC from GitHub to create a project.

The same code will work with project, which is created with SpriteBuilder; however, in this case, we need to make sure we change the code so that MainScene subclasses CCScene instead of CCNode.

Getting ready

The project setup can be downloaded from the following link from GitHub:

https://github.com/cocos2d/cocos2d-objc

Click on the Download ZIP link to download the ZIP file.

Getting ready

Once the file is downloaded, extract the files onto the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required