Half-Life: Alyx

Half-Life: Alyx

Not enough ratings
CQB with the CMB
By ihonnyboy
A Half-Life: Alyx Level Design Guide
(This is a recreation of a google doc I created with the same name)
   
Award
Favorite
Favorited
Unfavorite
Introduction
Close Quarters Combat (CQB) is one of the most intense combat situations out there. It’s a deadly cocktail of unexpected angles, quick decisions, and claustrophobic encounters. It’s also one of the most engaging environments for VR (Virtual Reality) gameplay. And can be extremely challenging to design for.

In reality, CQB requires people to be constantly aware and on their toes. Not everyone is cut out for this type of intensity. However, Half-Life: Alyx (HLA) is a fun cinematic action game meant to be accessible for a variety of people. It distils combat to create the “feel” of being in these situations, and as such, much of their game design allows for more leeway, or margin of error, then reality would allow.

CQB level design is still a fine line, though. Numerous custom maps have walked the edge from dull to unbearably unfair. Especially when it comes to using HLA’s primary antagonists: The Combine. This guide is meant to fix that. It will first discuss more general concepts, such as how Players and AI interact with CQB, then it will dive into the more juicy level design considerations.
The Player
Lock and Load
Tools of Destruction
Half-Life: Alyx, like it’s ancestors, is a game about guns. Each gun is a tool meant for a specific job, and as you upgrade them, their versatility and functionality changes. The main reason I mention this is because of this beauty of a boom stick:
The bane of difficulty and the joy of players. The pistol may be the foundation, but the shotgun is a cornerstone of HLA combat. Due to how bullet-spongey some of HLA’s enemies can be, it provides the quick and satisfying kills for enjoyable gameplay, yet still requires some skill to get close enough to use it. Furthermore, it lowers the ability floor. Not all players have the quick trigger fingers (or even system requirements) to quickly melt an enemy with the pistol, but everyone can use a shotgun.

Thankfully, it often has low ammunition, which allows the rest of the arsenal to shine, and gives the player more to think about. More guns means more problems. Inventory management is an important part of HLA. If you don’t have the gun you need ready, it can cost you vital seconds. Upgrades can further complicate this. Giving the player only the pistol may make the enemies live longer, but it may not make the player think more.

