There are a ton of Code Design Patterns, and the Command Pattern is one of the most commonly used ones when it comes to games.
The obvious and most used example would be something like a Real Time Strategy game (like starcraft/warcraft/age of empires) where you can give your units a sequence of commands.
Another might be a Tactics game like Fire Emblem or Final Fantasy tactics or any turn based game really where you might want to record your actions or UNDO an action.
Other less obvious examples might be creating a messaging system for a multiplayer game between the server and client.
Or maybe handling monetary transactions where the sequence of events is critical.
Let me know in the comments what else you've used the Command Pattern before.
✨Want to support the channel?
Buy me a coffee ☕: https://ko-fi.com/bmoli
➤SUBSCRIBE to learn more about other design patterns as I cover them next!
➤Join our discord, I command you: / discord
Thanks for watching!
#bmo #gamedev #programming