This game was my submission to the AI and Games Jam 2021. This game has about 10 different type of NPCs with different behavior and actions based on the events happening around in the environment. On top of all that there is a friend NPC which has an action related to almost all of the event in the game. This was a great learning opportunity for me to understand the various types of AI used in games for different purposes like Behavior trees for a boss fight, State Machine for stealth games etc. This game was positively received for its idea, fun but for me the biggest pro was creating a system which can be extended to a bigger scale content if needed. In future I hope to take this game and instead of a 5 min vertical, make it a full scale 8 hour game. So keep an eye out for the next update and more news about the development plans.
Goal Oriented Action Planning is done by creating goals for the NPC. These goals can be achieved by the actions which require a pre conditions and have a cost associated with them. Goals can be to have fun or to live and actions can be the things that make them happen liking flirting, getting drunk adds fun ( not that I condone). Pre- conditions are extra condition that we can add in the environment which limits the action of NPC and make it based on what events are fired in the scene. Like before the action “getting drunk” can occur there is a precondition that bartender serves the drink( that can have its own pre-condition that player has the money). This is quite useful as I can create situations and conditions as linear system and put everything together which would create a combinat effect and every gameplay would be quite different from each other making this game re-playable.
The biggest challenge with GOAP is that once an action is approved by being the least costly and maximum goal priority, it is not possible to stop until the action is finished. So in my case, when my friend’s getting drunk action has started, he will complete it no matter what, even if other higher priority goal comes into picture. This is quite useful in SIMS type games and is achieved by A* algorithm. In the future I plan to modify the algorithm so that the action can be changed at any time depending on goal priority. There are so many different ways of achieving the desired AI affect in gameplay programming that it is quite cumbersome and a big commitment to select which way to go. In the future I plan to make some videos about pros and cons on various types of AI programming like GOAP, Behavior Trees, State machines and hardcoding ( yes, if else is also a way to make AI).