Atlantean Ascent

“You’re a Fisherman trapped in an underwater metropolis. Harpoon through the fish monsters and get to the surface.”

You play as a Fisherman who has fallen into a pocket dimention while fishing in the bermuda triangle. Ships always dissapere when they are near or in the bermuda triangle and in this game you get to find out where those lost ships go.

You find yourself in a tower like strukture in a ruined Atlantis. The lost city never sank, it ended up here like so many other ships, planes and other human creations.

What I worked on

This game is still under development but I want to share the progress I can show and have done. None of the videos or images are current they show my starting point in the project.

Movement:

When working on the AI the first thing I did was adding movement. I thought that I should add the AI movement to the game first so that there could be level testing even if there was no damage to player.

While working on this project we were tasked to use Behavior Trees in the AIs structure. I had not worked with Behavior Trees previously to this project but it was something I knew a lot about. I decided for a faster start to make the main structure a StateMachine and then implement small trees in each state for things.

Above the video shows the first pass of the AI running towards the Player. I use navmesh to move the AI. This was and is currently being changed because the navmesh is not working properly so we are currently converting the AI to use navmesh sometimes but mainly using rays and physics. (read more on Ozzy Joelssons website)

Taking Damage:

After adding the movement I started on adding damage to the AI where the player can kill the enemies in the level. At first it was just that is the player shoots 2 times the enemy dies even if you miss, just for playtesting purposes.

After adding the movement I started on adding damage to the AI where the player can kill the enemies in the level. At first it was just that is the player shoots 2 times the enemy dies even if you miss, just for playtesting purposes.

I added so that the AI all have their own Physics Colliders that can be use with the Players projectiles. So when a projectile hits the enemy they take damage and play their animation. Each enemy dies from getting shot twice and then dissapere and sets their GameObject to inactive and removes the collisions.

Doing Damage:

After I added the possibility to kill the enemies I started to add the damage from the enemy hitting the player.
I started with a simple if in range do damage. This was to debug and get the timing of the damage right.

I then started adding more consistent damage. The final damage calculations is a view cone area infront of the AI where there is a 45 degree cove infront of the AI and if the player is in that cone and withing a certain distance you take damage.

I use rays that we have in the engine that consists of a origin and a direction to make the cone infront of the enemy. The distance is set as the enemys attack range.

Ranged Enemy:

After I got the Melee enemy to work well enought to be able to playtest I started on the Ranged enemy.
Since I needed to use a BT in my enemy I added my first small BT in the Attack state for the enemy. The BT decided weather or not the AI should throw or hit with other decisions aswell.

After I got the Melee enemy to work well enought to be able to playtest I started on the Ranged enemy.
Since I needed to use a BT in my enemy I added my first small BT in the Attack state for the enemy. The BT decided weather or not the AI should throw or hit with other decisions aswell.

The ranged enemy throws a trident at the player. I worked alot with getting the timing of the throw correct because the AI has the trident in the animation and right when the trident “leaves” the hand i spawn in a projectile in its place that has the same mesh. This was made with frame data from the animator the specific frame the trident dissapers I load a new one that does damage to the player.

Dodging:

I added dodging to the game where the AI has a random chanse to dodge some time while you are aiming and the AI is running to you. There is not much to say about the dodge because it is still under development but I have a short video to show where it is at in devlopment.

View Cones:

I added View Cones to the AI so that the player can sneak up on the AI if they want and can sneak around them.
The View Cone is made with Rays and crossing and dotting them with the players position and if inside the cone then attack or run to the player.

A picture of the AIs Debug Lines for the View Cone in Editor.

A picture of the AIs Debug Lines for the View Cone in Editor.

I added View Cones to the AI so that the player can sneak up on the AI if they want and can sneak around them.
The View Cone is made with Rays and crossing and dotting them with the players position and if inside the cone then attack or run to the player.

I decided to make the View Cone as just 2 Rays because the AI is on a navmesh and the player pos is also on the navmesh so this Ray solution worked well and was very easy to implement.
I originally wanted to make it a actual mathematical cone in eye level on the AI but I quickly found out that it would take longer time than I wanted it to to implement so I decided for this solution which was much faster and easier to implenent.

Features in Development:

Wandering:
The AI will wander around the space and patroll the area instead of being idle all the time.

Bone Parenting:
We want to parent the projectile to the bones of the enemy so that it throws from the position of the bones world position but this feature is not in the game yet and for now the projectile gets thrown from the middle of the AI.

What I am most proud of

A picture of the AIs Debug Lines for the View Cone in Editor.

I am most proud of the AI in general. AI programming was something I am pretty new to and it is something I find really fun to work with.
I especially like working with Behaviour Trees and mixing them with StateMachines.

I am really happy and proud of my progression in my capabilities in making and working with Behaviour Trees and StateMachines.

What I learned

I learned so much more about Behaviour Trees and just in general more about how to make good AI and how I can make my AI feel good and polished.