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
Enemy. We can then continue that thought process as we come up with more specific types of entities, be they objects ...