Frame animations can also be created through code. This tutorial shows how the process works and explains Sprite Atlases.
- [Instructor] Now we're going to look at…creating a frame animation using code.…To do that, we're going to use…something called a sprite atlas.…A sprite atlas improves performance…by reducing memory usage of your sprites.…To create a sprite atlas,…go inside of your Assets folder,…right-click and choose New Sprite Atlas.…Sprite atlas actually improves performance…by reducing the number of drawing calls…for the sprites inside of it.…
So I'm going to select player_frame1…and Shift click player_frame4,…this is my four-frame animation for the player,…and I'm going to click and drag that…onto the Sprites folder that I just created.…By putting inside of that folder,…I've now made them part of a sprite atlas.…So I'll select this empty sprite here…and delete it using the Delete key…and now I have my sprite atlas…and let's create our animation with code.…So I'll head over to GameScene.swift…and what I'm looking for is the bottom of didMove(to view).…
On my code, it's on line 25.…And in here at the very bottom,…I'm going to create all of the animation frames…
- Creating a SpriteKit project
- Adding and modifying sprites
- Creating sprites in code
- Transitioning between scenes
- Working with children and parents
- Adding physics
- Detecting and responding to collisions
- Applying particle effects
- Creating actions
- Working with sound
- Adding cameras and lights
Skill Level Intermediate
Game Design Careers with Brenda Romerowith Brenda Romero54m 41s Beginner
Careers in the Game Industrywith Christian Bradley1h 19m Beginner
Building a Game App with the Android SDKwith David Gassner2h 6m Intermediate
1. Introduction to SpriteKit
2. Add Physics
3. Work with Particle Effects
4. Work with Actions
5. Work with Audio
6. Additional Features
Next steps1m 41s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.