The previous chapters showed you how to make a very basic game application in Swift. You saw how to create a game project in Xcode, and then write a few lines of code to change the background color of an app or to display a text label. You were also introduced to the game loop, and you used the update part of the game loop to vary the background color over time. This chapter will show you how to draw images on the screen, which is the first step toward making nice-looking games. In computer graphics, these images are also called sprites. Sprites are generally loaded from a file. This means any program that draws sprites is no longer simply an isolated set of instructions, but relies on game assets that are stored somewhere. This immediately introduces a number of things that you need to think about:


Background Image Sound Effect Background Music Playable Area Game World 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Arjan Egges 2015

Authors and Affiliations

  • Arjan Egges
    • 1
  1. 1.TBThe Netherlands

Personalised recommendations