Graphics, Cameras, Action
We need to talk in depth about the way the graphics will work in this project. As we will be coding the cameras that do the drawing in this chapter, now seems like a good time to talk about the graphics too. If you look in the graphics
folder, there is just one graphic. Furthermore, we are not calling window.draw
at any point in our code so far. We will discuss why draw calls should be kept to a minimum, as well as implement our Camera
classes that will handle this for us. Finally, by the end of this chapter, we will be able to run the game and see the cameras in action, including the main view, the radar view, and the timer text.
The completed code for this chapter is in the Run3
folder.
Here is what is coming up in this chapter:
- Cameras, draw calls, and SFML View
- Coding the
camera
classes - Adding camera instances to the game
- Running the game
The code for this chapter is in the Run3
folder.