University Comes to a close

cropped-marketing_20_03_20141.jpg

Hi all and welcome back,

After 4 years of hard work University is almost over, all I have left is to clean up and write the last sections of my dissertation then I’m no longer a student, I’m not sure how I feel about that haha! Game Development on Project Courage went incredibly well and we managed to produce a project that I believe our entire team is proud of. We had to demo it at an expo in Derby and people genuinely seemed to enjoy it.

SureFooting has been doing well and I have added a new page for that, it’s information is currently out of date but that will be rectified when I know what I can and can’t discuss. We took SureFooting to the Norwich Games Festival and it was a great for us, we had so many people playing the game, drawing skins and providing feedback that we come away from the Festival with so much planned for the future of SureFooting. This was also the first time we were able to demo the procedural content generation which has been my work as part of my dissertation and I must same I’m incredibly happy with how it’s turned out thus far.

Job hunting has started and I’m really looking forward to the opportunities that this brings however I do rather like it here in Derby and will try to stay around this area if possible as it’s grown on me after 4 years of living here meeting incredible people and getting to work on incredible things.

Just a quick blog this week lots to do in very little time but thanks for reading and come back soon!

Thanks,

Rob.

SureFooting Friends

Game Development Week 10– Blog #8 – Spider Queen!

This week has been a long week for development, I’ve cleaned up a lot of my work and committed it to our main build so that the other members of the team could see the progress I had made. First was the finished addition of the squad struct added to the Squad Manager and working on the retreat location for leaderless squad spiders.

ScareToRetreat

After some lengthy discussion with the team we decided that the wolf growling at the spiders to slow them down didn’t feel like a good mechanic because it made it almost impossible for the spiders to actually get close or hurt the child. We decided to replace this with a feature that causes the spiders to retreat to a location away from the Wolf.

RunAway

The larger feature I worked on this week was implementing the Spider Queens mechanics for the end boss fight. The Queen needed to move into a reared state when growled at by the Wolf and this would cause her to become vulnerable to the Child’s slingshot. I achieved this by adding a second hitbox that was only visible and used when the spider queen was in a reared state. When she takes damage she returns to her starting point where you have to repeat the previous actions two more times.

Tomas added an extra event to the fight as we felt it was too simplistic in its current form, the spider queen now spawns a ranged spider every 10 seconds until the queen is defeated. This added some more complexity to the fight and was a welcome addition.

Lasted was the wildlife that we wanted to add to the game to give the environment a more lively feel. I was originally going to implement them using the navmesh function that finds a random point within the navmesh and then it would path to it but Bradley and Tomas has discussed this and decided it would be easier to use Splines. Tomas created the basic spline which the given actor would follow.

I tweaked this so that we could delete wildlife once they had traversed their given spline. I did this using the following blueprint.

Capture

Game Development Week 9 – Blog #7 – AI as always!

This week following the milestone was assessing some of the problems we felt had cropped up including the Wolf being able to slow the spiders, I discussed this last week and talked about how I was going to replace it with function that would make the Spiders back off to a location based on the Wolf’s location. I have begun implementing this behaviour during this week and I am refining it to work correctly but the core functionality is ready. The difficulty for this comes with finding a position in the Navmesh that is in the opposite direction to the wolf.

Secondly Bradley felt that the Squad Manager could do with some optimisations so he put together a struct in C++ and asked me to implement it and optimise the code. I took on this task and I have struggled with trying to reduce the complexity of the code within the time frame we have available but I feel I’ve been able to make it a little simpler.

Squad Struct

Squad Struct by Bradley Stone.

This code allows us to reuse the same collections over and over to help cut down on creating different Array’s to store data at runtime. We can store a list of spiders, store the squad’s leader and we can also store a lot more within this one data structure allowing us to keep squad information in a single place.

finally this week I worked on allowing the small spiders to retreat to a chosen point at runtime when they’re no longer part of a squad, this allows us to add an interesting behaviour to the spiders to run away and it also allows us to clean them up when they’re out of view.

Overall due to the time the optimisations have taken I haven’t gotten a lot more done this week but I have been given my task list from now until the end of the project and will now be moving onto the Boss mechanics and wildlife AI behaviours.

Thanks for reading!

Game Development Week 8 – Blog #6 – The one with bug fixes!

This week leading up to the week 8 milestone was all about getting our features implemented and in a good condition, reducing as many bugs as possible so that the experience was as good as possible. I feel like we achieved this and with minimal issues with the game.

New features that I worked on this week were making the squad spiders retreat once they have lost their leader. I did this by getting the location of the Child and The Squads position and then finding a position in the opposite direction so that the spiders appeared to retreat. I coded this in C++ originally but during the time I had to complete this feature I was unable to get the Navmesh correctly so I instead for the purposes of the demo made the squads retreat to a specific location. This feature will be fixed this week alongside many other improvements.

