Game Development Week 6 – Blog #4

This week I have continued to refine the work that has been done on the AI agents from the last two weeks and implemented the Squad Manager and Swarm AI agents into the main map of our game. I had to implement the Squad manager in a way that it would be able to find both Tomas and Aleksandra’s AI agents and access them so that they could be designated leaders for the Swarm AI’s.

There have been some issues where I made oversights on the implementation but have since corrected these and they have allowed me to reduce further mistakes as I continued to work on the Squad manager and AI’s. We had some navigation issues with the AI’s at first but this was due to some geometry problems that have now been rectified and the AI’s can traverse the terrain correctly and follow their leaders.

Swarm AI with their Leader

Swarm AI have been assigned their Ranged Leader and have moved into proximity of them.

One of the technical issues that occurred was that when a leader agent had been killed I needed to remove them from the squad manager and update the children if that was their leader so that they could be reassigned. I believe with Blueprint this proved more difficult because I feel I had to jump through a lot more hoops to get this working, luckily we are beginning to move the AI into C++ code so that its easier to manage and update whilst also providing a consistent behaviour across our networked client. This is a low priority task but I believe and our team believes that it is well worth the time taken to finish porting the code.

The first part of the C++ porting was to create a new Class that would inherit from Unreal Engine 4’s AIController and this class would act as our baseAIController that implements all of the default behaviours for the various AI’s we have. We can then create individual classes for MeleeAIController, RangedAIController and SwarmAIController which all inherit from the baseController class that implements the basic needs such as OnSee and OnHear functionality.

The VERY basic BaseAIController.

The VERY basic BaseAIController.

I have implemented an Enum for the various states the AI’s can have and this will replace the states feature on the Blueprint blackboard that we currently use, I feel this will make things a lot simpler because we can simply update our Enum on a per controller basis and each individual AI will know what its current state is.

That’s all for this week and next week we should hopefully see the structure of the C++ AI coming together.

Advertisements

About The Rob Watling

Hi there, I’m Rob Watling, I’m 22 years of age and currently studying Computer Games Programming at Derby University.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: