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.
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.
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!
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 :)
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!
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.
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!
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.
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 🏃♂
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!
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 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
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!
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.
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 ?
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!
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.
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 :)
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 🤗🤗🥺🥺
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 :)
@@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.
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.
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.
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.
That is such a beautiful, elegant idea. LOVE it. I value problem solving skills very highly.
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!
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 :)
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!
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.
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!
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.
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 🏃♂
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!
This is an amazing code breakdown. I would love to see more tutorials like this.
The results you are getting are Amazing 😮👏🏻
And I also like a lot the Visuals of the game 🖼🎨 🎮💯
Cool idea - thank you very much for sharring :)
Awesome game, awesome video, and awesome lesson, so well explained!. Thank you Imphenzia
That's a super cool idea! Thanks for sharing!
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.
Thanks, I figured it would already be a known/used method, thanks for letting me know the name :)
@@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
Your game is cool looking can't wait to play it... You need to get this on WII and other consoles it will explode
Keeping it real, love your content.
That looks amazing!
very useful! thanks!
Amazing.
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!
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
I really liked this solution but this is not going to work for well for maps that include dynamic platforms right..?
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.
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 ?
Nice 👍 👏
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!
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.
@@Imphenzia will be a tutorial video for creating platform in the game? it looks fantastic. the platform itself is really charming.
Man this is cool. How did you even come up with this idea?
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 :)
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 🤗🤗🥺🥺
Hey how are you going in Brissie? Fam settled in ok? Come down to Byron for a beer.
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 :)
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
5:40 code about Line of sight
I just finished adding an A* to my game. Had to homebrew it all because all the locations are procedurally generated, therefore no baking.
Nice work creating your own implementation!
@@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.
What is the game storyline? Almost looks like he is going through a downed warship looking for scrap.
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.
@@Imphenzia sounds awesome
What's the AI name
ChatGPT
Blodhundar har inte korta ben, det är Basset 😅
Second!🙂
First 😀