Violence of Action
In many militaries there is this concept of combat momentum. The main idea behind it is that using speed and surprise, you can keep your enemy off-balance enough to keep advancing. If you’re aggressive, you’re more likely to keep aggressing. If you’re defensive, you’re more likely to stay defensive. This is partly what some US Army CQB doctrine is based on.
These ideas still ring true in Half-Life: Alyx—especially when fighting Combine. It’s a complex web of magazine size, enemy reaction times, and damage values that create this back-and-forth. Understanding some of these military doctrines and tactics may not be useful when designing, but could give you insight into what sort of considerations that might be going through someone’s mind.
{Youtube: Pro's guide to CQB}

Why is this important for level design? There have been several playtests where two players—given the exact scenario—had wildly different experiences. One steamrolled the encounters, and the other died in a corner surrounded. It all comes back to this momentum idea. One player took the initiative at the start of the fight, and the other hunkered down.

A big reason for this is that the defensive player did not have confidence in the environment. The space was not very readable, and much of it was unknown. This can be good for a slower paced fight, but it did not work for the high-action it was designed to be. All encounters with Combine in HLA are designed to be very readable and quickly understandable.
There are multiple ways to change this combat momentum, and knowledge is just one of them. As a level designer, understanding a player’s expectations and tactics is crucial.
The Combine
“Exposing Hostile in Three”
The Mind of the Machine
The Combine AI is pretty simple when you know the basics, but that is beyond the scope of this guide. It has already been covered in some youtube guides:
{Youtube: Half-Life: Alyx Modding Tutorial | Combine Soldier}

They have various options to control their behavior, but this guide will mostly cover their default behavior. Some information can be gleaned from a console command known as “npc_combat [npc name],” but this might not be useful if you aren’t familiar with the Source Engine’s AI.
As a level designer it is important to understand three aspects: Cover Volumes, Advance Range, and Squad Tactics.

1. Cover Volumes
These make up the basics of the Combine’s decision making. They use these volumes to decide where to hide and where to attack from. Placement of these is really important, and in a CQB environment, you’ll likely place a lot of them to ensure they can attack from many places. This is key, because when moving Combine can typically not shoot!
This makes them very vulnerable, but it does allow them to advance quickly without being unfair. Effective use of these will be covered in the Level Design portion.

2. Advance Range
Advance Range is the other important aspect of their AI. It essentially controls how close to their target they’re allowed to search for line of sight (LOS). This doesn’t mean they’ll try to actually get that close. This is very important for CQB, and will be explained more later. By default it has a value of 250 inches.

3. Squad Tactics
On their own, a lone Combine Soldier will be quite timid, preferring to hang back and overwatch (watch your last seen position). In a squad they get more coordinated and more aggressive. Some will hang back while others advance, they’ll recon areas, and most importantly: they will attempt to split up and spread out. This is notable because where an enemy starts a battle often influences how they move in the battle. Be warned: large squads can cause congestion and coordination issues. They typically range from a size of 2-4 soldiers.

The Spice of Life
The Combine in HLA aren’t as uniform as previous titles. They have a variety of equipment and classes. Fights using the whole gamut of Combine abilities are way more challenging and engaging. Two types in particular are the bread and butter of CQB combat: Chargers and Manhacks (and officers, by extension).

Combine Chargers
All the issues Combine Grunts and Officers have in CQB, the Combine Charger lacks. They move and shoot. They move slowly and carefully. They’ll preemptively blind fire to lock down angles. Their armor requires careful aim. Their shields prevent direct assaults. They are practically built for intense CQB combat. Don’t over use them, though. They tend to be easy to evade, and are best to be used in tandem with other troops.

Manhacks
Manhacks are the unsung heroes of the Combine military. They are hard targets to hit, great at flushing enemies out, and provide excellent recon. The latter point is very important. In CQB the maze-like corridors and narrow sightlines make it very easy for Combine to lose track of enemies. Manhack’s maneuverability makes them ideal for allowing squads to keep a beed on the player. Officers even have special code that makes them deploy a manhack when they lose track of an enemy. In large numbers, they can get annoying, but a single Officer occasionally deploying a Manhack is enough to keep any combat moving.
The Level Design
Flank and Spank
Hostile Territory
This is where things get juicy. From here on out the discussion will get more technical and talk about situations that you might encounter when making CQB combat, and how to address or combat them. But before we dive into that, it’s important to discuss one key fact: the Combine work best in medium range combat in open environments. Like a paintball arena.
Wide sightlines, free movement, and thin cover is what they were made for. This is why they have a tendency to overwatch and like to keep their distance. Scaled-down versions of these types of environments can be found all over the place in indoor spaces.
All the tips and situations discussed below essentially try to make tight and claustrophobic spaces have aspects of these more open spaces. They also focus around Combine Soldier’s default behaviours and ai. Creative use of the “defensive tactics” option or heavy scripting can mitigate some of these issues.
Keep in mind, the situations covered below have very “corridor/room” type set ups. This is done for simplification. Engaging and varied level design uses a variety of vertical and horizontal space with multiple sightlines and flanking opportunities. Furthermore, many interior spaces in reality blend the line between distinct “rooms.”
Due to the more technical graphics and discussion, the following legend will be used:

Choke Points
Due to the tight nature of these environments, the biggest concern is often congestion. Appropriately sized VR hallways tend to be around 96 inches wide, which is just enough room for two NPCs to walk next to each other. The doors are even more narrow than this. The AI in HLA are not very aware of each other, so in these situations, they will often run into each other and clump up around doorways, making them easy targets.
There are many ways to combat this, but the simplest one is to simply add more entryways and add more movement opportunities. This is a good idea anyway, since it would give the enemies good opportunities to flank and surprise players.

Low enemy density can help with this too. Less people, means less likelihood of them running into each other. If you want to keep the fight going longer, simply consider spawning in new waves or enemies to replenish an engagement.
Keep in mind, the Combine try to get LOS (line of sight). This means a variety of positions can be used for cover volumes. Not just doors or crates, but windows, balconies, or blown out walls. More shoot positions means less likely the Combine will clump up. And wider doors or hallways wouldn’t hurt.

This is probably a good time to mention that it is just as important to give the enemies opportunities, as it is to give players opportunities. If you have three enemies and three doorways, the player has nowhere to run to. Three doorways and two enemies? Now the player has options, and the enemies can move around more. A spread out enemy force is more interesting than a wall of bodies. To give players interesting decisions, you must give them interesting things to decide between. Too much can be as harmful as too little.
Advance range is important here too. Due to the tight nature of these environments, the Combine can often take paths that run them right past a player. This can be undesirable for many reasons, the core of which is the fact they won’t be able to defend themselves while doing so. Simply lowering their advance range allows them to attack sooner from closer cover volumes.

Time to Engage
Due to the Combine’s preference for first hand information, and their preference to not move and shoot, it is important to keep the time between engagements minimal. The more difficult it is for a soldier to get line of sight to an enemy, the longer they will be out of the fight.
One way to do this is through clever placement of cover volumes. For example, here I place cover volumes in a “pieing” formation.

“Pieing” is a tactic for clearing a corner that involves slowly moving around a corner, dividing it into “pie slices”, with the corner being the center of the pie. With this set up, instead of running straight up to the player, the Combine will likely take up positions that narrow the player’s cover.

This also helps the soldier’s squad ai by allowing them to spread out and “flank” to the side of the hallway.
The squad ai combined with advance range can sometimes cause Combine to take very long and meandering paths. In this example, the best available cover volume is behind the player. In larger environments, this is fine, but in these tight corridors it takes the soldier dangerously close to the player. Simply opening up a sightline gives the soldier a much easier (and closer) cover volume to get to.

Keep in mind, cover volumes do not necessarily have to be on cover. It makes the Combine harder to hit (and makes them look smarter) but they can be put around a small trash can, vertical pipe, or even out in the open. Sometimes this is needed simply to allow them to move more aggressively.
Opening up sightlines is generally a good rule of thumb when designing for Combine. Due to the way they “commit” to movements, and their aggressive nature, they can become quite vulnerable in environments with narrow lines of sight. Opening things up will slow down their advance, and let them shoot sooner.

Sometimes, though, you may find yourself in a no-win situation. If soldiers have to run long distances, there are often disastrous results. They will often choose a place to shoot from that is no longer good by the time they get there. Best case, they lose track of a player. Worst case, they get uncomfortably close and take a shotgun blast to the face.

Moving spawn locations and adjusting when a Combine “knows” of an enemy can help with this. The ai scripting entity, “aiscripted_schedule,” is well suited for this task. With this, a Combine (or a whole squad) can be told to go somewhere, then stop moving when combat starts.
{Youtube: Combine Attack Behavior Demonstration}

In the most dire of circumstances, it is often best to delay when the default Combine ai takes over. For example, the level designers of HLA’s campaign often use “Scripted Sequences” to force soldiers to move well into a space before letting the default ai take over. “aiscripted_schedule” can be used this way too. Or even more advanced techniques from Half-Life 2 can be used. Such as ones that use scripting entities such as “ai_goal_assault” or “ai_goal_standoff”. (NOTE: many of these older ai scripting tools have limited functionality, as Half-Life 2 and Half-Life: Alyx NPCs share a lot of archetricture, but not a lot of behaviors.)
Useful Links
{Youtube: Half-Life Alyx Tutorial: Combine and Cover}
A rambly tutorial video I made going over use of combine and cover volumes. Some useful tips and tricks are covered (but not explained well).

{Youtube: HL2 and You: The Combine Soldier}
An older video I made on Half-Life 2’s ai. Useful to understand how the “squad slot” system works. This system is another reason to keep enemy numbers low.

{Google Docs: List of ALL Half-Life: Alyx Custom Maps}[docs.google.com]
A list of Half-Life Alyx maps made by Skummeh. He makes videos for all maps on the HLA Workshop, and is extremely skilled at the game. Has some deep insights into the game as a player, and has rated all levels he plays. Useful for understanding the “landscape” of Half-Life: Alyx levels.

{Tower Agency: Revamp, A Half-Life: Alyx Addon}
A Half-Life: Alyx addon I helped FrostEpex make. The work we did on this combat focused experience resulted in the creation of this document. Lots of lessons learned.
A note on Combat Variety
Combine Soldiers are the most intense and challenging enemy type in the game, but fighting them non-stop is not only exhausting, but also gets boring! Keeping combat interesting means not only changing who you fight but how you fight. The main combat “loop” for combine is pretty straightforward: aim for head, don’t get shot, shoot until dead. This is a gross oversimplification, but it proves a point: combat gets boring unless you mix it up.

One way of doing this is by giving players more choices. By adding more variables, you create more variety. Do I use the shotgun or the pistol? Giving players one gun simplifies their combat choices. There’s a reason Combine combat in the main campaign doesn’t fully “unlock” until you acquire all three weapons. Even something as simple as giving the pistol two fire modes can add an extra layer of strategy to combat. But don’t limit yourself by considering guns as a player’s only tools. Weak points, grenades, physics objects, and explosives provide players with alternate targets or new strategies to combat.

Alternatively, requiring change can also vary combat. This is typically best represented by “set pieces”: moments outside of your typical gameplay patterns. A good example of this is giving players an over-powered ability that functions differently, or (contrary to what was said above) removing some (or all) weapons can force players to rethink how they handle a situation. However, Half-Life: Alyx also does this in its upgrade system. As your weapons get upgraded, you have to learn how these new functions work, and incorporate them into your battle rhythm. This is how the game evolves its gunplay as you progress. It fights habituation by having your arsenal constantly shift.

Designing for your enemies is only considering half the battle. Ensuring enemies can make interesting choices is just as important as making sure the player can respond in interesting ways.
A note on Heavy Units
Half-Life: Alyx is a unique game that skirts the line of “action-survival”. Each gunfight is filled with a growing sense of tension and terror, and part of why that is has to do with the game’s ammo economy. Your resources are limited and precious, which means enemies such as Charger and Suppressors stretch those resources thin. They are part of what makes HLA’s combat so tense, and causes the game to dip into those survival aspects. They are often an omni-present threat on the battlefield, with either type giving different flavors to an encounter.

Their high health requires the player to really focus on them to take them down, while their high damage makes players need to be constantly aware of their position. They are also more stationary than the other unit types. This means they are often the first to engage. Many late game encounters open with a heavy unit to force players to cover. A missed shot or being in a bad position could mean death or a fatal wound. Yet, their firing patterns and behaviors are very predictable, allowing players the opportunity to out think and out play their opponents.

How you place and spawn these enemies can heavily influence the tone and feel of a fight. Even removing them entirely can radically change how the combat of a level feels. You want a more action packed tone? Use more enemies with less health. A more survival/tense atmosphere? Use less enemies that are harder to take down.

The Heavy Combine units have pretty straightforward and basic AI, but that’s what makes them effective. They’re easily understood, which contrasts with their much craftier cousins.
A note on Defensive Tactics
Sometimes you want the Combine to act less aggressively by holding their ground or hiding. This is where the “defensive tactics” option comes in. This changes their ai behavior to revolve around “sentry positions.” These are points in the level that the designer denotes with either path_corners or info_targets. Instead of advancing, soldiers will use these locations to wait for enemies.

This is very useful for CQB, since it allows soldiers to take a more cautious approach. It disables their ability to flank and allows them to attack as soon as they spot an enemy. Putting sentry positions in aggressive locations can make this system useful for faster paced combat, as well.

There are two downsides to this: soldiers can’t share sentry position groups, and they will flush out enemies less often. If they share sentry position group names, there’s a risk of them picking the same position and clumping up. They also don’t flank when in this mode, so they’ll spread out less. Also, due to this mode’s emphasis on defensive action, soldiers will not use their flushing abilities as much. This means they’ll be less inclined to throw grenades or deploy manhacks.
The nice thing about this is it is dynamic: inputs can toggle this behavior and change sentry positions. It also helps solve problems the Combine encounter in less traditional fighting spaces.
A note on Combine AI Metrics
When designing for Half-Life: Alyx it’s sometimes useful to know the distances and ranges the NPCs like to work with. I’ve listed some useful numbers below. Everything is listed in Hammer Units (inches).

Panic Distance:

Default
200
Grenade Drop
200
This is the distance at which all Combine types (normally Officer and Grunts) will “panic”. When panicked they will start firing full-auto until the mag is empty. This is typically accompanied by suitable lines such as “Back down! Back down!”. Normally there is a slight delay before this happens, giving players the opportunity to try and trigger a stagger or for players to retreat. For Combine Grunts, if they have a grenade and are being repeatedly shot at this distance (and not staggered) they will drop a grenade at their feet and attempt to run.This is difficult to trigger, but is a nice reason to equip soldiers with grenades. Keep in mind, if the ammo balancing system removes a grenade from a Combine, this can cause them to do “ghost grenade throws”, which can leave them vulnerable.

Advance Range:

Default
250
Suppressor
300
Detailed above. Advance range helps the AI decide where to attack from. Consider it their “minimum prefered attack distance.” Can be changed via inputs or in the NPC properties.

Aiming Time Distance:

Quicker Aim Time Distance
400
When initially engaging, Combine have a slight delay to “aim”. This time changes depending on distance, and at this distance they use the quicker aim time. This delay can’t always be relied on to win fights, however, because they will shoot near where they last saw you to try and catch you off guard. Additionally, their body language can be read to better understand what state they are in.

While not directly related to CQB, it’s worth noting that at medium to long range, Combine Officers react slower then Combine Grunts. This is because they often hand signal before they start shooting (even when alone).Their AR2 is more accurate and does more damage then the Grunt’s SMG, so this is for the sake of balance. However, Grunts typically do not have this limitation. This makes Combine Grunts ideal for quickly laying down suppressive fire when starting an encounter.

Weapon Range:

Shotgun (Charger)
500
SMG (Grunt)
700
AR2 (Officer)
900
MMG (Suppressor)
1000
Similar to advance range, consider this their “maximum preferred attack distance.” They can still engage beyond this range (Suppressor and Chargers are good examples), but their accuracy suffers severe penalties, and they have a harder time keeping track of targets (with some exceptions). Chargers also change how they advance if they are in their weapon range. All Combine tend to stay between this and their advance range. This distance can be changed via inputs.