O'Reilly logo

Game Development with Swift by Stephen Haney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating our first Swift game

Do you have Xcode installed? Let's cut to the chase and see some game code in action in the simulator!

  1. We will need to create a new project. Launch Xcode and navigate to File | New | Project. You will see a screen asking you to select a template for your new project. Select iOS | Application in the left pane, and Game in the right pane. It should look like this:
    Creating our first Swift game
  2. Once you select Game, click Next. The following screen asks us to enter some basic information about our project. Do not worry; we are almost at the fun bit. For our demo game, we will create a side-scrolling endless flyer featuring an astonishing flying penguin ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required