Object-oriented programming (OOP) is a different way of thinking about programming. It’s a modern methodology used in the creation of the vast majority of games (and other commercial software, too). In OOP, you define different types of objects with relationships to each other that allow the objects to interact. You’ve already worked with objects from types defined in libraries, but one of the key characteristics of OOP is the ability to make your own types from which you can create objects. In this chapter, you’ll see how to define your own types and create objects from them. Specifically, you’ll learn to:
Create new types by defining classes
Declare class data members and member functions
Instantiate objects ...