Hello everyone again! This time our post will be a little bit technical. Do not worry though we will not bore you out with too much details. Our post is about our approach to setting up agents in the game.
What are agents?
Agents are basically any character in the game. In our game we have Abdu, the main character and all others NPC’s (Non playable characters).
In order to have a neat and efficient system we set up our classes as such:
For an agent to function an agent brain needs to be plugged into an agent. Think of an agent as a ship and the brain as its captain. A ship cannot function without its captain. Every ship has common properties such as its speed, destination, armor etc. This way all common properties between our two types of captains (NPC controller and Abdu Controller) are coded only once. NPC controller contains all common functions between all enemies. This contains functions such as moving to a point, checking for obstacles, taking cover etc. Another class extends from NPC controller contains the enemy logic. Since every enemy has a different behavior every enemy will have their own logic. On the other hand since we only have one Abdu in the game, all his logic is coded there.
That’s about it for today! Hope you guys enjoyed the post. Stay tuned for more.