Chapter overview

This chapter is all about learning how to decouple code using the Observer pattern. This chapter is a little different than the others because it isn't about using the Observer pattern to solve one big pattern; it is about learning to apply it to the many little situations that lead to sloppy code throughout a game's development. The Observer pattern will show you that there is a better way.

First, we will explore the inevitable situation of gameplay code leaking into our engine code. Then, we will learn about the Observer pattern and how it can improve these situations. Along the way, we will look at some example code from the Mach5 Engine. However, since this pattern has so many uses, we will focus on how it can be incorporated into a game, as opposed to showing one large specific example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.185.196