top of page
Search
Writer's pictureVinny

Saturday Session (IX)

Big progress this weekend. Not only did I finally knock out an annoying bug where enemies would sometimes not play their proper animations when chasing a targeted player, but I extended the enemy AI logic to become smarter and make better decisions based on context provided by the environment query system.


Elder Guardians keep watch over ancient and timeless secrets and relics across Anduraen

The Environment Query System (EQS) is a feature within the Artificial Intelligence system in Unreal Engine 5 (Unreal Engine) that is used to collect data from the environment. Within EQS, you can ask questions about the data collected through a variety of different Tests which produces an Item that best fits the type of question asked. 


An EQS Query can be called from a Behavior Tree and used to make decisions on how to proceed based on the results of your Tests. EQS Queries are primarily made up of Generators (which are used to produce the locations or Actors that will be tested and weighted) and Contexts (which are used as a frame of reference for any Tests or Generators). EQS Queries can be used to instruct AI characters to find the best possible location that will provide a line of sight to a player to attack, the nearest health or ammo pickup, or where the closest cover point (among other possibilities). 


Once you have a general understanding of how Behavior Trees work in Unreal Engine and want to have your AI query the environment, you may want to start with the Environment Query System Quick Start guide which will walk you through an end-to-end example of having the AI find the best possible position to attack from a range against the player. Also refer to the Essentials section for an overview of EQS, a User Guide to working with EQS, and a node reference page that breaks down the available nodes and properties within EQS.


Using the environment query system to make enemy AI decisions

Here's a list of the tasks I accomplished this weekend:


  • Implemented code in the execution calculation for damage to reduce incoming damage by checking resistances to physical or elemental damage types

  • Performed testing on listen server and dedicated server to fix a few crashes

  • Looping sound components on projectile spells now properly check if they are null before attempting to stop playing the sound

  • Adjusted the projectile to be a homing projectile and not zero out its pitch on spawn

  • Setup AI controller using a Blackboard component and a behavior tree component

  • Added logic for enemies to chase players

  • Corrected a bug where enemies would float towards players instead of playing the appropriate walk or run animation based on their ground speed

  • Added code to prevent enemies from picking up items meant only for players

  • Added code to allow enemies to be effected by area of effect environment objects (e.g. fire hazards and other environmental conditions)

  • Extended the logic in the enemy behavior tree to allow for ranged attackers to consider options before moving towards their target normally like a melee attacker

  • Added code to detect enemies being within range of their target

  • Added code to detect enemies being within close range of their target

  • Added a random aggro delay between detection of the player and enemies taking an action

  • Implemented an attack behavior tree task to handle the attack logic

  • Enemies will now attempt to find a new location around a target they are attacking if they get stuck

  • Implemented code to use the environment query system to find and test against locations in the game world to decide whether or not to perform certain AI logic

  • Implemented line of sight logic into the enemy AI to allow them to select the best location to move to before deciding to perform their next action


This week I am excited to focus more on the enemy melee combat system and getting the core battle mechanics ironed out. Will also be searching for another annoying bug that will follow me throughout development until I am strong enough to vanquish it. That feeling I got when I finally figured out that lingering animation issue in the enemy AI was amazing. It's that kind of stuff that prevented several of my previous game attempts from progressing because I would get frustrated and simply give up. Pushing through challenges and, more importantly, moving on from something and coming back to it later when you have more skill and a fresher perspective has become an important lesson that I learn over and over. This constantly reinforces the idea that failure is in fact the steps to success.


Cheers,

Vinny



9 views

Recent Posts

See All

60 FPS

Comentários


bottom of page