March 2021
Beginner to intermediate
686 pages
13h 6m
English
In this chapter, we will get to code and use our first design pattern. The Observer pattern is exactly what it sounds like. We will code some classes that will indeed observe another class. We will use this pattern to allow the GameEngine class to inform other classes when they need to handle user input. This way, individual classes can handle different aspects of user input.
In addition, we will code a particle system. A particle system comprises hundreds or even thousands of graphical objects that are used to create a visual effect. Our particle system will look like an explosion.
Here is a summary of the topics that will be covered in this chapter: ...