O'Reilly logo

iOS 9 Game Development Essentials by Chuck Gaffney

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

Chapter 5. GameplayKit

For many years, video game development has relied on the tenets of object-oriented design (OOD). Of the core features in OOD, the concepts of inheritance and polymorphism have been the most useful in this branch of software engineering. It makes sense to think of entities in our games as homogenous groups of objects; objects that we then write rules for in how they interact with each other. For example, thanks to inheritance, all objects in our game can be given the class name of GameObject; they have functions we'll use throughout the game and then we can branch them off into child classes, such as Player or Enemy. We can then continue that thought process as we come up with more specific types of entities, be they objects ...

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