Extremely SIMPLE but POWERFUL platformer 'bloodhound' enemy AI

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

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

  • @andrewsolesbury115
    @andrewsolesbury115 ปีที่แล้ว +21

    If you wanted to have the AI 'lose' the player you could simply limit the number of waypoints it can create after it's lost sight of the player and then when it reaches the end, just have it move left and right in a sentry style until the next time the player is in sight. It might also be nice if the AI could only 'see' the player if it is facing the correct direction. This would allow the player to out manoeuvre the AI and then attack it from behind. With a combination of the 2 and a short time for tracking the player you could create the illusion that they will follow you around a corner, but no further until the player is back in sight.

    • @TheKarishi
      @TheKarishi ปีที่แล้ว

      This was the first thing I thought of as well; that in a game like this I didn't like the idea - either for performance or gameplay reasons - of having drones that absolutely never give up the chase. But limiting waypoints and then dropping back into a holding pattern if the last waypoint was reached seems great.

  • @windwalkerrangerdm
    @windwalkerrangerdm ปีที่แล้ว +11

    That is such a beautiful, elegant idea. LOVE it. I value problem solving skills very highly.

  • @TrentSterling
    @TrentSterling ปีที่แล้ว +4

    Also called Breadcrumb pathfinding! You can also look ahead and set the agents goal to the "highest indexed waypoint it can see and omit some" and set up a linked list with indexed waypoints for a few optimizations.
    Whether each agent gets its own list of waypoints is another gameplay / optimization direction to explore.
    You can set up paths that don't recreate the player motion so exactly. Ive seen this method work in a number of configurations and I love to see it!

  • @sapientunderground
    @sapientunderground ปีที่แล้ว

    Very nifty, I can see myself making use of this in the near future, thankyou for sharing! Particularly, I expect it to be handy for procedural levels. Wishlisted Ultranova, looking forward to seeing what comes next!

  • @WaterShowsProd
    @WaterShowsProd ปีที่แล้ว +1

    Very interesting method. It's a lot more real-world than the enemy simply knowing the player's position and navigating toward it. Unless that's part of the story of the game, of course. For things like drones, penguins, and rampaging floor-cleaners, this method is perfect.

  • @skik210
    @skik210 ปีที่แล้ว

    This is an amazing code breakdown. I would love to see more tutorials like this.

  • @GuilhermeFArantesSouza
    @GuilhermeFArantesSouza ปีที่แล้ว +3

    IDEA: You could incorporate these waypoints into gameplay by making them visible to the user (maybe in a specific mode, a "electromagnetic-interference vision" kinda thing being left behind by Nova-s suit), and adding a life time to the waypoints so that they dissipate with time. This way the player can try to outrun a particularly difficult drone or group of drones, while activating the mode to see their trails to check if it's even possible to run away.

  • @alec_almartson
    @alec_almartson ปีที่แล้ว +2

    The results you are getting are Amazing 😮👏🏻
    And I also like a lot the Visuals of the game 🖼🎨 🎮💯

  • @oldshamen
    @oldshamen ปีที่แล้ว +2

    This works perfectly for simple AI and provides enough challenge to make it fun. I have used a similar approach in previous dungeon crawler games with success. Also opens up for interesting mechanics like a "decoy" type of grenade that you can throw to lead the drones away from your character's trail. Would be really easy to implement if you just provide your "scent" points with a priority variable. That would also allow for implementation of "smarter" or "dumber" AI .. so many possibilities!
    Ultranova instantly reminded me of an evolved Turrican II .. which was one of my favorite games on my Amiga 500. So, it is instantly wishlisted :)

    • @Imphenzia
      @Imphenzia  ปีที่แล้ว +3

      Awesome, thanks for the input and great idea with the decoy - I really like that idea. I already have a hologram clone that can be deployed as one example of what the drones should lock on to.
      You could not have made me more happy than a Turrican II reference - that game has been a huge influence on my life but oddly enough mainly from a music and graphics experience, because I didn't play it much - I just put the menu music on, and I had an Amiga 500 that being one of the big reasons, haha. But I love retro, I love low poly (it's like modern pixel art to me), I love music style, I love the setting and epoch of Turrican so that will be in the back of my mind through the development process :) Thanks for the Wishlist!

  • @alexleonardkrea
    @alexleonardkrea ปีที่แล้ว

    That's a super cool idea! Thanks for sharing!

  • @davidnoyb755
    @davidnoyb755 ปีที่แล้ว

    Awesome game, awesome video, and awesome lesson, so well explained!. Thank you Imphenzia

  • @jacobbradshaw995
    @jacobbradshaw995 ปีที่แล้ว +1

    Cool feature! Very clever!
    I have an improvement you could make.
    I noticed that the camera has some interpolation, which makes it smoother, but it also means that the player has less visibility in the direction he/she is running. Maybe you could make the camera interpolate to a location in front of the player or in the direction of his/her velocity instead.
    I love how this game is coming! I look forward to playing it when it releases!

  • @MrTomateSalat
    @MrTomateSalat ปีที่แล้ว

    Cool idea - thank you very much for sharring :)

  • @samhenry97
    @samhenry97 ปีที่แล้ว +1

    You'll probably want to change the data structure for waypoints from List to Queue. With a list, RemoveAt(0) is O(n), which could be quite slow if the waypoint list is long or lots of drones are tracking. Since we only care about the start/end of the list, a queue would be O(1) instead 🏃‍♂

  • @mikedolan03
    @mikedolan03 ปีที่แล้ว +1

    Ive seen this called Breadcrumb AI. Dilmer who does the XR youtube tutorial channel had a breadcrumb asset in the early days i used a few times. Great explaination.

    • @Imphenzia
      @Imphenzia  ปีที่แล้ว

      Thanks, I figured it would already be a known/used method, thanks for letting me know the name :)

    • @mikedolan03
      @mikedolan03 ปีที่แล้ว

      @@Imphenzia realized it was Mike Mood from the Bendy series that created the Breadcrumbs AI asset. all those early devs in the Unity 4 space bouncing around in my head

  • @midniteoilsoftware
    @midniteoilsoftware ปีที่แล้ว

    That looks amazing!

  • @eGregiousGames
    @eGregiousGames ปีที่แล้ว

    Keeping it real, love your content.

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

    Your game is cool looking can't wait to play it... You need to get this on WII and other consoles it will explode

  • @haim96
    @haim96 ปีที่แล้ว

    very useful! thanks!

  • @juleswombat5309
    @juleswombat5309 ปีที่แล้ว

    Awesome thought process. Thanks for all these insights.
    Your game level is really beautiful, complex and large. Did you model this explicitly in blender or unity ? (A lot of detailed work for a level) or is it procedurally generated ?
    Then I guess you used mesh colliders on the whole level. Maybe its not actually a 3D world, just a 2D world ?

  • @StigDesign
    @StigDesign ปีที่แล้ว

    Really Nice to see you back :D
    btw: how hard was it to learn blender from 3dsmax? am still stuck at 3dsmax, oldeer stabel version tho hehe :D

  • @letsplaybbracing9827
    @letsplaybbracing9827 ปีที่แล้ว +1

    Hi ! I'm going to see your game ! In your description! I see your videos and I think you are strong in you domain 🙂! And I learn with you video! Thank you for this! But it difficult to me to do like you! I asked myself: where you found inspiration?🤔😅! And you do this game with low poly modeling? Thank for your answer!

  • @DJOrangeJoe
    @DJOrangeJoe ปีที่แล้ว

    Amazing.

  • @andreagrumpeenlate5813
    @andreagrumpeenlate5813 ปีที่แล้ว

    Nice 👍 👏

  • @myk3l9675
    @myk3l9675 ปีที่แล้ว

    Man this is cool. How did you even come up with this idea?

    • @Imphenzia
      @Imphenzia  ปีที่แล้ว +2

      I don't know, it sort of just clicked. But I've found in the comments that the technique is called breadcrum AI and it's been used before. I'm not surprised at that since it's such a simple technique - but I am still happy that I just stumbled across it :)

  • @fv4202x
    @fv4202x ปีที่แล้ว

    I really liked this solution but this is not going to work for well for maps that include dynamic platforms right..?

    • @Imphenzia
      @Imphenzia  ปีที่แล้ว

      I can imagine that moving platforms will need to be compensated for. I think if the platforms are small, it would work without much of an issue. But if doors are closing etc, they could not find another path to you.

  • @DenisGricuk
    @DenisGricuk ปีที่แล้ว

    Thanks for this video! Can you make video with approaches explained making level like this. It's one big mesh or prefabs, or random generator maze e.t.c thanks!

    • @Imphenzia
      @Imphenzia  ปีที่แล้ว +1

      You're welcome. Yes, that is on my list! I am learning level design in parallel to making the game and I'm trying to get it right with progression, helping the player navigate, gradually upping difficulty and challenges. I will also show the prefabs and modules, how I modeled and assembled them in Unity. I decided to go for a manual assembly rather than generated to get better control over how it looks to tie it in with story and the progression.

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

      @@Imphenzia will be a tutorial video for creating platform in the game? it looks fantastic. the platform itself is really charming.

  • @markedforstrike
    @markedforstrike ปีที่แล้ว

    I feel that it should delete a node if new one has LoS to previous one, since on straight paths nodes between start and finish arent really used

  • @funguy398
    @funguy398 ปีที่แล้ว

    5:40 code about Line of sight

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

    hey can you help to create an enemy ai system like this but in 3d . I want it for my dinosaurs to when found or seeing the player they will follow the player and when loosed sights they will start patrolling all around the map Randomly [if possible can i add an animation in which when the dinosaurs will saw the player they will sream at player first before chasing ]. please help i am an newbie and i want to complete my game before my age hits 14 🤗🤗🥺🥺

  • @DylanODonnell
    @DylanODonnell ปีที่แล้ว

    Hey how are you going in Brissie? Fam settled in ok? Come down to Byron for a beer.

    • @Imphenzia
      @Imphenzia  ปีที่แล้ว

      Hey, yes, getting there slowly, mostly some headaches that remain from Sweden to deal with but once those are out of the way we can focus better. I should plan a road trip at some point :)

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

    I just finished adding an A* to my game. Had to homebrew it all because all the locations are procedurally generated, therefore no baking.

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

      Nice work creating your own implementation!

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

      @@Imphenzia thank you. My game is used dictionaries to store what type of terrain features or structural features exist at a coordinate. Instead of relying on colliders. Since everything is in a grid, it works out.

  • @scorpioncoreuniverse8981
    @scorpioncoreuniverse8981 ปีที่แล้ว

    What is the game storyline? Almost looks like he is going through a downed warship looking for scrap.

    • @Imphenzia
      @Imphenzia  ปีที่แล้ว +1

      Collecting scrap from destroyed enemies is likely part of it. I am working on the story in parallel with development so I will reveal more later - but it's a cyborg getting of a planet and there will likely be 8 land areas of the planet (this is the first wrecked ship area) and the two final areas/levels will be in orbit.

    • @scorpioncoreuniverse8981
      @scorpioncoreuniverse8981 ปีที่แล้ว

      @@Imphenzia sounds awesome

  • @MilesMiracle2.0
    @MilesMiracle2.0 ปีที่แล้ว

    What's the AI name

  • @tykobrising5339
    @tykobrising5339 ปีที่แล้ว

    Blodhundar har inte korta ben, det är Basset 😅

  • @letsplaybbracing9827
    @letsplaybbracing9827 ปีที่แล้ว

    Second!🙂

  • @Aye_Sid
    @Aye_Sid ปีที่แล้ว

    First 😀