Posted by on May 10, 2012 in | 0 comments

Overview

Engine: Source SDK (Half Life 2, 2009)

Map Type: Single-player mission

Development Time:  ~80 hours

Quick Summary: A New Prospekt is a single-player mission for Half Life 2, set in the Half Life universe. The events of A New Prospekt occur during the original Half Life 2 campaign, before the fall of the Combine Citadel. Gordon Freeman’s assault on Nova Prospekt and the political prisoners he freed there have sparked a full-scale revolt in City 17. It is at this time that the resistance movement learns of another, smaller Combine prison within C17, and asks Freeman to do what he can for the prisoners inside. He does not act alone, however: two resistance fighters accompany him on the mission.

The primary gameplay focus of this map is squad control. Because the default squad control in Half Life 2 does not allow for complex or precise commands between squad mates, A New Prospekt provides players with scripted sequence targets so that they may order NPCs to lay a bomb, operate a turret, etc.

 

Design Goals

Learn and Expand: This is the first level I made with the Source SDK, so a major goal was to learn the engine, research its capabilities as quickly as possible and strive to expand its gameplay mechanics through scripting. It was a valuable exercise in efficiency, and helped bring focus to the aspects I should seek to research when learning any new toolset.

Tactical Gameplay: The original Half Life 2 campaign featured limited squad command capabilities, allowing players to either send all members squad to a location or to call them all back. I sought to expand this mechanic by creating two specialized NPC helpers – fighters from the underground resistance movement – who accompany players on this mission.  Each fighter has a specialty – one is an experienced gunner that players can order to operate turrets. The other is a demolitionist that players can order to place explosive charges on obstacles and mines on key chokepoints to defend against encroaching Combine soldiers.

While players may complete the level using the rebels’ abilities for only story-critical sequences, it is difficult. Successful players should seek to overcome the Combine’s strength in numbers by taking advantage of their squad whenever possible.

Serve and Protect: The main objective of this mission is to rescue prisoners of the Combine from a secret prison. Players often become accustomed to only keeping track of their own hitpoints, so I wanted to provide them with some other, important numbers to look at: the number of living prisoners remaining. I scripted a HUD component that allows players stay apprised of the situation, because too many prisoner deaths results in a mission failure. As prisoner casualties occur, the numbers change from green to red.

 

 

Maps and Brief Walkthrough

 

General Overview Map

The player begins the level on a concrete dock in the Canal District, at the blue star at the bottom of the map (1). A large, locked door directly ahead is impossible to open, but a command option appears when looking at the door, allowing players to order their demolitions expert to destroy it. The Combine engage the player’s squad in a firefight immediately upon entering the structure (2). Because the draw bridge is retracted at this point, the player must take a side route around the exterior of the building to proceed (3). At this point, the first scripted Combine assault begins (refer to yellow markers on assault path map below), with enemy NPCs emerging from doorways both ahead of and behind the player squad’s position. The most effective answer to this assault is to order the gunner specialist to operate one of the available turrets and for the player to use the other, covering both flanks.

The player next enters the prison area (4). Ordering the demolitions specialist to destroy the Combine generator causes the prison cell force fields to power down, releasing the prisoners completing one of the main mission objectives. The prison gate behind the player falls shut after the explosion,  so the prisoners proceed forward into the main room and wait for the player to engage the drawbridge (5). The drawbridge begins to slowly extend, but the Combine are now aware of the security breech. An alarm sounds, calling reinforcements, and the second scripted Combine assault begins at (6). Please refer to the red markers on the assault path map below. The player must ensure that at least three of the Resistance prisoners survive the ensuing firefight. Finally, the bridge extends and the player’s squad escorts the prisoners back to the exit (7).

 

NPC Assault Path Map

Assault 1: Assault 1 occurs when players reach the midway point of the exterior walkway. Combine soldiers emerge from doorways both ahead (the prison) and behind, where the player just came from. This is an opportunity for players to order their gunner squad-mate to operate one of the stationary turrets, while using the other one themselves. This way, they more than compensate for the Combine’s strength in numbers.

Assault 2: The second and final Assault begins a short time after players have activated the drawbridge. There are four possible routes that the Combine soldiers can take to reach the player and the prisoners he/she is protecting. Two are via rope rappel through openings in the roof on the second floor, then proceeding down catwalks towards the player’s position. The other two are via side downs on the ground floor. In order to avoid overwhelming the player, the Combine never spawn at more than 2 points at once.

 

Scripting

Creating a Context-Sensitive Squad System

The Concept: As mentioned above in the design goals, the player has two NPC squad mates, each with a specialty. One is an experienced gunner that players can order to operate turrets. The other is a demolitionist that players can order to place explosive charges on obstacles and mines on key chokepoints to defend against encroaching Combine soldiers. For the sake of simplicity, I wanted a context sensitive command system so the player need only press one key (‘B’) and the appropriate squad mate would perform whichever action the player was focused on. For purposes of clarity, I also include HUD text notifications and a green highlight over the command area the player is looking at.

