Abstract
In the previous chapters, you saw how to create a game world that contains a few different game objects, such as a cannon and a ball. You also saw how to let game objects interact with each other. For example, the ball object updates its color according to the color of the cannon. In this chapter, you will add falling paint cans to the game world. However, before you can do that, you have to reexamine how to create and manage objects in Swift. I will introduce the class concept as a means to create multiple game objects of a certain type. Then, you will apply the class concept to other parts of the Painter game application. Furthermore, you will learn how to incorporate randomness in your games.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Arjan Egges
About this chapter
Cite this chapter
Egges, A. (2015). Game Object Types. In: Swift Game Programming for Absolute Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0650-8_7
Download citation
DOI: https://doi.org/10.1007/978-1-4842-0650-8_7
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-0651-5
Online ISBN: 978-1-4842-0650-8
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books