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

Chapter 6. Generating a Never-Ending World

The unique challenge of an endless flyer-style game is in procedurally generating a rich, entertaining game world that extends as far as your player can fly. We will first explore level design concepts and tooling in Xcode; Apple added a built-in level designer to Xcode 6, allowing developers to arrange nodes visually within a scene. Once we become familiar with the SpriteKit level design methodology, we will create a custom solution to generate our world. In this chapter, you will build an entertaining world for our penguin game and learn to design and implement levels in SpriteKit for any genre of game.

The topics in this chapter include:

  • Designing levels with the SpriteKit scene editor

  • Building encounters for Pierre Penguin

  • Integrating scenes into the game

  • Looping encounters for a never-ending world

  • Adding the star power-up at random