A journey into the unknown

As I had feared the AI is a whole lot of layers I couldn’t have simply figured out on my own. Thankfully on Unreal’s training video there was a useful comment that said their video was shite and gave a link to much better AI tutorial. The video series was from five years ago and some stuff are outdated but most of it still works so I have decided to go through it. It was very overwhelming and somewhere in-between I had to take a break. Don’t forget that there is no problem with feeling tired or stuck, sometimes the brain just really can’t absorb what you want it to. I did hit a point that everything was coming in too fast I needed to take a breather. Thankfully after some time I was able to return to the tutorial series and I’m halfway done already.

AI programming in Unreal involves creating a behavior tree linked to a controller linked to a blueprint linked to the character. Lots of layers definitely. Then I learned how to put a navmesh or navigational mesh, which can be seen in the pictures is the green all over the floor. This tells the AI where the walkable paths are, otherwise it wouldn’t have any logic of where to go. So far I was taught how to create AI that tries to track the player, if it doesn’t see the player it simply patrols, if it loses sight of the player it goes to its last known location.

The last thing I did was implementing health and damage, so this tutorial has been amazing so far since I also got a look into how to add more gameplay features. Currently the AI fires a line trace at the player when it gets close enough then it will print “Ouch” to the screen. That’s as much combat as I’ve gotten today. A lot of it is logic for a normal enemy, I’m sure that I’ll have to change a lot when I make it a boss. I’ll focus on finishing the series then I’ll figure out how to make my own paths in the AI’s behavior. It can be very tricky and I have to be careful that I don’t break any logic so the enemy doesn’t get stuck in a loop that I wouldn’t want it to be in. I encountered a lot of frustrating bugs when doing this work and I expect to hit a lot more. It’s tough but this is where I need to keep buggering on.

Leave a comment