C++ Game Development Cookbook by Druhin Mukherjee

C++ Game Development Cookbook by Druhin Mukherjee

Author:Druhin Mukherjee
Language: eng
Format: epub, pdf
Publisher: Packt Publishing


Using the observer pattern

The observer design pattern is one which is not commonly used in games, but it should be used more often by game developers as it is a very smart way to handle notifications. In the observer design pattern, a component maintains a one-to-many relationship with other components. This means when the main component changes, all the dependent components also update. Imagine a physics system. We want enemy1 and enemy2 to update as soon as the physics system updates, so we should use this pattern.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.