Implementation: The main magic behind the system is a combination of trigger-looks (which call an event when the player is within a defined area and centers his/her crosshairs over an object) and logic relays. I mapped the ‘B’ key to my master logic relay, which attempts to call every possible action the player’s squad mates could perform.  However, to prevent this from happening and limit player commands to one at a time, each trigger-look has a corresponding gatekeeper logic relay that stays open while the player is looking at a command area and closes the moment they look away. The gatekeepers are also mutually exclusive – in case players are able to center two command areas within their field of view, whichever logic relay activates first will temporarily deactivate other trigger looks. Finally, when the player presses B, the appropriate commands fire and the squad mate performs its action.

Note: Due to the nature of I/O scripting in Source SDK working between many different components, I’m unable to visually demonstrate my logic flow as succinctly as with a Kismet screenshot. The sample image depicts a portion of the logic.

Limitations: One flaw with the system I was not able to fix is the way it issues commands to squad mates, particularly the gunner. There are no problems with ordering the demolitions expert to place mines or explosive charges because it uses uninterruptable scripted sequences. However, commanding the gunner to operate a turret works in a less direct manner. Rather than telling the gunner what to do, I actually send a signal to the turret itself to seek out an NPC to operate it, specifically my squad mate. While this method is successful roughly 80% of the time, the squad mate’s AI may choose to ignore the turrets request, especially if it is occupied with other actions. In order to directly command the gunner to operate a turret, I believe I would have needed to modify the game. Unfortunately, this was beyond the scope of the assignment.

 

Scripting: The Result in Action


 
 

Detailed Walkthrough

Part 1: The Beginning

Players begin the level outside of a secret Combine prison – a former water treatment plant in the Canal District – with two specialized resistance squad mates. One, a gunner, carries an SMG and can operate stationary turrets. The other, a demolitions expert, carries an RPG and can place explosive charges and mines in key areas upon command. In order to acclimate players to this new system of squad command, they must first order their demolitions expert to blow up the entrance to the prison.

 

Part 2: Entering the Prison, First Firefight

The Combine offer immediate resistance once the player’s squad breeches the entrance, but are not quite ready for the attack. An enemy NPC runs from the top platform opposite the entrance down to a turret on the ground floor, offering players plenty of time to snipe him before he gets there. A wide, water-filled ravine makes it clear that players cannot proceed forward and should search for alternate routes.

 

Part 3: The Exterior Walkway, First Scripted Combine Assault

Once on the exterior walkway, the Combine begins its first scripted assault on the player’s squad. After a brief audio warning, enemy NPCs stream out of doors ahead of and behind the player’s position. This is an excellent first opportunity to order the gunner squad mate to use one of the two mounted turrets in the area. The turrets are lit green when moused over and offer a context-sensitive HUD prompt as well (the HUD is disabled for this screenshot). If the player operates the other turret, the squad may effectively defend against both angles of the assault.

 

Part 4: Destroying the Combine Generator and Freeing the Prisoners

Once in the prison, the player encounters light Combine resistance. The generator is powering forcefields that both prevent the player from proceeding forward and the prisoners from escaping. When looking at the generator, the HUD offers the player a context-sensitive option to order the demolitions expert to destroy it.  Doing so powers down all force fields, and causing a gate to fall closed, blocking the way the player has just come from. The prisoners run forward into the main drawbridge room and wait on the ground floor. At this point, a HUD indicator of living prisoners remaining appears which changes from green to red as prisoners die. At least three must survive to the end of the level or the mission ends in failure.

 

Part 5: Lowering the Bridge

Progressing forward and back into the main canal room, the bridge control room calls attention to itself via light and the sound of radio communication. Once players press a big red button, the bridge begins to extend. However, this action also trips an alarm, calling the Combine. Ample health and energy refills are available on both top and bottom floors. Players have 15 seconds to prepare and position their squad before the first wave of Combine arrive.

 

Part 6: Holding the Line


Once the assault begins, the player must make the most of his two squad members to defend against waves of Combine soldiers over the course of one minute as the bridge slowly extends. Enemy NPCs enter the room on the opposite side of the canal through one of four entrances. There are two doorways on the left and right side of the ground floor, and two openings in the ceiling through which elite soldiers can repel. To avoid overwhelming the player, soldiers never spawn through more than two entrances at a time.

The player’s two squad members each serve as a hard counter to the two types of Combine assaults. The player may order the gunner between turrets to efficiently defend against the standard Combine entering via the ground floor. The demolitions expert, meanwhile, can place explosive mines on the catwalk stairways that the elite Combine. The strongest course of action the player can take is to keep mines placed on both sides at all times.

 

Part 7: Extraction

Once the bridge fully extends, all surviving prisoners run across it and towards the exit. Players should take care to protect the prisoners from any Combine stragglers. Once all prisoners have exited to the air boats and the player has followed them, the mission ends.

 

Full Sized Gallery