Updating and drawing objects
Objects in a game or graphics application are entities within the system that possess numerous properties and methods that allow them to exist and interact within their environment.
As shown in Figure 6.2, a typical object possesses many subparts or components:
Figure 6.2: A game object and a few of its components
You can think of components as functionality added to the object, for without the components, the object is nothing except a placeholder. The object may have all or only a subset of the components, as illustrated in Figure 6.2. For example, you might have an object in the environment that only plays a sound. For this, it would only need an audio component, whereas an object representing a game character might have a mesh that defines what it looks like, a render component that tells the game engine how to draw it on the screen, and a transform component that stores its location and orientation in the world.
In...