![]() ![]() You could just add these directly to your Cocos2D 2.x project at this point and create an animation based on these individual images. In this tutorial, you will create the iPhone retina (2X) and iPhone non-retina (1X) images from these. These images are saved in the maximum required resolution – for an iPad with a retina display (4X). When you unzip the file, take a look at the images – they are just individual frames of a bear that when you put them together, look like the bear is moving. Next, go ahead and download some images of an animated bear made by my lovely wife. Expand the dropdown and select only the last four files ( main.m, AppDelegate.m, HelloWorldLayer.m, and IntroLayer.m), then click Check and finish the steps of the wizard. Just go to Edit\Refactor\Convert to Objective-C ARC. We are going to use ARC in this project, but by default the template isn’t set up to use ARC. ![]() Let’s start by creating a Xcode skeleton for our project – create a new project with the Cocos2D 2.x iOS project template and name it AnimBear. The How To Make A Simple iPhone Game tutorial has detailed installation instructions if you need them. If you are new to Cocos2D, you may wish to go through the tutorial series on How To Make A Simple iPhone Game With Cocos2D first, but this is not required! Getting Startedīefore getting started be sure to install the latest “unstable” Cocos2D 2.x libraries by downloading them from the official Cocos2D-iPhone home page. You’ll also learn how to make them efficient by using sprite sheets, how to make your bear move in response to touch events, and how to change the direction the bear faces based on where the bear is moving. In this tutorial, you will learn how to create a simple animation of a bear walking in Cocos2D. I’ve gotten a ton of requests from readers of this blog to make a tutorial on how to use animations and sprite sheets in Cocos2D 2.x. ![]() Update : Fully updated for Cocos2D 2.1-rc0a, Texture Packer 3.07, ARC, Retina Displays, and Modern Objective-C style (original post by Ray Wenderlich, update by Tony Dahbura). Smoky says: Only you can start this bear! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |