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 5. Spawning Enemies, Coins, and Power-ups

One of the most enjoyable and creative aspects of game development is building the game world for your players to explore. Our young project is starting to resemble a playable game after adding the controls; the next step is to build more content. We will create additional classes for new enemies, collectible coins, and special power-ups that give Pierre Penguin a boost as he navigates the perils of our world. We can then develop a system to spawn increasingly difficult patterns of these game objects as the player advances.

The topics in this chapter include:

  • Adding the power-up star

  • A new enemy – the mad fly

  • Another terror – bats!

  • The spooky ghost

  • Guarding the ground with the blade

  • Adding coins

  • Testing the new game objects