GAI: Episode 2 – lesson assignments / homework



week 1 – lesson assignment: Considering the fact that no value multipliers/factors, or in fact information was given on this, creating a flowchart for this navmap is nearly impossible, there is also a slight case of bad navmapping going on to the right of the text “low wall”

week 1 – homework: for this i chose to use the dark souls boss “quelaag”, which, for obvious reasons doesn’t have a good paper-prototype representation since i chose to use a game that’s more recent than 1990, and is capable of more complex interaction than “move” and “shoot”, i chose this because dark souls is one of the few games where AI is the main part of what makes the game interesting for me,

so, as an example, quelaag has roughly 8 “zones” in which the player can be, namely

  1. on her left side, attacking her sides
  2. on her right side, attacking her sides
  3. in front of her, attacking her (nearby)
  4. in front of her, at medium distance and close to the center
  5. in front of her, at medium distance, anywhere
  6. in front of her, far away
  7. behind her, nearby
  8. anywhere, really

apart from this there are a number of other factors that weigh in to which actions are chosen

most of the zones mentioned get disabled for a set amount of time after it has been used, there is also a random amount of time between actions where she sort of just stands there waiting, maybe turning to face the player, and sometimes hopping, strafing, or walking around

these zones also correlate to 1 or more specific actions(1 and 2 are a sideways stomp/fire blast attack, 3 is a lava barf nearby, as well as a flaming sword attack, 4 is a lava projectile and a flaming sword “poke” that has a similar range, 5 is a lava spray, 6 is a leap towards the player, 7 is a backward stomp and 8 is turning to face the player, walking closer to the player, or dodging)

and then there is one move that is triggered by being attacked a bunch, which is a highly damaging fire blast with a large AOE, this is triggered separate from the areas, in that it will never be used if quelaag is not being attacked

this, in conjunction with a set of animations for each attack that convey rather clearly which move is about to be used, if you know where to look


week 2 – assignment 1:

main issue with finite state machines is you can very easily make states too detailed or not detailed enough, and the main difficulty is finding this balance, this is really too detailed, but i couldn’t think of anything else to make the tank do, and i forgot to represent the fact that “lost the player” should go back to “chase” instead of to patrol, and chase should have a “not-seen” timer that goes off when the FSM should return to patrol

week 2 – assignment 2: the miner and his wife (the idea for this was basically copied from the book i read almost a year ago)



GAI: episode 1 – installing / getting started with behave


admittedly, i hadn’t been paying too much attention during class on how to use behave 2, so the initial phase was a little bit rough for me

i did get everything to work right pretty much instantly, but i had no clue how to connect the behave structural elements to an actual game object ingame

i learned later, however, that the new intern at my old internship had made a fairly concise and understandable tutorial from which i was able to figure this step out:

part 1 and part 2

my own structure is fairly different, as this screenshot shows:Image

at this point the only thing i don’t have working yet is the flashlight waypoint, so it always fails

this is because i don’t think you’re able to use raycasts to detect whether a specific light is illuminating a surface.

the pathfinding is also fairly “dumb” only navigating 1 space ahead, but that’s because i want them to wander rather aimlessly, making them a bit more unpredictable.

i may want to change the structure up at some point, because it’s currently running through the entire tree every frame, but i’m not entirely sure how best to structure the tree

i also want to add a pickpocketing mechanic that should alert the AI, while giving the player either a key or a lockpick. that mechanic still has to be added.

the enemies also see you up to 100 meters, while the player can only see the enemy like 5-6 meters away, in terms of balancing it may be better to tweak that

lastly i feel the enemies lose the player a little too soon in open spaces (if you run right past the enemy, they lose track of you instantly) so i may want to tweak it so they can pathfind to the player for 4-5 seconds after losing track of them