What You Need To Know About The COMMAND PATTERN

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 ☕: 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

Пікірлер: 20

  • @revmatch6r
    @revmatch6r2 жыл бұрын

    I died when I saw the thumbnail 😂 Was waiting specifically for this one. Appreciate the high/medium level overview of something I always viewed as super hard

  • @eileeng2492
    @eileeng24922 жыл бұрын

    Thumbnail was hysterical. Informative vid on difficult info

  • @mandamoon9149
    @mandamoon91492 жыл бұрын

    Bmo’s wish is my command 😊but seriously, informative vid and helpful concept! Not to mention that fire thumbnail 🔥

  • @kingofroms7224
    @kingofroms72242 жыл бұрын

    I thank you from bottom of my heart for this.

  • @joggerjoe
    @joggerjoe3 ай бұрын

    awesome thumbnail xD well explainded on a simple example. used the command-pattern too, in my first gamejam recently. had a char being conrolled by commands. added player-controller passing commands to char. for ai i used same char with an ai-controller. its just a very helpful pattern - also for other use-cases^^

  • @godzillakingkongvenom
    @godzillakingkongvenom2 жыл бұрын

    Absolutely killing it!!!!

  • @Stompin40
    @Stompin402 жыл бұрын

    Another banger as usual

  • @dotaportalvideo
    @dotaportalvideo2 жыл бұрын

    You've been on a tear with the content lately, bud!

  • @BMoDev

    @BMoDev

    2 жыл бұрын

    Giving it a real try, we keep it goin

  • @boobalooqwe4687
    @boobalooqwe4687 Жыл бұрын

    something that no one seems to wanna talk about is how to do for this real time replays of nonturn based games. how do you guarantee that a command executed at say, 10 seconds into the game, will also execute at exactly the same time during the replay, what if the user has major slowdowns for whatever reason, how do you deal with floating point inacuracies? etc etc

  • @suicune2001
    @suicune20012 жыл бұрын

    Thanks!

  • @helciowagner6101
    @helciowagner6101 Жыл бұрын

    Congratulations for the tutorial. I think simple examples as that one you have used are the best choice to get the understanding of the core subject. Just let me ask you: why didn't you use the ICommand interface?

  • @andyBorko
    @andyBorko Жыл бұрын

    Hi! Please make more video on patterns in unity

  • @LostSol25
    @LostSol256 ай бұрын

    How could you implement a redo?

  • @tyleralbee9183
    @tyleralbee91832 жыл бұрын

    Hey, I like your videos and your vibe - but I noticed something here that I'm not sure about. You are instantiating new commands in your update method. This seems incorrect to me. Is there something I am not understanding, or is there a better way to do that?

  • @derbabonennt8876
    @derbabonennt88762 жыл бұрын

    I got really confused at 2:14 when you said "its way more complicated..." - great video nevertheless

  • @BMoDev

    @BMoDev

    2 жыл бұрын

    Haha yeah - meant it sounds way more complicated

  • @BMoDev

    @BMoDev

    2 жыл бұрын

    And thanks!

  • @jimmyljr95
    @jimmyljr952 жыл бұрын

    Face 🔥

  • @juice1884
    @juice18842 жыл бұрын

    Bad implementation.