What You Need To Know About The COMMAND PATTERN

Поділитися
Вставка
  • Опубліковано 10 бер 2022
  • 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
    @revmatch6r 2 роки тому +3

    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
    @eileeng2492 2 роки тому +2

    Thumbnail was hysterical.
    Informative vid on difficult info

  • @mandamoon9149
    @mandamoon9149 2 роки тому +4

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

  • @kingofroms7224
    @kingofroms7224 2 роки тому +4

    I thank you from bottom of my heart for this.

  • @joggerjoe
    @joggerjoe 2 місяці тому

    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^^

  • @boobalooqwe4687
    @boobalooqwe4687 Рік тому +1

    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

  • @Stompin40
    @Stompin40 2 роки тому +3

    Another banger as usual

  • @godzillakingkongvenom
    @godzillakingkongvenom 2 роки тому +4

    Absolutely killing it!!!!

  • @dotaportalvideo
    @dotaportalvideo 2 роки тому +2

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

    • @BMoDev
      @BMoDev  2 роки тому +1

      Giving it a real try, we keep it goin

  • @suicune2001
    @suicune2001 2 роки тому +2

    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

  • @tyleralbee9183
    @tyleralbee9183 Рік тому

    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?

  • @LostSol25
    @LostSol25 5 місяців тому

    How could you implement a redo?

  • @derbabonennt8876
    @derbabonennt8876 2 роки тому +1

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

    • @BMoDev
      @BMoDev  2 роки тому +1

      Haha yeah - meant it sounds way more complicated

    • @BMoDev
      @BMoDev  2 роки тому +1

      And thanks!

  • @jimmyljr95
    @jimmyljr95 2 роки тому

    Face 🔥

  • @juice1884
    @juice1884 2 роки тому

    Bad implementation.