Categories
Blog Blog Post Uncategorized

Atavism Dev Log 13 – Group AI, Health, and Feedback

Update 13: April 4th – April 17th

Hey I’m back again. Last week I announced that I decided to switch to a bi-weekly update schedule so that I’d have more to talk about, which is already paying off because I have a ton to talk about this update! I’ll first be talking about the changes to the AI that I made, then talk a bit about the health system and some of the feedback I’ve implemented before I talk about what I’m aiming for on the next update.

AIPositioning

Plays Well With Others

Last week I spent a lot of my time reworking the AI. I wasn’t really satisfied with the basic, hastily planned version that I had previously, so I sat down and brainstormed a bit about what I wanted, thinking about all the games with melee combat that I enjoyed and how their AI acted. This brought me to both Dark Souls and Dishonored 2. I jumped into these games to study them, poking at the AI and taking notes on their behaviors, but I also read through the notes of a recent GDC talk on the Dishonored 2 AI system, which I heartily recommend. It’s kind of meaty, but I took a lot of inspiration from the “crews” section, which is a more professional, refined idea of the Consensus implementation I currently have, and that part is a fairly easy read.

My initial approach to group AI was to coordinate a more Arkham Asylum or Assassin’s Creed combat where the player’s opponents will try to surround them, but only a few will attack at a time on varying intervals conducted by the master AI. This works pretty well for third-person games where you can see everyone around your character and want a cinematic looking battle, but I found that in first-person, having an opponent attack from behind you is less fun, and that group-managed timers can feel a little unnatural.

My new approach is more similar to Dishonored 2, where I found that of the number of guards currently engaged in Melee combat with you, only a certain number (dependent on difficulty) will engage with the player, running up and choosing an action repeatedly while the rest stand back and taunt. I’m a fan of this solution because it keeps the player engaged in a certain number of clearly-hostile aggressive enemies, and if they get attacked from behind, it’s their own fault for moving too close to a guard on the fringes that they didn’t pay attention to.

Implementing this involved refactoring a lot of my code, which left me without much to show last week – the biggest factor in switching to biweekly updates. Upon completion, however, I find the new system came out well, giving a sense of spatial depth to the engagement that wasn’t there before. It doesn’t come out incredibly well on the flat plane, but an interesting environment and some tweaks to the edge-AI should make for a much more lively and interesting combat flow.

Here be a video of this new combat:
https://i.imgur.com/yeUVf6a.mp4

39b7qat

Gesundheit

Right now the health is on a 300-point scale with 4 thresholds throughout; when the player is knocked beneath a threshold, they slowly regenerate up health to almost the next one. Given that the demo won’t take place over a very long time-scale, this probably won’t come up, but it’s properly implemented. There’s also a health bar, which is obligatory for alpha demos.

For the full release, I’d like to get rid of the health bar, then add more meaningful visual and gameplay effects below each threshold so that the player knows the severity of their injuries. Stuff like blood dripping, slight pulsing, a limping effect for the camera as they get more injured, then eventually full-blown inability to clamber, run, or jump, with the nearness to death covering the screen in scaling vignette. Healing will vary from one part of the game to another, so we’ll cross that bridge when we get to it. For now, in the isolation stage, the player will heal from food, drink, and rest.

Odds and Ends

Besides the overarching AI and Health systems, I added a few more other small things as well:

  • AI has a toggle-able IK to keep their head or upper-body looking at the player.
  • The player can now block damage, with the knife blocking most incoming damage and the shield blocking all of it.
  • The AI now chooses an action from either a jump attack, slash, or strafe.
  • The player’s screen flashes red when taking damage.
  • There is a crude blood effect when dealing damage to an enemy.
  • The player is no longer jostled when an enemy pushes into them.

Next Update

In exactly one week from this post, I’ll be showing whatever the current state of the game is at the Gamedev Club, so I’ll prioritize a few more ease-of-use and fashionable features before then, such as controller support, important bug fixes (hit registration), and maybe a small level for it to take place in.

After that, I’ll keep working on the combat until “all” of the core features are in for these tribesman, which I’ll make a more proper demo for and release it on Itch. It won’t be terribly fancy, but I want to add enough to where it would be relatively feature-complete, with the exception of needing fixes in the future. This kind of stuff is parrying, enemy parrying, more animations, enemy stagger, player stagger, spear enemies, better blood effects, a morale system, and sound. That about covers it, but I might also try a more rigorous art test, which could take more time. I’m hoping most of this can be done by 4 weeks from now so I can work on the next enemy when summer begins, but we’ll basically see!

Until then, cheers.

By Steven Zwahl

I'm a Computer Science undergrad at Kansas State 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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s