Game Development Reference
In-Depth Information
How it works...
The following are the observations of the starter project:
1. As you have seen, the sample project of SpriteKit plays a label with a background
color.
2. SpriteKit works on the concept of scenes, which can be understood as the layers or
the screens of the game. There can be multiple scenes working at the same time;
for example, there can be a gameplay scene, hud scene, and the score scene run-
ning at the same time in the game.
Now we can look into the project for more detail arrangements of the starter project. The
following are the observations:
1. In the main directory, you already have one scene created by default called
AKMyScene .
2. Now click on AKMyScene.m to explore the code to add the label on the screen.
You should see something similar to the following screenshot:
3. Now we will be updating this file with our code to create our AntKilling game in
the next sections.
4. We have to fulfill a few prerequisites to get started with the code, such as locking
the orientation to landscape as we want a landscape orientation game.
5. To change the orientation of the game, navigate to AntKilling project settings |
TARGETS | General . You should see something similar to the following screen-
shot:
Search WWH ::




Custom Search