Summary
In this chapter, we learned that it is much more efficient to minimize the number of draw calls and that we can achieve this by using a single VertexArray
for all the entities in our game, although we did also have a separate SFML Text
instance on which we also called draw
. Also, in this chapter, we coded our two cameras using our Entity Component pattern of an Update
derived class and a Graphics
derived class. Furthermore, we saw that these classes share data with each other to work effectively and that they also share data with the player-related classes.
We saw how we can add cameras in the factory, and by passing the required parameters like the appropriate Update
and Graphics
derived instances of other classes to the assemble
functions, we can configure the cameras to behave as we like.
Now that our cameras are up and running, as well as our game logic that we added through the LevelUpdate
class in Chapter 16, anything we add to the game now will bring instant...