Causality
|
Hi I’m the producer and lead AI programmer on team Yggdrasil that is currently developing the game Causality.
Using behaviour trees is fantastic and all but after consulting our teacher we came to the conclusion that maybe it is a bit too much overkill and maybe too much for our project. We do not need to use such complicated systems for a boss in all honesty. I mostly wanted to use it for the learning process and doing something I never done before. But risking failing deadlines and not having a complete boss AI in time I came to the conclusion of scrapping the behaviour tree system and using state machines instead. This is because when broken down a boss fight is just a collection of different states executed on certain conditions for example: Player too far away – move boss towards player. Player in range – choose an attack. Player trying to use an attack – dodge the attack.
And with this in mind I re programmed our boss to use states instead. So now we have a main script controlling every sub script and keeping track of all boss conditions for the state machine, a sensing system if you will. This keeps track of player’s position, actions and boss health every frame saves this data into a separate script that is passed as a reference to all the states so that I don’t need to re-create a bunch of variables holding the same data and wasting memory. By doing this we had in a matter of a few days a boss that could walk, track and attack our player. Mind you it was rather ridden with bugs and needed iteration but it worked. Somewhat at least. |