Eye of Zegu was a game where I was able to express my AI programming abilities to their fullest by working on Zegu, the giant eyeball, himself.
I was involved in the design and the implementation of the AI.
Zegu is the product of a state machine with some shape-casting and environment controls to make the level truly feel like you are trying to sneak through the domain of a powerful eldritch god.
You can find Eye of Zegu at https://mpdv.itch.io/eye-of-zegu
Zegu's AI at it's core is a state machine with a searching state, scrubbing state, and spotted state.
In the searching state, Zegu randomly scours the arena with a big spotlight. When Zegu's spotlight hits the player, it shoots a raycast to the player's head to see if they are hiding behind a wall.
If the player is not hiding within the spotlight, Zegu moves to the scrubbing state where he frantically moves around with a smaller spotlight in a small radius near where the initial collision occurred. After not finding the player for a few seconds, Zegu returns to the searching state, and if the player is found again, Zegu moves to the spotted state.
In the spotted state, Zegu's spotlight will follow the player until the player hides behind a wall. If the player remains in the spotted state for too long, they will lose the game. If the player successfully hides, then Zegu returns to the scrubbing state.
Within his domain, Zegu has control over certain walls. Zegu can only have a certain amount of walls raised at a time, and the walls come in pairs. When the player is spotted, Zegu will raise the wall in each pair that is closer to where he found the player.
Copyright © 2024 Neo Kattan - All Rights Reserved.
Powered by GoDaddy
We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.