One of the most common issues you'll run into in your game development journey is how to let two unrelated objects communicate with one another in a way that doesn't completely ruin the organization and flexibility of your code. The observer pattern is one potential solution to this problem, and makes it easy to let different game objects communicate with one another without coupling your entire application together. With native support in most languages and game engines, it really is something you should keep in your toolbox. We can also expand upon this concept further and introduce the event bus, a way of letting more distant objects connect to one another while still keeping the flexibility of your code intact.
Text version of this video: https://shaggydev.com/2022/06/01/obse...
More info on the observer pattern: https://gameprogrammingpatterns.com/o...
Background and motivation: 00:00
The observer pattern: 01:34
Observables in practice: 02:52
Global access via an event bus: 05:02
The event bus in practice: 05:31
Final thoughts and further reading: 06:04
Auf dieser Seite können Sie das Online-Video Communicating between game objects with the observer pattern mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer The Shaggy Dev 02 Juni 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 10,312 Mal angesehen und es wurde von 627 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!