In this chapter, we will first look at what linear algebra is and why it is useful to describe and manipulate the objects drawn in any graphical game. Then, we will look at how to use the nalgebra library to perform linear algebra operations in our programs.
After that, we will recreate the same projects used in the previous chapter, but using the nalgebra library and the ggez framework instead of the quicksilver framework. gg_ski is a rewrite of ski, gg_silent_slalom is a rewrite of silent_slalom, and gg_assets_slalom is a rewrite of assets_slalom.
At the end of the chapter, we will look at the implementation of a completely different game with the gg_whac project to see how to handle discrete events in an architecture that mixes the animation loop with an event-driven architecture. This will also show how widgets (such as buttons) can be created and added to a window.