© 2023 by Name of Site. Proudly created with Wix.com

Operation Phantasm Devblog # 6

February 14, 2017

Hello,

 

A lot happened this week and I thought it would make a good blog post. So here we are. We have finalized our first draft GDD and finally have a unified vision of the game. This was accomplished through some long meetings, and sometimes heated debates, and has resulted in some great ideas for the game. Another thing that happened is that we finally stopped kicking the can down the road and have decide to completely re implement our AI. That is what this blog post will focus on.

 

The reasoning behind this is that the AI have had up to this point was largely just an automated version of our player controller. It was great for testing the initial tech of the player characters. Since we really only needed to make sure that abilities, combat orders, attacking, taking damage, dying, etc. worked. However, it resulted in a very bland and non flexible AI system. This became a problem when we needed to start making fun engagements. We could not create a variety of enemy types that would test our players ability to master the toolkit we were giving them. Thus the decision to refactor was made. Before refactoring began, we decided to sit down and decide what kind of enemies we wanted. Smart, right? We focused on creating enemies that tested our player's ability to master the tools available to them. These are the enemy types we hope to introduce with our new AI system.

Core Enemies
  1. Basic Melee

    1. Fast movement

    2. Low hp

    3. Weak melee hits

    4. High rate of fire

    5. Attacks as a part of a mixed group or a small squad of the same type.

    6. Challenge: This unit forces the player to think about their positioning.

 

  1. Basic Ranged

    1. Medium movement

    2. Low hp

    3. Weak ranged hits

    4. Low rate of fire

    5. Attacks as a part of a mixed group or small squad of the same type.

    6. Challenge: This unit forces the player to use cover.

 

  1. Suicide Melee

    1. Medium movement

    2. Low hp

    3. Explodes after a short time when in range of a character

    4. High damage in a small area of effect

    5. Attacks as a part of a mixed group or small squad of the same type.

    6. Challenge: This unit forces the player to prioritize between targets.


 

Special Enemies
  1. Special Melee

    1. Medium movement

    2. High hp

    3. Strong melee hits

    4. Low rate of fire

    5. Ability 1: Small sized area of effect smash attack in melee range.

    6. Ability 2: Spreads fear to characters in a medium sized area of effect.

    7. Attacks solo, as a very small squad of the same type, or as a part of a mixed group.

    8. Challenge: This unit forces the player to continuously reposition their characters, use crowd control abilities, and focus on the fear related mechanics more.

 

  1. Special Ranged

    1. Low movement

    2. Low hp

    3. Average ranged hits.

    4. Medium rate of fire

    5. Ability 1: Casts medium sized area of effect attacks on clusters of characters for medium damage.

    6. Ability 2: Buffs nearby enemy units.

    7. Ability 3: When this unit detects characters, it will alert other enemy units in a large area.

    8. Attacks as a part of a mixed group.

    9. Challenge: This unit forces the player to try and avoid detection until their characters are in a good position. This unit also forces the player to prioritize the unit with high damage abilities and continuously reposition to avoid its area of effect attack.

 

  1. Special Ranged Spawner

    1. Low movement

    2. High hp

    3. Weak ranged hits

    4. Low rate of fire

    5. Ability 1: Periodically spawns a small group of Basic Melee units.

    6. Ability 2: Puts a speed debuff on each character this unit hits with a ranged attack.

    7. Challenge: This unit forces the player to use area of effect crowd control and damage abilities, as well as single-target abilities with high damage. This unit also forces the player to push forward through waves of enemies to get to one high value target.

 

Boss Enemy
  1. Level 3

    1. TBD

So far I have all of the basic functionality working that is essential to our core enemy types. That is, everything in this flow chart. Except spell casting and some extra retargeting and repositioning behavior for the special ranged unit that is not on that flow chart. Do you think a low hp ranged spell caster would want to stay in one place during a fight? Me neither. Below are some examples of the new AI in action against some target dummies.

1. Travels between set way points. Optionally can look at a specified transform for a set duration before moving to the next way point.

 

 

 

2. Has a variable targeting time, after which the enemy will move to attack range. Once in attack range the enemy will deal damage at regular intervals. (basic attacking with a rate of fire)

 

 

 

 

3. Once in combat the enemy will make sure to keep track of all the participants. Once a target is finished off, the enemy will automatically find a new target in the combat zone. 

 

 

 

The "combat zone" in this context is just a trigger that keeps track of all the enemies and players in a radius around the parent enemy. Eventually enemies that move into each other's combat zone triggers will share target data. This will allow units that are not near a player but still engaged in the same area be a part of the fight. If that was bit hard to follow, here is a helpful diagram.

 

 

 

4. When forming the combat participant list, and subsequently updating it, the system will respect line of sight. So if the enemy takes down a player character and there are some other player characters hiding behind a wall nearby the enemy will not know about those other player characters. 

 

 

 

 

5. For those out there that like to stealth, or can't handle the heat of these AI, don't worry I got you. The AI will chase you but only for a set time. After that time they will go back to their non combat behavior.

 

 

 

 

6. The system is quite modular and all the values are adjustable. What is implemented so far covers all of the basic functionality for all of our enemy types. It is flexible enough to make each enemy really feel like it has a different size, feel, and mentality. Here we see a wild refactored AI murder hoboing through some target dummies from range. Very scary!

 

 

 

 

 

A lot is done but there is still a lot to do with the new AI. The next steps are to refactor the way we handle instanced data on enemies. Currently the enemies also have player controllers, as I said before the enemies currently are automated players. In that player controller is instanced data pulled from scriptable objects that are dropped in on a prefab by prefab basis. So enemies will need their own data handler class. Which means that the combat utility script I made for managing all player -> player,  player -> enemy, and enemy -> player data interactions will need some tweaking. In addition to this, each special enemy still needs its spells created. With that comes some additional behavior that needs to be added to the enemy AI's state machine. Here are some behavior questions I will have to answer, and have implementations for, between this coming week and the end of the month.

 

How does the enemy decide who to target with the spell?

 

How often does the enemy cast the spell? 

 

Does it cast the spell at the same target every time?

 

If it is an AOE spell does the enemy send it at one target's positions? or the average of all the intended target's positions?

 

How will the special ranged unit re position during a fight? How often will it do so? 

 

Does the special melee enemy pick targets just like the basic melee enemy? 

 

That concludes this dev blog. Hope some of that information was interesting, helpful, and/or informative. 

Share on Facebook
Share on Twitter
Please reload

Featured Posts

Operation Phantom Devblog #8

February 27, 2017

1/3
Please reload

Recent Posts
Please reload

Archive
Please reload

Search By Tags
Please reload