Programming a tactical strategy game in Godot 4

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น •

  • @TheShaggyDev
    @TheShaggyDev  2 หลายเดือนก่อน +16

    You can wishlist Unto Deepest Depths here: store.steampowered.com/app/3106600/Unto_Deepest_Depths?
    Also, after several requests, I have open sourced some early prototype code of UDD to help you see how everything works together: github.com/theshaggydev/unto-deepest-depths-prototype
    Have questions or things you'd like to see in future devlogs? Let me know!

    • @mfyoutube5003
      @mfyoutube5003 20 วันที่ผ่านมา +1

      tyvm for the github! even though an overview is very nice and help to have a meta understanding, getting a "template" accessible is good for beginners like me :) ty!!!

  • @Nobody6146
    @Nobody6146 2 หลายเดือนก่อน +37

    I really appreciate you sharing so much of your architecture! Not many solo devs work on tactics games so content is sparse and I’ve used a modified implementation of your state machine and your service bus for my own tactics game!

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน +11

      Thank you! And agreed. I partially started doing these types of videos because I couldn't find anything to copy for myself 😅

    • @Nobody6146
      @Nobody6146 2 หลายเดือนก่อน +5

      @@TheShaggyDev I definitely see why it isn’t a common small creator game genre. A non-real time game sounds simpler on the surface, but setting up the architecture and system interactions are actually much more difficult than at first glance! I’m glad I have a software engineer background to lean on!

  • @MrBoingus
    @MrBoingus 2 หลายเดือนก่อน +11

    A LOOK THROUGH THE CODE IN ONE OF YOUR GAMES PIECE BY PIECE WITH EXPLANATIONS? why shaggy dev you spoil us. a pleasure to watch this video as always. your node-based state machine system is the backbone of my every godot project so i will always have a deep respect for you

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน +3

      Haha, thank you!

  • @ricardomianelli
    @ricardomianelli หลายเดือนก่อน +2

    That's an amazing video, one of the best I've watched so far on TH-cam. As a software engineer, the architecture is always both my biggest pleasure and my worst nightmare, and I love seeing how other people design and organize their projects, so I'm really grateful you decided to share this. Adding to this, I was building myself a tactical battle game on Monogame, but decided to explore Godot to see why people like it so much and ended up finding your video and loved it. Thank you so much! I'll follow for more!

    • @TheShaggyDev
      @TheShaggyDev  หลายเดือนก่อน

      Thank you so much! As a fellow software engineer, I can totally relate to how you feel about software architecture.

  • @Vegan_Kebab_In_My_Hand
    @Vegan_Kebab_In_My_Hand 2 หลายเดือนก่อน +3

    As a beginner I really appreciate that you also take the time to explain the sene tree structure. Getting a better idea of how one might structure the project helps to avoid major spaghettification and eases up on refactoring.

  • @malldvd
    @malldvd หลายเดือนก่อน +1

    I go unto the Deepest Depths. You slip upon the Steepest Steps. We are not the same.
    Seriously though, the explanation of the code in this video is very clear and understandable! I like the game concept and will be wish-listing it immediately.

  • @chanceyoung2416
    @chanceyoung2416 2 หลายเดือนก่อน +2

    This game actually looks and sounds amazing. Cant wait to see it finished!

  • @Zyjin
    @Zyjin 2 หลายเดือนก่อน +1

    Awesome work as always Shaggy!
    I'm glad to hear you're working towards releasing something, looks like a fun game!

  • @tmilker
    @tmilker 2 หลายเดือนก่อน +7

    I'd love to see a video that covers the organization, usage and issues of using signals in an actual game. Like that edge case you mentioned(did you just defer it?) or when it's appropriate to disconnect vs. ignore signals. There doesn't seem to be a lot of information about patterns & best practices for signal usage in Godot.

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน +4

      That's a great suggestion because you're totally right that signals, while very useful, also have gotchas in a full moving system.
      For the edge case issues, I've added a minimum one frame delay before firing off a signal on paths that could cause issues. Only a few places it should be a problem, so I've just added it where I expect it to be an issue.

  • @OmegaOverlord3000
    @OmegaOverlord3000 2 หลายเดือนก่อน

    This is such a good video, thank you so much! This really lays stuff out in a very clear and easy to understand way without getting bogged down in code

  • @rogercruz1547
    @rogercruz1547 2 หลายเดือนก่อน +9

    Looks like chess but with moving and attacking separated
    EDIT: Remember! Necromancers are just healers that got there a little late.

    • @d.w.6584
      @d.w.6584 2 หลายเดือนก่อน

      That Necro line gave me a good chuckle, thanks 👍.
      Although if you think about it, all healers are necros, since they bring dead tissue/cells back to life. 🤔

  • @VeijariMash
    @VeijariMash 2 หลายเดือนก่อน +5

    Another banger by The Shaggy dev!

  • @rattenjunge123
    @rattenjunge123 2 หลายเดือนก่อน +1

    thank you for sharing this. it really helps!

  • @bbugarschi
    @bbugarschi 2 หลายเดือนก่อน +6

    About 2 years ago, you released the Elemechs vidoe,
    Ever since i've been toying with making my own turn based tactics game, i'm working in java in libgdx, but architecturally i'm doing the same thing as you :). I think i've rewritten the "game' about 10 times by now
    I have zero plans or desires to actually release anything :P, but it's quite fun to toy around with this kinda thing
    Thank you for these videos.

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน

      That's great to hear! And fun to hear you're using libgdx! Not too mainstream these days but I used it a bit several years ago and liked it. I should see what it's up to now...

  • @VaporCode
    @VaporCode 2 หลายเดือนก่อน +1

    My day is made🎉 thx for this video ❤

  • @rhyantrick8178
    @rhyantrick8178 2 หลายเดือนก่อน +1

    i wanted to create a similar game but it was a grid based action game so all of this is fantastic and as a viewer said here , this kind of content is slim. great video! the music and sfx are great btw.. ill be checking out that software too

  • @neurolancer81
    @neurolancer81 2 หลายเดือนก่อน

    Love the detail! Thanks for the effort you put in for these videos.

  • @clark4428
    @clark4428 หลายเดือนก่อน

    Man, I've been combing through the github to try and understand how I can use certain ideas with my project (particularly the highlight system). It is clear to me how well you understand structure to keep things clean and uncoupled. Definitely one of the things I have been struggling with in my current project. Thanks for the resources to let me try and wrap my head around it.

    • @TheShaggyDev
      @TheShaggyDev  หลายเดือนก่อน

      You're welcome and keep working on it! I would argue there's some jank and things that could be fixed in the GitHub, but I suppose there's always more that can be done.

  • @ricardopitta8272
    @ricardopitta8272 2 หลายเดือนก่อน +1

    Nice!

  • @VTSfilms
    @VTSfilms 2 หลายเดือนก่อน +1

    Good timing! A friend and me are trying to make a fire emblem clone, and we are still stuck on trying to select a character to move it. Hopefully we can figure it out with the snippits of this code. But we have been stuck on this for 2 weeks now....

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน +1

      If it helps: For selecting units in UDD, when the mouse is clicked, I convert that pixel position to a map cell and then check if any units have that same cell. If so, they get selected. How you then track that can vary. In this case, the Units Group tracks who's active and just asks them for the info it needs to facilitate things. But you could also let the unit itself track whether or not it's selected.

    • @VTSfilms
      @VTSfilms 2 หลายเดือนก่อน

      @@TheShaggyDev Any chance you can include that in your next video?

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน

      @@VTSfilms I could probably make that work! Just be warned: it'll be a few weeks before that's out.

    • @VTSfilms
      @VTSfilms 2 หลายเดือนก่อน

      @@TheShaggyDev well I'm also remodeling my kitchen, so got plenty of time. This is a hobby project, and I'm currently working on the idle animations in photoshop for my characters. Trying to make a better work flow to get the sprite sheets. All this is new for us. So take your time, and I will love to learn from you! I already implemented my node structure to be just like yours.

  • @hornetdc
    @hornetdc 2 หลายเดือนก่อน +1

    Can you also explain how you do units? I always get confused at that part, should I use inheritance, composition or custom resources to create different units etc.

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน +1

      Yep, I'll be covering them in a future video. In my case, it's a mix of custom resources and composition. Custom resources for setting stats and similar that exist on all units, composition for things custom to that unit type.

  • @barneystinson2382
    @barneystinson2382 2 หลายเดือนก่อน

    Could you make a video showing your Astargrid autoload and how you connect it's code to the character and enemies?

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน

      @@barneystinson2382 sure thing. I'm going to try and do some smaller videos answering questions and I'll add this to the list!

  • @Whhatt
    @Whhatt หลายเดือนก่อน

    Nice

  • @jasonwilliams8730
    @jasonwilliams8730 2 หลายเดือนก่อน +2

    👍

  • @jRsqILVOY
    @jRsqILVOY 2 หลายเดือนก่อน

    Could you do a video on the AI? How does it search for the best actions?

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน +1

      @@jRsqILVOY yep! I intend to cover that at some point. Quick answer: it's a scoring system to maximize kills and damage dealt on a unit's turn

  • @markshumarov
    @markshumarov หลายเดือนก่อน

    Art style seems quite reminiscent of Oryx's Tiny Dungeon. Were you inspired by it, or did you purchase the assets? I was also interested in acquiring their 16-bit fantasy pack, but I saw another game using it extensively during Steam Next Fest yesterday.

    • @TheShaggyDev
      @TheShaggyDev  หลายเดือนก่อน +1

      Yeah, I use Oryx as a base template for this game. Some stuff is pretty similar to the original, some has been modified a fair bit, and some are completely original graphics, such as bosses and all the animations, but I find Oryx helps me get the proportions and such figured out for the characters and levels.

    • @markshumarov
      @markshumarov หลายเดือนก่อน +1

      ​@@TheShaggyDev Oh, nice. This is a great approach. I might actually do something like that

    • @markshumarov
      @markshumarov หลายเดือนก่อน

      @@TheShaggyDev By the way, thanks a lot for the content! I have learned so much from your videos.

  • @brigandpatrolworllvideos9
    @brigandpatrolworllvideos9 2 หลายเดือนก่อน

    For the high level architecture, where do you include the level selection/path choices and intro /menu/win/lose states?

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน +1

      UI node for menus that need to be around during the game.
      Level and path selection gets saved external to battles and loaded in at runtime. There's a Player resource that tracks game progress and can be used to load in a desired battle configuration. That configuration has things like what maps to use, what enemies are available, etc

    • @brigandpatrolworllvideos9
      @brigandpatrolworllvideos9 2 หลายเดือนก่อน

      @@TheShaggyDevquick reply! I just finished the video haha. Nicely done. Thanks for the tips.
      I use a lot of state machines and object pools. And am now trying to use command and strategy patterns. What’s your take on patterns? Do you use them much?

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน +1

      ​@@brigandpatrolworllvideos9 Haha, you caught me right when I'm doing some social stuff so great timing!
      Sure, I use them as needed, but all of the major game engines also have their own patterns or implementation of common patterns that are super important to learn.
      The trick with design patterns is that they're tools for accomplishing certain jobs, so it's important to not try to force a hammer to become a screwdriver, which is easy to do when you're deep into learning about them (I'm personally guilty of this).

    • @brigandpatrolworllvideos9
      @brigandpatrolworllvideos9 2 หลายเดือนก่อน +1

      @@TheShaggyDev I plan on making myself guilty of this in a few scenarios to try and understand when and why to use them. Like maybe the attacks in your game would benefit from the strategy pattern. and maybe the moves for the ai and the player would benefit from the command pattern, but i haven't use either, so IDK.
      Thanks for making vids and keep it going. GL on your game!

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน

      @@brigandpatrolworllvideos9 Thanks! And good luck in your learning! Nothing wrong with experimenting to learn!

  • @Retro-Future-Land
    @Retro-Future-Land หลายเดือนก่อน

    Could this be incorporated into an over map / world-map strategy like some old-school strategy adventure game?

    • @TheShaggyDev
      @TheShaggyDev  หลายเดือนก่อน +1

      Sure, would just depend on how you wanted to run it. UDD has a world map and then transitions you into battles, so in a way it's already doing that. You just need a way of tracking data between the two views.

    • @Retro-Future-Land
      @Retro-Future-Land หลายเดือนก่อน

      @@TheShaggyDev Yeah that's the exact key I'm hoping to find. Thank you for the response. Do you know any way to track and transfer the data between the two views? I'm hoping to have it for that akin to the Total War campaign to battle to campaign etc.

    • @TheShaggyDev
      @TheShaggyDev  หลายเดือนก่อน

      @@Retro-Future-Land Resources are handy if you want one source of truth shared in multiple places, which is what I do in UDD. There's a resource that tracks the player's progresse, units, etc. Go into battle and load the units from that battle. Win the battle and earn some XP? Goes into that same resource so it's tracked and available in the map view.
      Some people also like to use a SQLite database if they have a lot of data to work with, but that would be way overkill for what I'm doing.

    • @Retro-Future-Land
      @Retro-Future-Land หลายเดือนก่อน

      @@TheShaggyDev Ok cool, thanks for the deep lore. I will probably be doing similar hopefully. Although it may be a bit more complex to track damage to components instead of HP.

  • @sean8599
    @sean8599 2 หลายเดือนก่อน

    Question: the stats and artwork of the units is a script that's inside each individual unit? or is that located elsewhere?

    • @TheShaggyDev
      @TheShaggyDev  2 หลายเดือนก่อน +1

      @@sean8599 that's stored in a custom resource. I'll discuss in depth in another video, but each unit has a resource that defines the stats, animations, etc for it and that resource is loaded at runtime into the unit instance, which knows how to parse and load everything for usage during battle