Hidden from sight, hidden from code


Dev: Jacob Zhu

This week has been a frantic search to try to get a good grasp of an annoying bug: AI actors seemingly acting blind when spawned into the world. 

From our tests of the game, we realized at a certain update in our project, the AI no longer registers the player effectively until a given amount of time. 

This problematic bug took a hug deal of trial and error to find the root cause. All of the debugging has so far lead to only proving that the AI's sight perpection was working, only that it was working incorrectly.

We tried various ways to narrow down the potential causes, such as toggling the player character's mesh visibility, the delegate binding for the AI sight's perception update, none seemed to point to the root cause.

It was only when I decided to remove the pools one by one that we managed to, at first see that the remaking of the pools would reactivate the AI sight. However, we soon realized the problem comes back if more pools are made.

The fix we implemented was to ignore all other AI actors from the AI's sight. This prevents the huge amounts of actors in the pool from being stored in the AI's memory.

Get Lustrat Somnia

Leave a comment

Log in with itch.io to leave a comment.