SakeTami
comfortjones
comfortjones

patreon


The Combat Loop of Inhuman

In my last article I promised to do an overview of our heavy soldier AI. However as I wrote it up, I realized I was basically doing a piece on the combat experience I’m trying to achieve with Inhuman as a whole. So in this article I’m gonna cover both how the standard enemies of the game enforce a certain playstyle and then how the new enemy variants lean into this.

Inhuman’s combat pace is meant to be driven by the AI

When creating Inhuman, a big goal from the start was forcing the player to respect the AI. A core difference between Half-Life 1 and 2 for me was how I felt about their main soldier enemies and how I played around them. To this day people often mention the HECU as a highlight of AI in games. People rarely give the same credit to the soldiers in Half-Life 2, and I believe what it really comes down to is a matter of how combat is paced.

Soldiers in HL1 are decently accurate and quick to attack, but they leave gaps when they’re not attacking and give the player another window to attack when they run to cover as they cannot shoot while moving. Players are incentivized to either spend resources or rely on cover to keep themselves safe, attacking between their bursts or moving in closer to deal with them quickly. This style of combat creates a specific pace to gunfights, a “cat and mouse” dynamic as you weave in and out of cover to attack while keeping yourself safe.

Soldiers in Half-Life 2 on the other hand basically seem to never offer these same windows to attack. They’re capable of shooting on the move and constantly facing their target which makes reading into their behavior borderline impossible. This in turn leads to players kinda “brute forcing” fights by rushing down soldiers and holding down the mouse button. Half-Life 2 sadly seems happy to accommodate this with a steady stream of supplies dynamically spawned before and after fights to keep the player topped off. Seeking to escape from the core problems with this combat loop has been my primary challenge while working on Inhuman.

Creating a good cat and mouse gameplay loop

So a couple core changes have been made to Inhuman’s soldiers. They can’t run and shoot, they face their movement goal most of the time, and they use different animations depending on their goal. These choices went a long way, but until recently there were still plenty of holes in their behavior. Soldiers had all the core components to be fun enemies again, but their decisions were letting them down.

Figuring out the correct thing for an NPC to do in any given situation can be a tricky task. For over a year, Inhuman’s soldiers have tended to prefer attacking near cover, retreating to it if they’ve been hurt and have attacked recently. The idea here was to have them hold their ground and shoot for a second then duck away, but there were subtle problems here. Players would shoot at them then duck behind cover as expected, however by the time they peaked their heads back out, soldiers were often back out of cover and watching the player’s position. To the player this basically read as them hanging out in the same spot, coming off static and a bit dull.

Funny enough, replaying Half-Life 1 with god mode on to watch the AI’s behavior made the difference clear to me. HL1’s grunts actually hold their positions basically indefinitely while you’re visible, sitting in place and shooting. They seem to only really take cover in response to damage if they lack a target to shoot. What this basically means is they hold their ground when they’re in sight, but once you duck away, they often opt to run away. This has a higher chance of being noticed by the player, as they usually pop out to shoot at the enemy again, only to find them running away to safety. This was an easy behavior to replicate, but it took quite a while to really figure out why it worked so effectively.

Adjusting damage and health has been a more contentious issue for the game. Players often respond poorly to high health enemies, but it is ultimately a factor in getting a certain amount of push and pull in firefights. Recently I’m experimenting with using more armored soldiers who can take a good amount of gunfire to put down. Longer time to kill increases the chances of the player having a back and forth fight, so I’m hoping any frustration felt from this is outweighed by the more unique combat loop.

Reimagining Half Life Alyx’s Heavies for Inhuman

The Combine heavy soldiers (Suppressor and Charger) are both variants of the base soldier NPC with a few core differences. Namely:

These differences basically allow these enemy types to enforce the game’s intended combat loop. While standard soldiers can sometimes be killed before they have a chance to react, the heavies are near guaranteed to be able to start shooting back. These attacks have more pronounced wind up than the standard burst of gunfire from an smg and hit much harder. In 1 on 1 fights this is pretty easy to play around and so far playtesters have very quickly picked up on their moments to attack safely, so the next big hurdle for the project is getting these new enemy types mixed in with squads as often as possible.

To go along with this article you can check out this video of a recent arena I’ve been working on showing off what this type of combat can really look like.

Link here: https://www.patreon.com/posts/charger-combat-85395977



More Creators