When we were setting out to build Breach, we knew that one of the keys to success was to have a deep toolbox of systems that would allow our team to express the wide range of abilities we were brainstorming. Even in those early discussions and prototypes, the diverse array of abilities and character classes we were envisioning demanded that we build flexible, data-driven ways to create abilities.
Flame on! The Inferno Ultimate ability.What emerged was a suite of interlocking systems that allow the designers and artists at QC Games to compose abilities, from a simple melee attack, to a class defining ultimate ability. Inferno, an ultimate ability for a forthcoming and yet to be announced class, sees the player channel a fountain of fire and igniting any hapless enemy that might find itself on the receiving end. It’s an impressive Ultimate ability and for all its majesty, Inferno shares the same fundamental building blocks of all abilities in Breach, starting with an Ability Data Asset.
Unreal Engine provides an easy way to define templates for data, called Data Assets, that designers can create instances of and work within the Unreal Editor. The Ability Data Asset is the nexus for information related to all abilities in Breach: what name it has in the UI; how it is described to players in tooltips; what icons are associated with it in the HUD; how AI can use the ability; and more.
A Gameline For All SeasonsAbility data is the place that defines the "what" of an ability in Breach, but it also points to "how" it’s used as well. Returning to our description of Inferno, we see the word "channel" that hints at one of the core systems in Breach for authoring abilities: the Gameline. The Gameline is a timeline of game events for everything from playing animations, to changing how materials on characters look, to doing damage or spawning effects.
As a key part of how abilities in Breach function, we knew we needed to invest time early in the project to make a custom editor that would allow designers to easily author them. Luckily, Unreal provides an easy way to create custom editors for multiple sets of data like Breach's Gameline. Utilizing Unreal's Slate UI framework, we built an editor inspired by video and audio production software where different colored bars represent the times and durations of different types of tasks that the Gameline can perform. With a drag and drop interface, designers can easily re-time the execution of effects and add new ones, previewing their changes in the same editor view. If you’ve used iMovie or any video editing software, you’d be right at home designing a new type of ability in Breach.
Beyond the editor, our Gamelines have some important tricks up their digital sleeves that enable the fast-paced, multiplayer combat in Breach. When an ability is cast in a multiplayer match, the associated Gameline is synchronized between the game server and client. This includes allowing the game client to predict that an ability is valid to execute, along with starting to play its Gameline, before the server has had a chance to validate whether the ability should play. In the rare cases that the server disagrees, the client corrects its state to match the server's authoritative view of the world. Most of the time, however, players have an immediately responsive experience while designers can author abilities without having to worry about networking considerations. Using Gamelines has enabled Breach’s multiplayer to be an amazingly seamless and largely lag-free experience for most players.
Asking the Right QuestionsInferno is one of many abilities in Breach that can be used in the air as well as while standing on the ground. However, while Inferno is largely the same in both scenarios, there are differences in presentation - animations need to account for the player starting on the ground versus falling - and functionality - the character should hang in mid-air while channeling. We could build something specific for mid-air versus grounded abilities, but we knew that other abilities might require knowing about a character's health value, or whether a "buff" (what we internally call a Modifier) was active or not.
The system for asking these sorts of questions in Breach is called the Condition system and combined with a way of targeting characters (e.g. am I on the ground or, are you?) - allows for adding "if this, do that" type logic throughout Breach. Conditions and the targeting system they use are generic and can be easily composed into arbitrary combinations to suit whatever logic designers are looking for. For Inferno, the Condition system's integration with our Gameline allows for playing one set of tasks if the condition proves true and another set if it doesn't.
Feel the BurnWith Gameline tools we have a foundation to sequence parts of the ability execution, and with Conditions we have a way to play the right animations and effects. But what about the Inferno part of the Inferno ability? For that, we developed another tool in Breach's combat system: AOE (short for area of effect) actors. Area of effect abilities are common in action RPGs and the same is true in Breach. Our AOE actors (anything that can be placed in a level is some type of actor in Unreal parlance) support a number of useful features for implementing these sorts of abilities: a number of shapes (primitive ones like boxes as well as custom ones from imported meshes) that define the region for the AOE; Conditions that designers can choose that determine which characters can be effected by the AOE; options that define how, if and how fast an AOE can "tick" to apply an effect; and ways to transform the AOE shape over time.
For Inferno, we use an AOE with a custom shape that attaches to your character and moves with the player's aim. Designers have Conditions that make sure Inferno only affects susceptible enemies. Those effects - damage and a burn debuff that can amplify future class abilities - are made possible by another core piece of Breach's gameplay framework: Game Effects. While the Gamelines model actions that happen over time, Game Effects are for instantaneous changes. Like Conditions, Game Effects use the same generic actor targeting system and can easily be plugged into any system or feature that needs to make a finite change. Inferno uses a list of Game Effects (itself a Game Effect) that run a C++ script to calculate damage and a separate effect to apply the burn debuff.
While a lot of what Breach’s systems designers interact with is the data for our gameplay systems, we suspected that some areas would demand more control and flexibility than what we could effectively model in data.
For damage calculation, our designers took up the challenge of working in native code, and over time they have utilized a system we call Delegates to add functionality to otherwise simple values. Delegates are callouts to native code that our designers author and that give them the ability to replace a simple integer or floating point values throughout our gameplay systems with small functions. Delegates have been crucial for preserving flexibility within the structure of our framework without having to enshrine an ever-increasing number of special cases in the core system code. They factor into everything from how long an ability like Inferno lasts, to how fast projectiles move, to how much damage a burn debuff ultimately does.
Buffs and debuffs in Breach are called Modifiers, a system built on top of many of the aforementioned tools like Gamelines with additional features like the notion of stacking instances of itself. As with all of the systems in Breach, Modifiers were designed with multiplayer in mind and seamlessly support networking replication and prediction. As the Inferno AOE sweeps over enemy characters, it applies instances of the burn Modifier that other abilities of this class can consume to apply additional damage.