Book Image

Game Development with Swift

By : Stephen Haney
Book Image

Game Development with Swift

By: Stephen Haney

Overview of this book

Table of Contents (18 chapters)
Game Development with Swift
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Designing levels with the SpriteKit scene editor


The scene editor is a valuable addition to SpriteKit. Previously, developers would be forced to hardcode positional values or rely on third party tools or custom solutions. Now, we can lay out our levels directly within Xcode. We can create nodes, attach physics bodies and constraints, create physics fields, and edit properties directly from the interface.

Feel free to experiment with the scene editor and familiarize yourself with its interface. To use the scene editor, add a new scene file to your game and then select the scene in the project navigator. Here is a simple example scene you might build for a platformer game:

In this example, I simply dragged and positioned Color Sprite in the scene. If you are making an unsophisticated game, you can paint nodes that do not require texture-based animation directly within the scene editor. By editing physics bodies in the editor, you can even create entire physics-based games in the editor, adding...