

Similarly, delete Actions.sks as you also don’t need that for this tutorial. For this tutorial, you’ll build your scene programmatically. GameScene.sks is a scene editor which allows developers to visually lay out sprites and other components of a scene. Choose Move to Trash when prompted.īe sure you’re deleting GameScene.sks, and not GameScene.swift. Next, find GameScene.sks in the project navigator and press Delete.


In the Deployment Info section, choose iPad for Devices and uncheck the Portrait and Upside Down options so only Landscape Left and Landscape Right are left checked, as shown below: Make sure that the AnimatedBearSwift target is selected.

If you expand the folder in Xcode it should look like this:īefore you start animating, get your Xcode template ready by completing a few small tasks.įirst, click on AnimatedBearSwift in the Project navigator. In the dialog box that appears, be sure that the Copy items if needed, Create groups and AnimatedBearSwift options are all checked, and click Finish: atlas extension and automatically combine the images into a texture atlas for you at compile time.ĭrag BearImages.atlas over your project and drop it under the AnimatedBearSwift folder in Xcode: atlas - like the BearImages.atlas folder you downloaded. Just place your image files in a folder with a name that ends with. So using this approach can improve memory usage and rendering performance. SpriteKit is optimized to work with texture atlases. Rather than eight separate bear images, your texture atlas will be one big image along with a file that specifies the boundaries between each individual bear image. If you’re new to texture atlases, you can think of them as one big mashup of all your smaller images. But there’s a better way: Use a texture atlas to make your animation more efficient. You could create an animation by loading in each of these images individually. With the help of SpriteKit, you’ll cycle through these eight images to create the illusion of movement - kind of like an old-fashioned flip-book. When you unzip the materials, you’ll find a folder named BearImages.atlas which contains eight numbered bear images.
Use gif in particle illusion download#
You can download ready-to-animate art, courtesy of, by clicking the Download Materials button at the top or bottom of this tutorial. Pretty cool, but those won’t do for your bear. If you tap on the screen, you’ll see spinning geometric shapes which flare to life then fade from view. After a brief splash screen, you should see the following: Now that your project is open, select one of the iPad simulators and build and run to check out the starter project. Make sure the options for Integrate GameplayKit, Include Unit Tests, and Include UI Tests are unchecked and click Next:Ĭhoose where to save your project, and click Create. Start up Xcode, select File\New\Project…, choose the iOS\Game template and click Next.Įnter AnimatedBearSwift for the Product Name, Swift for Language, SpriteKit for Game Technology. If not, you might want to start with the SpriteKit Swift 3 Tutorial for Beginners. This tutorial assumes you know the basics of SpriteKit.
