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

Sharpening our pencils


There are four quick items to take care of before we start drawing:

  1. Since we will design our game to use landscape screen orientations, we will disable the portrait view altogether:

    1. With your game project open in Xcode, select the overall project folder in the project navigator (the top-most item).

    2. You will see your project settings in the main frame of Xcode. Under Deployment Info, find the Device Orientation section.

    3. Uncheck the Portrait option, as shown in the following screenshot:

  2. The SpriteKit template generates a visual layout file for arranging sprites in our scene. We will not need it; we will use the SpriteKit visual editor later when we explore level design. To delete this extra file:

    1. Right-click on GameScene.sks in the project navigator and choose delete.

    2. Choose Move to Trash in the dialog window.

  3. We need to resize our scene to fit the new landscape view. Follow these steps to resize the scene:

    1. Open GameViewController.swift from the project navigator and locate the...