In this chapter, we'll start building our sample game called Cocohunt. We'll start by creating the Xcode project skeleton and adding the GameScene
class to the project. Then, we'll start filling the empty GameScene
scene with the actual game objects. We will add the most common type of objects used in games—sprites. We'll learn their main properties, such as position and anchor point. We will make them move and will even add an animation.
The goal of this chapter is to learn how to work with sprites and get to know their main properties. After reading this chapter, you will be able to add sprites to your games.
In this chapter, we will cover the following topics:
Setting up the initial project
Sprites and their main properties
Adding sprites to the scene
Adding sprites as a child node of another sprite
Manipulating sprites (moving, flipping, and so on)
Performance considerations when working with many sprites
Creating spritesheets and using the sprite batch node to...