Next Steps

Apple Game Frameworks and Technologies — by Tammy Coron (86 / 193)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Connect the Attack Button | TOC | Chapter 9 Operating the Camera and Using References Nodes 👉

In this chapter, you gave the player the ability to move Val, the main character of the game, using the on-screen D-pad controller. You did this by adding physics to the player node using the Scene Editor, and then connecting that node through code with multiple methods to move and stop the player. You also added code to connect the Attack button, giving Val the ability to defend herself against the enemies you’ll soon be adding.

Now that you know your way around the Scene Editor and how it meshes with your code, you’ll extend your skills even more.

In the next chapter, you’ll spend some time playing with two more useful nodes: camera nodes and reference nodes. Not only will you learn how to make reusable content, but also you’ll discover how to follow the player around using a camera node (you may have noticed that if you move the player too far, she disappears). You’ll also finish up the work required to make this game look good on all devices in all orientations.

Footnotes

[37] https://developer.apple.com/documentation/spritekit/sknode/searching_the_node_tree

Copyright © 2021, The Pragmatic Bookshelf.

👈 Connect the Attack Button | TOC | Chapter 9 Operating the Camera and Using References Nodes 👉

Apple Game Frameworks and Technologies by Tammy Coron can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.