Squad Spider

Next I worked on fixing the problem the squad spiders caused for the leaders, the squad spiders were blocking the movement of the leaders making them immobile. I fixed this by borrowing a little trick that Tomas and Aleks used for the patrolling of the Leaders. I took the leaders position and made the squad spiders pick a point around the leader to patrol to, this added the feel of them scuttling around. Now the leaders can move freely without much trouble from the squads.

Two more fixes for this week was when the Wolf character growls at AI’s it would slow them down but this has prooved to be a bad implementation and next week I will be replacing it with a retreat action when the AI’s are scared. The second fix was allowing the spiders to damage the child and actually inflict their damage as insanity, I did this by calling the blueprint implementable function which calls Bradley’s C++ sanity function.

Finally for this week I added code that allows us to reset the current map to the main menu so that we can always start a fresh game, I mapped this to the select button on an xbox controller.

Game Development Week 7 – Blog #5

Throughout this week I have worked on a range of tasks for the project, some of these include converting blueprint agents to C++, bug fixing and tweaks to the gameplay.

The largest task was the conversion of the AI and Squad Manager from its blueprint state to a C++ implementation, the C++ has made it a lot easier to add to the agents in the future and has stopped us from having to search through webs of blueprint that become unmanagable and hard to debug. Bradley and I worked on the C++ conversion together he figured out the logic and I wrote the code and offered what advice I could.

We started by creating C++ classes for the three types of agent and the three controllers that was unique to each type of agent. These classes all inherited from a baseSpider class which had the very basic implementations for what each spider would do. We also created leader classes that all also inherited from the baseSpider these contained the information required for confirming things like the squadID and if they’re a leader.

LeaderClassClassList

We then moved onto creating the Squad Manager which would find all of the Melee and Ranged spiders for the use of assigning them as leaders and then also finding all of the swarm agents to assign to the leaders. We introduced multiple squads in this implementation unlike the blueprint version so now there can be multiple leaders and multiple squad. Squads can merge if they have lost their leader allowing the smaller spiders to be reused. This peer programming experience helped me to understand fundimental aspects of the C++ coding for Unreal Engine 4 and has given me a great starting point to continue more of my work with C++.

Multi-Squads

The rest of the week I have worked on the Child and Spiders implementing their skeleton meshes, they’re yet to be textured or animated but they’re in and the child is ready to have her basic animations implemented by either Bradley or myself. I also worked on fixing bugs within the behaviour tree’s of the agents and refining they’re movement and attacking behaviours.

Finally I have fixed a few bugs including the Wolf’s howl correctly slowing down the agents nearby, slowing the agents down in general as they were incredibly quick and tweaking the Navmesh to support better movement throughout the gameworld.

The C++ agents still needs some work so that the squad spiders run away from the player if they have lost their leader and more tweaking of movement and patrolling.

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.

Game Development Week 5 – Blog #3

Game Development Week 5 – Blog #3

This week I have continued my work on the planning and implementation of the Squad based AI and the Squad Manager that will handle them. I have gone through a few different ideas in how I and the team wanted to work, I believe we have now settled with the Squad Manager assigning swarm agents to either the Larger Melee or Ranged spider or treating those as the swarm’s leader.

Originally the Squad AI would have had a specific type of Squad leader assigned to it but we feel that going with a dynamic approach of assigning squads based on range and what’s local to the swarm would provide better behaviour for the AI.

The current state of the Squad manager is that when the game starts it will search for all of the Melee and Ranged Leaders but also search for the swarm agents, these agents then have their references stored in arrays of their types within the Squad Manager as well as their controllers so that the Squad Manager can interface with them and send them the information they need such as the swarms allocated leader and what the swarm should be doing.

Blueprint Squad Manager

The figure above shows the process of finding and storing the Controllers and the Agents

Previously the Squad Manager and Agents would all hold references to one another but I felt this wasn’t a good way to implement the system and the Squad Manager should be the only one who needs to have references to anything below it this is also true for the leader agent not requiring a reference to the children as the children will be instructed by the Squad Manager which has the relevant information about the agents in play.

The next part of the implementation I have planned out and I have an idea on the approach I want to take for this. I plan to have the Squad Manager Send orders to the swarm agents about who their leader is and that they should be following and performing the same actions as their leader. If the leader dies the swarm will retreat to another larger spider in the vicinity and allocate that agent as the leader for the swarm. Hopefully this will provide some interesting behaviour as the agents retreat and act scared when they’re leader has been killed.

PreAlphaInGame

Thanks for reading and come back next week for Entry #4 in this series of development blogs.

Follow

Get every new post delivered to your Inbox.

Join 772 other followers