Week 5 - State Machines and Coroutines


Introduction

This week i partnered up with another student Keanu, to incorporate a state machine for my enemy AI, i left this to late due to other assignments taking priority so I didn’t manage to get a lot done with my time frame. 

I managed to (sort of) successfully abstract my patrol routines from the enemy AI class and link it back via the state machine, now i say "sort of" because somewhere it stopped working, i am pretty sure it’s not the state machine but something that may have been done wrong when i ripped the code out of the original class. 

i also worked with coroutines, I don’t know much about them but in week four in class Ben and i spoke about using coroutines to run either the movement or patrol behaviour, unfortunately my laptop crashed at some point between then and when i got home as all the work Ben and i had done in class was lost (yes i saved it but it wasn’t there when i checked). Currently in the present i am trying to tie Bens pathfinding script back into my enemy AI and make it all work again :P.

Goals

1. Abstract elements of enemy AI to separate elements and tie them back in via the state machine

2. incorporate our custom pathfinding script to the enemy AI

3. fix errors with wander AI

Resources

this week the unity scripting API came in handy for refreshing my memory on inheritance and coroutines

Issues and Risks

tons, I had no time this week to work on it and couldn’t get what i needed done in time.

I couldn’t remember how to implement Bens pathfinding script, or what we changed in class to make it work after it was setup.

I broke my patrol behaviour; this was happening after i abstracted it before tying it in with the state machine.

wander AI is still broken :(

Leave a comment

Log in with itch.io to leave a comment.