Better AI in Unity - GOAP (Goal Oriented Action Planning)

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 168

  • @git-amend
    @git-amend  7 месяцев назад +32

    For anyone wanting to build better AI systems in their projects, this video is for you! I hope this video will give you the insights you need to implement GOAP in your project! 😁

    • @Kzyh43
      @Kzyh43 7 месяцев назад

      Awesome! thanks

    • @git-amend
      @git-amend  7 месяцев назад

      You're welcome!

    • @Yaroslav-br6xn
      @Yaroslav-br6xn 7 месяцев назад

      afaik utility ai works a little bit differently, will you make a video to cover that topic?

    • @beaworldchild
      @beaworldchild Месяц назад

      @@Yaroslav-br6xn They did! ruclips.net/video/S4oyqrsU2WU/видео.html

  • @mohammada8328
    @mohammada8328 7 месяцев назад +68

    Honey wake up, git-amend posted another programming video

  • @dan.ec90
    @dan.ec90 7 месяцев назад +33

    My God, man...
    Always so advanced, sometimes very complex and yet easy to understand.
    I'm constantly in awe watching your videos.
    Where have you been all theese years, man? I missed you and didn't even know it...
    This channel is a gold mine for Unity devs. Please, never stop!

    • @git-amend
      @git-amend  7 месяцев назад +6

      Thanks a lot, I really appreciate the kind words! Lots more to come!

  • @bhuvneetsaggu4011
    @bhuvneetsaggu4011 7 месяцев назад +32

    Unity should award you.. For making The best advance tutorials on advance programming.

    • @git-amend
      @git-amend  7 месяцев назад +1

      Haha maybe one day! Thanks!

  • @ЕвгенийТаранцев-ы8к
    @ЕвгенийТаранцев-ы8к 7 месяцев назад +7

    Actually my first comment for the decades of watching different Unity/dev/code videos. I’m a game designer in the core but learnt Unity up to middle+ level for eventual making pet projects.
    Your work and videos are for sure invaluable and grant a lot of specific details to maintain well-architected projects. Thanks ;)

    • @git-amend
      @git-amend  7 месяцев назад +2

      Thanks for sharing! Great to receive your first comment!

  • @drewalkemade3715
    @drewalkemade3715 7 месяцев назад +3

    I knew this was going to be an awesome implementation of GOAP, but it's awesome how you incorporated Factory, Strategy and Injection patterns into this... I'm currently doing some dialogue editor tools and would love to see you create some editor tools for this. Everything you do is impressive!

    • @git-amend
      @git-amend  7 месяцев назад +1

      Glad you liked it! And editor tool might make a great follow up, I'll give it a bit of thought!

  • @silchasruin4487
    @silchasruin4487 7 месяцев назад +1

    I can't believe that you actually took the time to go through GOAP! With your teaching style, it makes so much more sense and it's made it so easy! You've actually given me some ideas on the implementation, I'll have to experiment with more. Thank you again

    • @git-amend
      @git-amend  7 месяцев назад +1

      Glad to hear that! Always nice to hear someone is going to take what they see here and run with it!

    • @silchasruin4487
      @silchasruin4487 7 месяцев назад

      @@git-amend I'm working on a game with enemies that require the complexity of the intelligence behind GOAP but once I have something to show off, I'll make a video to show you what I've made.

    • @git-amend
      @git-amend  7 месяцев назад +1

      @@silchasruin4487 Excellent, can't wait!

  • @ItsMidNightDev
    @ItsMidNightDev 6 месяцев назад +4

    This is a great tutorial. Thanks for making it!
    I'm definitely not at the level where I understand fully how everything that you implemented worked together to create this kind of a system, but it's good to know of this method of programming AI. I'll definitely be re-watching when I've improved my knowledge and skills some more to really get a good understanding! Thanks again! 😄

    • @git-amend
      @git-amend  6 месяцев назад

      Thanks for the comment, glad to hear that!

  • @CrashKonijn
    @CrashKonijn 7 месяцев назад +5

    Great tutorial! Thanks for mentioning my project

    • @git-amend
      @git-amend  7 месяцев назад +1

      Thank you for the kind words! It's truly an honor to receive feedback from the creator of such an amazing project. Your project is fantastic, and I'm glad to share it with others. Looking forward to seeing how you continue to develop it!

  • @pythonxz
    @pythonxz 7 месяцев назад +6

    I remember when I first played FEAR. The AI surprised me with how dynamic they were.

    • @git-amend
      @git-amend  7 месяцев назад +2

      Yeah, it's really something else. I want all my enemies to give that feeling!

  • @martin.m.kloeckener
    @martin.m.kloeckener 7 месяцев назад +11

    Man, who are you? All your videos are so advanced and clean. Have you been working as a lead systems engineer at Rockstar or someting? 😅

    • @git-amend
      @git-amend  7 месяцев назад +11

      Well that's a high compliment! I am an engineer, but not at Rockstar... will talk about it one day when I can! 😁

    • @martin.m.kloeckener
      @martin.m.kloeckener 7 месяцев назад +3

      @@git-amend Thank you so much for your videos! They open up a whole new dimension in game programming for me.

    • @git-amend
      @git-amend  7 месяцев назад +2

      @@martin.m.kloeckener You're welcome! I'm glad to hear it.

  • @AkakiAkakievitch-kc2vk
    @AkakiAkakievitch-kc2vk 7 месяцев назад +3

    thank you so much!
    A great deep dive into GOAP!

    • @git-amend
      @git-amend  7 месяцев назад

      You're most welcome!

  • @TheAndyW19
    @TheAndyW19 7 месяцев назад +2

    Been aware of GOAP for a while now but never looked into it very much. This seems like such a useful method for creating intelligent and modular AI. Will definintely have to give it a try. Keep up the good work.

    • @git-amend
      @git-amend  7 месяцев назад

      Great to hear! Thanks for the comment!

  • @falgunpawar
    @falgunpawar 2 месяца назад

    Bro for someone not good at coding and thinking of building complex things, your videos are the perfect thing. I not only learn game development but also C#. Thank you so much for the time and efforts you put in the making of these tutorials l.

    • @git-amend
      @git-amend  2 месяца назад

      I appreciate that!

  • @EduardScobioala
    @EduardScobioala 7 месяцев назад +2

    nooo this is imposible, too good to be true.
    so complex and yet so well explained, thanks for every piece of effort you put in your videos.

    • @git-amend
      @git-amend  7 месяцев назад

      Thanks so much for the kind words! Glad you liked it!

  • @marksteinburg4726
    @marksteinburg4726 6 месяцев назад

    I am 25 min in. Just started the DFS part. Lot of new concepts. As a self taught programming newb, it is a lot to take in at the same time as learning about goap. Patterns, lamba expressions, delegates, node search algorithms. My head is hurting but I like it! I appreciate you covering these more advanced topics compared to most other channels. Thanks

    • @git-amend
      @git-amend  6 месяцев назад

      Glad to hear it! This is definitely one of the longer more advanced vids on the channel!

  • @yonatanabergel
    @yonatanabergel 2 месяца назад

    Thank you for this great video!
    fully implemented in my game.
    Would love to see more long videos like this!
    have a good one

  • @DefiantGamesOfficial
    @DefiantGamesOfficial 6 месяцев назад +2

    Incredible video, one of the best on GOAP ive seen

    • @git-amend
      @git-amend  6 месяцев назад

      Thanks a lot 😊

  • @alienoberle7
    @alienoberle7 7 месяцев назад +2

    Thank you, really appreciate your work and the effort you put into these videos!

    • @git-amend
      @git-amend  7 месяцев назад

      My pleasure! Thanks!

  • @jzeltman
    @jzeltman 7 месяцев назад

    You're killin it man. Great stuff. This video was fascinating. Loved the suggestions at the end. Would be interesting to see how you turn this into something more editable for the designers to use and so new beliefs/goals/etc wouldn't be created in code but rather in the editor. Keep up the great work, you're doing so well.

    • @git-amend
      @git-amend  7 месяцев назад

      Thanks! Not a bad idea, I wonder if I could fit that into a video…

  • @nullx2368
    @nullx2368 7 месяцев назад

    My position is senior but i still love your videos. Can't wait to watch this later looks awesome!

    • @git-amend
      @git-amend  7 месяцев назад

      Hope you enjoy it!

  • @Blim92izy
    @Blim92izy 7 месяцев назад +6

    The goat is back with the goap

    • @git-amend
      @git-amend  7 месяцев назад

      I like that one!

  • @alaslipknot
    @alaslipknot 3 месяца назад

    your videos are so good, am saving them to my GDC playlist.

    • @git-amend
      @git-amend  3 месяца назад

      Awesome, thank you!

  • @_stephenhubbard
    @_stephenhubbard 7 месяцев назад

    A 45 min git-amend video! Oh boy I'm gonna need another cup of coffee and a notepad!

    • @git-amend
      @git-amend  7 месяцев назад

      I’m on coffee #1 now too! Cheers!

  • @modiddymo
    @modiddymo 6 месяцев назад

    Your tutorials are very good: clear, concise, well-reasoned. I would like to see the font size bigger especially for mobile. Appreciate your work :)

    • @git-amend
      @git-amend  6 месяцев назад

      Thanks for the comment. Not sure I can go much bigger on the font size, but maybe in some areas. Cheers!

  • @rutchjohnson
    @rutchjohnson 7 месяцев назад

    Thank you for making this! I’ll be needing something like this in the near future.

    • @git-amend
      @git-amend  7 месяцев назад

      Awesome, I hope it helps you with your project(s)!

  • @jakewood1942
    @jakewood1942 3 месяца назад +1

    Programming question (around 4:20)
    Why use Func condition instead of just bool condition? I can't seem to find an answer online anywhere. It seems to me like they essentially do the same thing...? Lambda notation in general is crazy to me 😅

    • @git-amend
      @git-amend  3 месяца назад +1

      Using Func instead of a bool allows for dynamic, lazy evaluation of conditions, enabling them to be checked in real-time as game state changes, rather than at a single point in time. This approach is particularly useful in scenarios like state machines or conditional updates, where the condition depends on current game state or player actions. By using Func, you can pass a lambda or delegate that is evaluated at the time it is needed.

  • @oldmanjim4853
    @oldmanjim4853 6 месяцев назад

    Thanks for the great tutorial.
    Is there any chance of this being expanded to show us more low-medium level devs how to use scriptable objects and / or Node Canvas?

    • @git-amend
      @git-amend  6 месяцев назад

      I might do some videos on those topics in the future. Node Canvas might be a tough one because it's expensive and not everyone has access to it, but maybe we could build something similar from scratch.
      Regarding the gFactory, I can't recall exactly what I did in the video. You can put a GOAP Factory component on a GameObject and provide a reference through a public field if you don't want to use Injection or another method of inversion of control.

  • @guillem99
    @guillem99 7 месяцев назад +1

    It would be cool to see a video on creating a blackboard!

    • @git-amend
      @git-amend  7 месяцев назад +2

      Yes, for sure. I’ll probably do that before we explore behaviour trees

  • @TheKr0ckeR
    @TheKr0ckeR 7 месяцев назад

    Thanks again, I would really like to see an advanced interaction system which there is no tutorial about that. For example dual-interactions that both effect player and the object, Interaction that need require different parameters, like one is inventory, and other is simple transform. Like a portal and chest. making them de-coupled with interfaces but with different params

    • @git-amend
      @git-amend  7 месяцев назад

      Good idea, I'll write that one down. Thanks!

  • @oldshamen
    @oldshamen 7 месяцев назад

    Always a pleasure watching your videos. I learn something every single time.

    • @git-amend
      @git-amend  7 месяцев назад

      Awesome, thank you! Love to hear that!

  • @TuberTugger
    @TuberTugger 7 месяцев назад

    Always information dense! Loved all 45 minutes

    • @git-amend
      @git-amend  7 месяцев назад

      Awesome, thank you!

  • @ImmortalTimothyM
    @ImmortalTimothyM 7 месяцев назад

    Thank you for the great video. I am actually working on my own AI system right now for a platformer game. I am unsure if it makes sense for my needs to add this type of logic, but it is cool regardless.

    • @git-amend
      @git-amend  7 месяцев назад +1

      Right on, maybe it will give you some ideas!

  • @mirkoemir
    @mirkoemir 7 месяцев назад +1

    Really great tutorial 👍

    • @git-amend
      @git-amend  7 месяцев назад +1

      Thank you! Cheers!

  • @connorjagielski6760
    @connorjagielski6760 7 месяцев назад

    You should make a short video on the diagrams you make - they’re always so clear. I can’t seem to make anything nearly as neat lol

    • @git-amend
      @git-amend  7 месяцев назад

      Good idea! I’ll try to squeeze that in!

  • @MTDDev
    @MTDDev 7 месяцев назад

    Hey, great work, I m happy to see an work like this. I would propose that, if you have time, you could try using Utility-Based Planning. Then community can compare both approaches, maybe even try a hybrid algorithm 😁

    • @git-amend
      @git-amend  7 месяцев назад +1

      Thanks! Yes, a few people have requested a video about Utility AI. I've added it to my TODO list!

  • @Multizauri
    @Multizauri 7 месяцев назад

    Nice tutorial, thanks a lot! How about you make a video about parkour system (climbing, overcoming obstacles and so on) or procedural 3D level generation?

    • @git-amend
      @git-amend  7 месяцев назад +1

      Thanks. I'll take note of those ideas!

  • @hunterfox6230
    @hunterfox6230 7 месяцев назад

    @Git-amend So far I am really enjoying the video. Where is the CountdownTimer class coming from?

    • @git-amend
      @git-amend  7 месяцев назад +1

      Thanks! There's a link to all the code, including utilities and extension methods in the description.

  • @damonfedorick
    @damonfedorick 7 месяцев назад +1

    nice, can you do Facepunch transport for netcode for game objects, its steams API c# wrapper .

    • @git-amend
      @git-amend  7 месяцев назад +1

      Hmm that’s an interesting idea! I’ll give that some thought!

    • @damonfedorick
      @damonfedorick 7 месяцев назад

      @@git-amend Please Do, Garry Newman is my God. his Transport is For everyone! as well i can only find a couple videos on how to implement it, so there is a spot there for you. (Edit: Steam actually tells you to use the Facepunch transport if you are using unity)

    • @git-amend
      @git-amend  7 месяцев назад +1

      @@damonfedorick Took a quick look at github.com/Facepunch/Facepunch.Steamworks very interesting stuff. I'll put this on my list.

    • @damonfedorick
      @damonfedorick 7 месяцев назад

      @@git-amend Nice.

  • @ewwegg
    @ewwegg 6 месяцев назад

    Incredible tutorial - very detailed, explained clearly, and set at a great pace.
    What color theme are you using in your code editor? It's perfect.

    • @git-amend
      @git-amend  6 месяцев назад

      Thank you! The theme is just Rider's default, I'm pretty sure!

  • @KuroUsagi1010
    @KuroUsagi1010 7 месяцев назад +1

    another awesome video!

    • @git-amend
      @git-amend  7 месяцев назад

      Glad you enjoyed it!

  • @Hersatz
    @Hersatz 7 месяцев назад

    Great stuff, as always!
    Do you intent to look into HTN in the future?
    Comparing multiple AI planning algorithms could prove to be very interesting.

    • @git-amend
      @git-amend  7 месяцев назад +1

      Thank you! I hadn't really considered a video on HTN until I read your comment. Maybe that's a good one for the future! Cheers!

  • @SleepyDragonGames
    @SleepyDragonGames 6 месяцев назад

    You mention updating this to use scriptable objects. Can you give an overview of what that would look like. I've been trying to do that myself and want to compare notes. Full disclosure, I've been failing to think of what would break off into SOs.

    • @git-amend
      @git-amend  6 месяцев назад

      Well, it's a bit much to describe in a YT comment, but essentially the Scriptable Objects would be flyweights that have their own factory method which creates actual Actions, Beliefs and Goals you can use when starting the system. This way you can setup a nice editor tool that will allow you to configure all the setup in Unity using SOs and when the game starts you run some logic that puts it all together into something useable in the system by calling all the factory methods you need to get C# representations for the live system.

  • @INeatFreak
    @INeatFreak 7 месяцев назад

    Now this is what I subscribed for!

    • @git-amend
      @git-amend  7 месяцев назад

      Right on, hope you like it!

  • @dmitrywroclaw9165
    @dmitrywroclaw9165 3 месяца назад

    Thank you!

  • @Tranquility-lm4yz
    @Tranquility-lm4yz 6 месяцев назад

    As far as I am concerned, AI in Dwarf Fortress is designed in such way, and the devs even add short/long term memory system to the agent.

    • @git-amend
      @git-amend  6 месяцев назад +1

      I like that idea. Along those lines, I've been also thinking about a 'credibility' score... so the longer it's been since an agent verified something was true, the less true it might become.

  • @yonatanabergel
    @yonatanabergel 2 месяца назад

    what Unity packages did you use? would love to download the one where it puts reflections on the editor to display the current actions and stats!

    • @git-amend
      @git-amend  2 месяца назад

      Just a custom script, no Unity packages - github.com/adammyhre/Unity-GOAP/blob/master/Assets/_Project/Scripts/GOAP/Editor/GOAPAgentInspector.cs

  • @abdelrahmanneehad559
    @abdelrahmanneehad559 7 месяцев назад

    Thank you for the advanced tutorial. I'm working on a psychological horror game set in a castle where players solve puzzles and hide from enemies. I'm unsure about which type of enemy AI would be best suited for this game. The enemy should be able to search for the player within the castle. Additionally, I'm undecided whether to use a navmesh or A* pathfinding. Any advice on this would be greatly appreciated❤❤ .

    • @git-amend
      @git-amend  7 месяцев назад +1

      If you don't need the full power of GOAP, you might want to consider behavior trees. They offer a balance between the adaptability of GOAP and the clarity of state machines, allowing for complex behaviors like searching and patrolling to be broken down into manageable tasks. This modular approach can make your AI's decision-making processes more nuanced and unpredictable, enhancing the suspense and horror elements. Regarding pathfinding, I would first try the nav mesh approach since it's already integrated with Unity, especially if you need a nav mesh already for the player. If you need more customization, then look into A*. The tool I mentioned in the video is excellent.

    • @abdelrahmanneehad559
      @abdelrahmanneehad559 7 месяцев назад

      @@git-amend Big Thx ❤️❤️❤️❤️❤️❤️

  • @Morphexe
    @Morphexe 7 месяцев назад

    This is actually really interesting setup, I do have a question and havent really looked to much into GOAP. How would this handle dynamic goals, for example: Heal Friendly Target.
    But to heal this target we need to have a specific item. Do we just go and create all the actions for all the items? Do we do a Dynamic Action of sort that is UseItem , and create it on the fly on the plan? That means that now we have a ton of other actions to create - assuming a action factory exists for them for the character - , for example (findItemA, PickItemA) etc, that are derived from the state, is this the approach on this sort of systems?

    • @git-amend
      @git-amend  7 месяцев назад

      You're on the right track. Generally speaking you try to build goals in such a way that they are as loose as possible. Without diving into a ton of detail, instead of an Action that is Use Health potion, you have an Action that is either Use Item that implements IHeal interface or Use Item that has an IHealStrategy, and then you aren't programming for every eventuality, and the Agent has options.

  • @TheKr0ckeR
    @TheKr0ckeR 7 месяцев назад

    Great guide as always. Do you also use Unreal Engine or you are planning to continue your journey in Unity? What are your thought about UE? I have been using Unity +6 years and even though i feel i am a good developer myself but i still cant tell myself a game developer since all the games i have played from childhood was developed in c++. I feel like real game devs are on c++ side bu its a corrupted thought i know. :D Still, i want to continue my journey in UE side to develop high-end games or with c++. Even though i work as a full time game developer in unity side, i would love to develop in UE too.

    • @git-amend
      @git-amend  7 месяцев назад +1

      It might be tempting to attach skill level to a particular language, but the reality is that you will reach a point in your game dev (or engineering) career where you become language agnostic. For example, at work this week I wrote code in 4 different programming languages. The syntax and some particularities of each language are different, but the best practices, patterns and principles of engineering remain the same.
      I have used Unreal, but I enjoy using Unity more, and the channel will for the most part remain a C#/Unity channel for the future as far as I can tell. I think if you have been using C# for 6 years, you will not have a difficult time using C++ or Unreal.

  • @VitorSoares_GameDev
    @VitorSoares_GameDev 7 месяцев назад

    Incredible video

    • @git-amend
      @git-amend  7 месяцев назад

      Thank you so much!

  • @derekdipietro9805
    @derekdipietro9805 7 месяцев назад

    Do you have a video on your animation controller?

    • @git-amend
      @git-amend  7 месяцев назад +2

      I don’t, but not a bad idea for a video. Thanks!

  • @NathanSL11
    @NathanSL11 7 месяцев назад

    Great Video! Can we get a utility ai on your to do list too?

    • @git-amend
      @git-amend  7 месяцев назад

      Sure, I’ll write that down. Anything in particular?

    • @NathanSL11
      @NathanSL11 7 месяцев назад

      @@git-amend Nothing in particular, GMTK did a good overview on The Sims (ruclips.net/video/9gf2MT-IOsg/видео.html) and I'd love to see your unity take on the system.

    • @git-amend
      @git-amend  7 месяцев назад

      @@NathanSL11 Nice, I'll watch that today and give it some thought!

  • @MarushiaDark316
    @MarushiaDark316 7 месяцев назад

    Would it make more sense to have the belief's location be a nullable Vector3 since Vector3.zero could be a potentially valid location for something to occur?

    • @git-amend
      @git-amend  7 месяцев назад +1

      Using a nullable Vector3 for indicating an uninitialized position is a valid solution if that was a concern you had. Another approach might be to use the Null Object pattern and define a distinct 'NullLocation' object to be a clear, type-safe alternative to signify the absence of a position without resorting to nulls. Then all locations could be represented by a specific type, and potentially include even more information.

  • @WelshGuitarDude
    @WelshGuitarDude 3 месяца назад

    Could you do a video on HTN which is similar to GOAP but apparently more superior these days.

    • @git-amend
      @git-amend  3 месяца назад

      Great suggestion, I'll write that one down. Thanks!

  • @VladaPersonal
    @VladaPersonal 7 месяцев назад +1

    Legend!

    • @git-amend
      @git-amend  7 месяцев назад

      Thanks for watching!

  • @ryaz4704
    @ryaz4704 7 месяцев назад

    Thank you! But I think my brain overheated. I'll need some time to cram all of this into my head before I can play around with it.

  • @hanmayujiro1433
    @hanmayujiro1433 4 месяца назад

    Hi, tell me pls how do you move the character? Where is the movement logic?

    • @git-amend
      @git-amend  4 месяца назад

      You can move the character any way you want to. This video just uses simple NavMeshAgents with a small script for point and click.

    • @hanmayujiro1433
      @hanmayujiro1433 4 месяца назад

      @@git-amend aaaaaaah, I see.
      Thank you Adam, you're the best

  • @ggwp8618
    @ggwp8618 7 месяцев назад

    When do you suggest to use goap or normal state machine system

    • @git-amend
      @git-amend  7 месяцев назад

      I would favor GOAP for complex, dynamic environments where adaptive AI behavior is required, and choose state machines for simpler contexts with predictable, easily manageable states for clearer behavior logic.

  • @inkofthedragon
    @inkofthedragon 2 месяца назад

    Where is the walk animation being triggered in the code? Thanks

    • @git-amend
      @git-amend  2 месяца назад

      It's just a simple blend tree based on the unit's velocity.
      github.com/adammyhre/Unity-GOAP/tree/master/Assets/_Project/Scripts/Animation

  • @bluzenkk
    @bluzenkk 7 месяцев назад

    cool~~

    • @git-amend
      @git-amend  7 месяцев назад

      Hope ya like it!

  • @valhallagalex
    @valhallagalex 5 месяцев назад

    Would such a system be appropriate for a game director (think L4D's game director) i.e. an AI overlord that tries to shape the experience of the player(s), or would you use something different? If something different, could you recommend a topic? Even if you haven't covered it, for my own research.
    Thank you.

    • @git-amend
      @git-amend  5 месяцев назад

      For a complex and dynamic system like L4D's Game Director, GOAP can be a good choice due to its flexibility and ability to handle complex decision-making processes. However, Utility AI might be a more practical choice if you are looking for a balance between complexity and performance. Utility systems can provide a dynamic and responsive AI without the overhead of GOAP. This will be the topic of a future video.

  • @Abdulwahab-vb6he
    @Abdulwahab-vb6he 7 месяцев назад

    Hi! Hope you are doing good, i have little bit issue with my self i really love your content but things always goes up from head i really want to get all of this how i can do that? i know the OOp data structures but in real life i really don't follow as much because of small dead lines we create games just for 1 or 2 weeks............ i really want to start can you guide me pls..................your content is love.....

    • @git-amend
      @git-amend  7 месяцев назад +1

      Just keep watching, and try to learn something new every day! And make some small games!

  • @inkofthedragon
    @inkofthedragon 2 месяца назад

    With GOAP, how would you implement an AI taking damage and triggering a damaged animation? During this damage state, they should not be able to perform any actions. Do you complement GOAP with a state machine and have the two systems communicate? If so, what's a clean way for GOAP to determine which actions are available per state? Honestly that sounds messy. Or would you use only GOAP, with a belief such as 'isDamaged,' where the corresponding action would trigger the damaged animation? Or would you approach it completely different? Thanks!

    • @Mad3011
      @Mad3011 Месяц назад

      I think you have the right idea. I would probably build a system outside of GOAP that registers hits and plays animations but can set GOAP parameters. Then I would add a "IsAbleToMove" belief that is a precondition to all actions wanting to move the character. While the taking damage animation is playing, set that belief to false and reevaluate the plan at the beginning and end of the animation. This would still allow the character to call for help for example. Which could then trigger other enemies to swarm the position.

  • @bartekwoszek233
    @bartekwoszek233 6 месяцев назад

    How ur not serialized objects are serialized? Unity 2023?

    • @git-amend
      @git-amend  6 месяцев назад

      That depends on which objects you mean, but I do use Odin Serializer.

  • @Songfugel
    @Songfugel 3 месяца назад

    A very minor thing, 6:03 but you don't want to be using distance for in range comparisons like this where you don't need to know the exact distance, just it is within the range, since it is needlessly costly calculation that includes an expensive squareroot operation that isn't needed. You can use the much faster square magnitude for the in range comparison

  • @morphidevtalk
    @morphidevtalk 7 месяцев назад +1

    ECS tutorial pls!

    • @git-amend
      @git-amend  7 месяцев назад

      Yes, one of these days. Do you have any ECS pain points, or just in general?

    • @morphidevtalk
      @morphidevtalk 7 месяцев назад +1

      @@git-amend in general, I would say. There is no “horizontal” understanding of architecture, namely the beginning of the project. I studied a lot of theory and text and videos, saw examples of use (leoess, etc.). but at the beginning of planning my own architecture for a large and small project, there is simply no starting point in my head. It’s a bit of a strange feeling after I started to understand OOP well. :)

    • @git-amend
      @git-amend  7 месяцев назад +2

      @@morphidevtalk I know what you mean. I'll keep that in mind for when I tackle that subject in the future, thanks for the comment.

    • @dreamcatforgotten8435
      @dreamcatforgotten8435 7 месяцев назад +2

      @@git-amend There's quite a lot of things that can be discussed that feel glossed over, or is outdated since most tutorial videos are based on version 0.51.
      Here are some ECS videos I'd like to see--
      - How to understand ECS Physics collisions, and how to get the same behavior as OnCollision/OnTrigger Enter/Stay/Exit in an ECS context
      - How to use Animation Curves with ECS
      - When to use BlobAssets versus NativeArrays and NativeLists in ECS
      - How to use ScriptableObjects with ECS
      - How to communicate between ECS and GameObjects (Systembase, events, etc)
      - How to Bake a proper GameObject heirarchy to ECS, and how to interpret/visualize it in an ECS context
      I know some of these topics are intermingled with each other, but figured I'd state them anyways.
      I could go on, but ECS just feels half-baked and half-explained.

  • @user-en7no1is8e
    @user-en7no1is8e 7 месяцев назад +1

    one question boss, how the hell we understand whats happing please help, i want to be like you, programming wise.

    • @git-amend
      @git-amend  7 месяцев назад +1

      One step at a time, I suppose. You might want to join others on Discord (link in description) - people of all programming levels are there helping each other, and there is a recommended reading list pinned in the #programming section you might be interested in.

    • @user-en7no1is8e
      @user-en7no1is8e 7 месяцев назад

      @@git-amend ty so much for this response

  • @benky5478
    @benky5478 6 месяцев назад

    Amazing video but is this guys voice AI generated?

    • @git-amend
      @git-amend  6 месяцев назад

      It's my real voice.

  • @songerk7102
    @songerk7102 4 месяца назад

    Can someone explain to me please, why when the action is complete, it evaluate all effects? for what purpose?

    • @git-amend
      @git-amend  4 месяца назад

      Evaluating the effects ensures that the planner dynamically adjusts the sequence of actions based on the current state and the satisfaction of required effects. By removing any effects that have already been satisfied, either directly or indirectly through performing an action, the planner avoids redundant actions and focuses only on unmet requirements. This optimization helps in efficiently progressing towards the goal.

    • @songerk7102
      @songerk7102 4 месяца назад

      ​@@git-amendYeah, but what you meant is happening in the planner and in the planning functions, and I asked about evaluate in the Action class, in the update function, at the button of the function, in the loop of the effect, In the section you comment with "Apply effects".
      What is the purpose of evaluating? if it only meant to return a bool and nothing else, it isn't changing any value, it only returning a bool.

    • @git-amend
      @git-amend  4 месяца назад

      @@songerk7102 The Evaluate method executes whatever callback effect methods belongs to that Action. It could be anything you want, even a complex method that changes state.

  • @sagrgywejhxcvx
    @sagrgywejhxcvx 7 месяцев назад

    blurp

  • @simonnordon8421
    @simonnordon8421 7 месяцев назад

    do you even GOAP BRO

  • @morphidevtalk
    @morphidevtalk 7 месяцев назад

    second)

    • @git-amend
      @git-amend  7 месяцев назад

      Thanks for the algorithm bump! lol

  • @gr3chu
    @gr3chu 7 месяцев назад

    first

  • @bgt7911
    @bgt7911 7 месяцев назад

    Where is the game dev road map video

    • @git-amend
      @git-amend  7 месяцев назад +2

      In the queue with a lot of other good ideas. Unfortunately I only have time to make one video per week.

  • @SojaBird
    @SojaBird 2 месяца назад

    Hey man, thanks for this great post!
    I have a question regarding the "AgentAction" script, specificly the "Update" function.
    In the script you evaluate the effects on the action when it is complete.
    My question, WHY would this be needed?
    Is this to ensure that, if the evaluate function would store state somehow, it would update that state? (see example)
    Inside the GoapAgent:
    "factory.AddBelief(new Belief("CakeTasteGood", () => {
    CakeSlice pieceOfCake = fridge.cake.TakeAPiece();
    return pieceOfCake.IsTasteGood;
    }"
    With:
    "class Cake {
    private Stack _slices = new (8);
    public CakeSlice TakeAPiece() => _slice.Pop();
    }"
    Keep up the good work!