Chapter 20: Game Objects and Components

In this chapter, we will be doing all the coding related to the Entity-Component pattern we discussed at the beginning of the previous chapter. This means we will code the base Component class, which all the other components will be derived from. We will also put our new knowledge of smart pointers to good use so that we don't have to concern ourselves with keeping track of the memory we allocate for these components. We will also code the GameObject class in this chapter.

We will cover the following topics in this chapter:

  • Preparing to code the components
  • Coding the Component base class
  • Coding the collider components
  • Coding the graphics components
  • Coding the update components
  • Coding the GameObject class ...

Get Beginning C++ Game Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.