Abstract
In this chapter we’ll begin to build our final version of the Asteroids game. We’ll need objects to describe asteroids, and our ship and we will eventually need objects for our projectiles too, which the ship will use to destroy asteroids. In this case, the objects will all share some common features, and this makes them good candidates for inheritance. Inheritance is an important concept in object-oriented software engineering because it allows for potentially complex logic to be expressed once and used across multiple object types. We’ll learn this in the usual way—by doing.
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
© 2017 Graeme Stuart
About this chapter
Cite this chapter
Stuart, G. (2017). Inheritance. In: Introducing JavaScript Game Development . Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3252-1_9
Download citation
DOI: https://doi.org/10.1007/978-1-4842-3252-1_9
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3251-4
Online ISBN: 978-1-4842-3252-1
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books