Creating Smarter Dynamic AI in Unity for my Monster-Hunting RPG Roguelite | Vicious Legacy Devlog #5

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ • 68

  • @UnoriginalGameDev
    @UnoriginalGameDev 14 днів тому +17

    This is the first time I've seen your channel but I definitely know I'm going to be re-watching your vids, loving the concept of the game

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  14 днів тому +1

      @@UnoriginalGameDev Thank you! Glad you stumbled across them :)

  • @HeroGetsu
    @HeroGetsu 15 днів тому +15

    Ah you’re finally back I’m glad

  • @jacksonwaschura3549
    @jacksonwaschura3549 15 днів тому +8

    Great progress. Super exciting to see!

  • @j.j.maverick9252
    @j.j.maverick9252 15 днів тому +5

    an alternative to prevent the town/food cycle would be a simplistic memory. If the monster remembers that it was recently very hungry then a rule would be to eat until satiated rather than allowing the “not starving” case to take over.
    For stat changes this could be as simple as delayed modification, and in turn this might create more interesting behaviours in other cases (eg. a serious wound might not immediately deter an attacker)

  • @latvian_fallen_angel
    @latvian_fallen_angel 13 днів тому +1

    I love your videos man, can't wait for you to finish this game. I know it will take a long long time for you but I'm here for you!!!

  • @pinkgill
    @pinkgill 14 днів тому +5

    Im SO glad your getting back into Devloging. When you released the #0 Devlog I was immidiatly hocked. I was never a big fan of Monster Hunter or anything like that but the idea and passion I could see in these videos truely stunned me. The creative direction your taking is fantastic, I didn't even know about caves of qud before your video and yet the concept was so intruiging that I consumed hours more content around the theme and am YEARNING to see were you take this game. I just want you to know, that whereever that little boat takes you I and many others will be coming with :D (also do you have any longer form content or stream anywhere, I could serieously fall asleep to your voice O=v=O)

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  14 днів тому +1

      @@pinkgill Hey thanks so much! That's awesome I really appreciate it. Really glad you're enjoying the videos ❤️
      This is officially the longest piece of content I've released, however I will be doing Dev streams for the Fellow Dev tier and up on patreon and Q+a sessions for early access explorers tier and up, and at least the Dev streams are likely to be much longer than the devlogs.
      Cheers

  • @Bloodlinedev
    @Bloodlinedev 13 днів тому +2

    You probably watched all the GDC GOAP videos but the hottest tip is to remove as many states as possible from the planner - instead of giving it multiple food targets, select the target via utility score; Remove states that are implied anyway, like to attack I need to have a weapon etc.
    Love GOAP as a technique myself, it gives me the impression of having created somewhat intelligent and interesting behavior.
    Lovely project, can't wait to see where the journey takes you.

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  13 днів тому

      @@Bloodlinedev Hey Cheers! Yeah I mention those GDC videos towards the end and some tips they talk about, pretty much the same ideas :) I haven't applied them though haha

  • @therealrenorth
    @therealrenorth 15 днів тому +9

    Ah yes, the monster's now have the potential to be as smart as world marshal leaders.
    Nice...

  • @jamesberkelmans
    @jamesberkelmans 15 днів тому +4

    Love to see it :)

  • @Godot-Game-Dev
    @Godot-Game-Dev 15 днів тому +3

    Ha you've inspired me to try doing this in Godot when I have the time soon! It seems like a really cool way to make open worlds feel more alive.

  • @unspi554
    @unspi554 13 днів тому

    Oh very nice concepts that you'll use !

  • @diegoscotti8803
    @diegoscotti8803 14 днів тому +3

    We are back

  • @MrNootka
    @MrNootka 15 днів тому +2

    Very insightful video! I was not aware of GOAP and funny enough recently I too was having the same struggles with state machine; I do not develop games but I have always found game devs have a lot of knowledge that can be applied elsewhere
    Thanks for sharing ^_^

  • @erinkarp
    @erinkarp 15 днів тому +3

    New vicious legacy vid!!!

  • @Tawlest
    @Tawlest 14 днів тому +3

    Babe! Hurry up! A new devlog just dropped!

  • @Ermude10
    @Ermude10 11 днів тому

    Very interesting video!
    I think one could also introduce a slight cost of switching goals or actions as a way to mitigate the back and forth switching of actions. It's like that in real life as well. We always have a slight bias and momentum towards the thing we are already doing.

  • @MURD3R3D
    @MURD3R3D 13 днів тому +1

    Ai and games youtube channel is super useful

  • @Skelly_101
    @Skelly_101 15 днів тому +6

    W

  • @JoeTheSmiter
    @JoeTheSmiter 15 днів тому +7

    If you encountered the issue of the monster entering the feeding loop in town, why not switch to a state machine once the monster begins eating, to ensure it either eats enough to not enter the loop, or eats all the available food in town?

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  15 днів тому +3

      @@JoeTheSmiter I mean yeah you could, it would probably work just fine to command our way into an eating state, I was just more trying to find a solution to the issue of dynamic priorities, as we don't want to necessarily have to set up and switch to state machines for every action

  • @joshuafriguglietti8230
    @joshuafriguglietti8230 14 днів тому +2

    Intresting, I do not know how to code or anything in this feild but you make it very easy to understand

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  14 днів тому

      Thank you! I recommend something like CodeMonkey if you want to learn! He has some great beginner courses

  • @srsherman7
    @srsherman7 12 днів тому +1

    I have been watching this project grow from the beginning and it looks great so far, you're doing a great job, keep it up! Also... will this be released on steam? If so, I don't see a page for it, when you create one, i will definitely wish list it!

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  12 днів тому +1

      @@srsherman7 thank you! That's awesome you've been following from the beginning. I'm back full time so should be making some decent progress from now.
      I 100% will be putting it on steam when it's done, but I don't have a page. I'm not a big believer in putting a page up with placeholder images and gameplay etc, but once there's enough of the game to polish up a trailer and some nice screenshots I'll make a page :)

  • @GuildOfCalamity
    @GuildOfCalamity 15 днів тому +4

    Having a flock behavior could be cool; they would band together to hunt villagers for greater success.
    As a software engineer, that sounds like a nightmare to integrate and debug, so good luck with that.

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  15 днів тому +2

      @@GuildOfCalamity yeah flocking would be interesting. Goap is famously tricky when multiple NPCs are making decisions at the same time as they need to also be aware of other NPC decisions and plans in order to make theirs, so I'd probably need a separate system for it. If I'm flocking mobs I wouldn't use this

    • @johnleorid
      @johnleorid 15 днів тому

      @@ViciousLegacyGameAUS Do they? I always made it so that for the world state, every change is immediate, even when the real world state looks different. If an Agent uses an Item for its plan, it is reserved and no longer available for any other agent. If the plan is discarded, the item is freed.

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  15 днів тому

      @johnleorid I was thinking more if you're trying to orchestrate some kind of group behaviour like flanking or flocking, in which case they'd need to be aware of their comrades plans to make a cohesive plan as a unit. But as someone else said, you could use goap to control the swarm as a whole and not the individuals in cases like this

    • @j.j.maverick9252
      @j.j.maverick9252 15 днів тому

      @@ViciousLegacyGameAUS nominate a pack leader, the others take visual cues from that one. You’d need slightly modified rules for leader like paying attention to total casualties as well as personal injuries

  • @a.gpickersgill8641
    @a.gpickersgill8641 13 днів тому

    I use GOAP in my Godot games and have found that it is great for action selection (i.e. what module is running on each physics cycle) but should not be used for informing the logic of that action. So the WALK action does all of the checking about navmeshes, target locations, etc, and if there is an issue that prevents execution, it returns to the GOAP engine and reports the action has failed. In other words GOAP selects the state, but doesn't care what the state's action does cycle to cycle. This way the GOAP engine is only called by an NPC every n seconds and the GOAP calls themselves are quick.
    The other neat trick is that I load all GOAP actions and goals as discrete elements into action and goal dictionaries. So a "is_greedy" character might have a need to check for gold or gems that becomes more insistent over 10 seconds that a non-greedy character will not possess. Or a "is_gourmand" character will have a "hunger" goal that has a higher rate of decay than a normal character's "hunger" goal.
    Using this you can start to demonstrate the impact of world/game events by adding, changing or removing goals and actions. A starving character might turn to crime by adding a specific hunger or greed goal only used by criminals. A rich character's need for more wealth might be checked once every 30 days, and new goals added and old goals removed.

  • @banditbloodwyndevs8782
    @banditbloodwyndevs8782 14 днів тому +3

    In my oppinion, your devlogs are one of the best on YT. Interesting for when I want deep coding content, but still easy to digest!
    I have one question about GOAP: I'm currently working on a management-building-survival-game like RimWorld, so I'm always curious about patterns and systems to create my settlers AI.
    Since it's not a city builder like Cities Skylines, they need their AI to be a bit more complex. And my plan is to have a population limit of maybe 100 or 200. Do you think that GOAP can handle this?

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  14 днів тому +1

      @@banditbloodwyndevs8782 thanks so much! That means a lot.
      Hmm I would say that if you are wanting each member of the population of up to 200 to have its own dedicated goap system you're gonna have a bad time. I think you can probably make rimworld style game with just a really good command pattern and probably some kind of behaviour tree setup.
      If I remember correctly Quill18 had an awesome series where he makes a rimworld clone, I'd say check it out and see how he handles the behaviour for the pawns and tasks.
      But like anything, there's lots of ways to skin a cat!

    • @banditbloodwyndevs8782
      @banditbloodwyndevs8782 14 днів тому

      @@ViciousLegacyGameAUS Cool, thanks for the comprehensive answer.
      Good thing that we have AI's and UA-camrs to consult today, maybe I'll find a way ;)
      I already managed to put my Pathfinding in separate threads and make it super performant, so maybe I can reach the same for GOAP. The GOAP system doesn't need to run every frame for each settler. We'll see :)

  • @osc3892
    @osc3892 13 днів тому

    First time watching a video of yours, but this is gold! I just started my first game ever (literally touched a game engine like 3 weeks ago for the first time) but I've been wondering what the best way is of creating AI that isn't lifeless

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  13 днів тому +1

      @@osc3892 Hey welcome! Congrats on starting your first game! Remember there are often multiple ways to achieve the same effect, so be sure to try other AI patterns and see which works best for you :)

  • @emrekiratli2614
    @emrekiratli2614 14 днів тому

    🔥🔥🔥🔥🔥

  • @TheVonWeasel
    @TheVonWeasel 15 днів тому +2

    This AI is already more intelligent than most world leaders

  • @majorjohnson8001
    @majorjohnson8001 11 днів тому

    I've heard of GOAP before, at least in its design goals (Overcooked uses it), but I didn't know anything more than that. This might actually solve a problem I was having.

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  11 днів тому

      @@majorjohnson8001 how does overcooked use it when the characters are all player controlled? Or can you play overcooked with NPCs?

  • @hamsoft23
    @hamsoft23 15 днів тому +2

    Hey man, why don't you look at Rain World AI system and analyze it? I think it will help you a lot, it has one of the most complex AI behaviour, creatures storage data, not only of the player, but of the entire world, and different creatures act in different ways with this data they have saved.

  • @Brosquini
    @Brosquini 14 днів тому

    could you make the monster chase the player longer depending on hunger, and making the monster more scared one lower health, also if the enemy is low on health it flees, prob gonna be added later down the line but still. Cool looking game!

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  14 днів тому +1

      @@Brosquini 100% yes to all of this! I only play with hunger in the video but I'll be tying it in to lots of other stats exactly how you describe

  • @ghastdude589
    @ghastdude589 15 днів тому +2

    If only the Hello Neighbor devs put this kind of thought into their franchise's AI, this is so in-depth!

  • @lynnwilliam
    @lynnwilliam 13 днів тому

    The problem with goap is that it gets stuck in loops within loops. I'm currently writing a goap but chatgpt is the goap. And I give it a task

  • @temporalshift6399
    @temporalshift6399 14 днів тому

    Hi there! Have you heard of Skyrim's problem with smart AI? They had an issue with AI raising havoc due to them acting on their own goals and either monsters killing off all village NPCs or NPCs wondering off and being hard to find. Something worth keeping in mind with a project like yours. An occasional occurrence such as this, now that could be a cool thing to experience but Skyrim developers did have to dumb it down for it to work. I'm sure it was too late in development to resolve, for them so I wonder what solution you'll come up with (I'm sure that is an exiting idea rather than an issue in your eyes).

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  14 днів тому

      @@temporalshift6399 Hey, I hadn't heard this but I'm sure there are certainly areas I'll need to fake behind the scenes to keep it all together. For example maintaining a minimum number of animals for the monster to eat etc, rather than trying to actually simulate a balanced island ecosystem where everything would probably just go extinct etc

    • @temporalshift6399
      @temporalshift6399 13 днів тому

      @@ViciousLegacyGameAUS that's what game development is all about :) I wanted to make you aware that that is likely to be the outcome at first. Not sure if you want to keep villagers defended (even walls would do with villagers occasionally coming outside) or having a chance to be "brave enough" for monster to enter. Your concept is interesting and I wish you luck with it.

  • @Silencewalker
    @Silencewalker 14 днів тому

    If so much time was spent on Behaviour Trees then why not use Hierarchical Task Network (HTN) instead of GOAP? HTN may handle combat as a decomposition process with significant level of control over what primitive tasks should be chained.

  • @Anubisdotexe
    @Anubisdotexe 14 днів тому

    Looks like your conclusion is to combine GOAP with Utility AI.

  • @jarrodpassmore1944
    @jarrodpassmore1944 7 днів тому +1

    Algorithm!

  • @tamp2377
    @tamp2377 15 днів тому +2

    Wow what a sexy voice 10/10

  • @theos5187
    @theos5187 14 днів тому +1

    Hey, great video but the thumbnail is terrible. Looks like a random stock image and doesnt catch the eye at all. I almost skipped the video but I saw "AI" in the title so i got interested. I'm a subscriber from pretty much the start and i didnt even realize that this was your video

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  14 днів тому

      Thanks for the feedback! Wanted to try something different from my usual thumbnails but that was a bad idea apparently

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  14 днів тому

      I've swapped it with my normal style 🙂

    • @theos5187
      @theos5187 14 днів тому

      @@ViciousLegacyGameAUS and its way better! Now it actually looks like a video about a game, people familiar with you will notice it cuz they know your style and it just doesnt look like a cheap tech video.
      Great change!

  • @roxthunder
    @roxthunder 14 днів тому +1

    yo can i have a jod in your game 😭😭😭😭😭😭

  • @milkyywayyyy259
    @milkyywayyyy259 14 днів тому +6

    Not trying to be negative but this whole game has the vibe of an overly ambitious type of game that a lot of beginner gamedevs make when they're learning new skills and rarely ever finish. You'll most likely quit this game within a year, say it was just a learning project and work on a smaller game instead. Maybe I'm wrong though, just my opinion.

    • @ViciousLegacyGameAUS
      @ViciousLegacyGameAUS  14 днів тому +4

      Fair about the scope, but I'm happy just chipping away. Have been for the last few years anyway