Shotgun Spartacus is a single-player level built in the Unreal Development Kit. I decided to create an experience wherein the player is accompanied by an NPC companion. The presence of this heavily scripted character allowed me to overtly instill in the player a sense of direction and purpose, as well as adding variety to certain encounters. It also presented a challenge, in that I had to take care not to lead the player by the ear through the entire level. From the earliest stages of preproduction, I kept these considerations in mind, trying to balance the participation of the NPC companion throughout the major encounters.
The level is built upon the multiplayer-centric Unreal Tournament 3, so my initial goal of including a variety of combat encounters between the player and bots took some effort to accomplish. Before starting production on the level, I spent a few weeks developing a mod featuring a simple bot AI with an interface allowing a level designer to exercise fine control over actions like charging, taking cover, flanking, and retreating. These changes allowed me to quickly create and iterate on combat encounters, while other tweaks to movement, weapons, and interface ensured that the player would have a variety of tools at his disposal with which to survive and overcome each encounter.
Shotgun Spartacus was a solo project executed over the course of 12 weeks.
Not responsible for:
The guardhouse encounter takes place toward the beginning of the level, shortly after the dramatic attack that sets the events of the level in motion. Of the four major combat encounters in the level, it underwent the most radical changes. It began as a fairly straightforward scenario, pitting the player against a few bots who were defending a two-story guardhouse.
After I'd blocked out the encounter for the whitebox phase, several issues became apparent. First of all, the combat at the core of the encounter was weakly designed — the player could easily clear most of the enemies from his initial position, with minimal pressure put on him by advancing enemies. Additionally, the player's NPC companion took no part in the encounter.
After briefly considering a heavily scripted, All Ghillied Up-style event, I abandoned that idea in favor of a traditional, more deliberately designed, combat encounter. I decided to involve the NPC companion by having him climb to an inaccessible area and provide covering fire from above. This allowed him to play a more active role while belying the fact that he was scripted entirely in Kismet/Matinee rather than being an AI bot.
The redesigned encounter is shown above, in its inital blockout form. The two-story buildings introduce an element of height while providing effective cover for the bots, thereby encouraging the player to stay mobile and limiting the reach of the NPC companion's covering fire. Bots are organized into staggered waves, which are further delineated into squads of one to three bots. I created an attractive inital cover position in the middle of the space as well as an additional chokepoint at the only point of entry to the second floor. Therefore, I knew where the player was going to be at certain points, giving me the ability to put pressure on him in a very deliberate and tightly tuned way, while still allowing him to move about the space by a number of different paths.
The sequence above shows the Kismet scripting required to set up each wave of bots. Most of the bots' behavior is controlled in the UnrealScript implementation and defined in the properties for each bot and each squad. Through these properties, I was able to control the circumstances under which each squad should engage, specify high-level tactical roles for each bot, and provide bots with pre-defined flanking paths. A simple Kismet interface allowed me to change these behaviors as combat progressed.
The covering fire of the NPC companion is handled in a simple loop. As bots become active and then die, they are added to and removed from an array of active targets. At a given interval, the sequence above iterates through these targets, picks a sensible one based on line-of-sight checks, and then fires upon the target. The loop can also be stopped and started to allow scripted events to take place, wherein the NPC companion fires on a predefined target and remarks appropriately based on whether he or the player had killed the target.
These improvements resulted in a more refined experience that fit into the overall progression of the level much more naturally than the original encounter.
This project is discussed in greater detail in the blog that I maintained during its development. Below are some selected highlights: