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.
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.
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.
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.