Xenopedia
Advertisement
Xenopedia

Cathode (styled as CATHODE) is an engine built by the Creative Assembly in partnership with AMD for the 2014 video game Alien: Isolation. It is a highly modified version of the engine created for an earlier title, Viking: Battle for Asgard. The trademark for Cathode's name was filed by SEGA on August 26th 2013, and eventually granted February 20th 2014.

The Cathode engine was named after its bespoke node-based scripting functionality which allowed for live edit flowgraphs to control game logic. This system ran inside of a toolkit created for Cathode named the Creative Assembly Game Editor (CAGE) in a what-you-see-is-what-you-get (WYSIWYG) style. It allowed for the use of prefabs to quickly build upon existing scripts. The Cathode scripting system covered a range of systems including particles, lighting, props, AI scripts, audio, zoning, and character setup.

When the Cathode scripting system was implemented into the engine during production on Alien: Isolation, a large portion of already completed work had to be scrapped or re-worked from old 3DS Max scripts, causing around 6 months worth of production scripts to be lost.

The initial greenlight demo for Alien: Isolation was built with an early version of Cathode when work began to convert it from the Viking engine which featured just one shadow casting light source among other technical constraints. While early public demo and press builds of the game included a splashscreen for Cathode, references to it were removed in the final shipped game. The engine name was later added to store descriptions after its trademark approval in the EU, although the CAGE toolkit was never publicly released, despite being referenced heavily in the game's EULA.

Cathode was built to ship to PS3, PS4, Xbox 360, Xbox One, and PC - however its primary title Alien: Isolation was later shipped to Nintendo Switch, MacOS, Linux, iOS and Android by Feral Interactive. Cathode provides platform-specific optimisations through two core systems: being "next-gen" flags in flowgraph scripting, and 32-bit and 64-bit binary builds. Flowgraph flags were typically used for optimising functionality like depth of field, whereas binary builds were used for enabling and disabling core functionality such as dynamic lights and environmental effects (such as animated monitors in Alien: Isolation). Notably Alien: Isolation's PC build utilises the 32-bit binary optimisations, yet the "next-gen" flowgraph optimisations. This was an oversight that was later corrected in the Windows Store build released in 2020 by Lab42.

Lighting[]

CATHODE_Realtime_Radiosity

CATHODE Realtime Radiosity

An example of the realtime radiosity being demonstrated in CAGE with CATHODE with the Sponza Atrium demo.

Cathode utilises deferred rendering, allowing for a large number of lights in an environment tied with high-poly geometry on separate render threads. This meant that the game was able to re-create the Alien look without being too taxing on the system it runs on. Typically deferred rendering engines have issues with alpha objects, however this was handled through a separate "alphalight" system in Cathode. Developers Thomas Stachowiak and Jose Bonet detailed the way that the engine handles its deferred rendering in a talk at the Develop 2012 conference during the development of Alien: Isolation.

As well as deferred rendering, Cathode calculates light bounces at runtime (a system known as "realtime radiosity"), allowing for dynamic light sources to produce realistic environmental effects. Light bounces are not only calculated from light entities, but any emissive surfaces. Probes are placed throughout levels and baked to a "radiosity instance map" coupled with a "radiosity runtime" binary - the offline bake was able to be run across multiple systems in order to reduce build times. This built information is then used at runtime to produce lightmaps which are applied to static and dynamic objects. A configuration file is found in the shipped files of Alien: Isolation allowing for customisation of the system's parameters.

Ai radiosity2

LEFT: The radiosity lightmaps, RIGHT: The world lit only with lightmap data.

The engine's lighting system caused disruption internally, as the feature was added mid-production causing extra work for the art department on maps that had already completed late stage art passes. It was noted that Creative Assembly hired some lighting technicians from the film industry rather than the games industry due to their lighting system being live edit, meaning that they could easily modify environment lighting without much technical knowledge.

Engine Development[]

Cathode HighRes1

A screenshot of the CATHODE script editor in action.

The Cathode engine is a highly modified version of an engine created by the Creative Assembly for a previous title, Viking: Battle for Asgard. A number of old dependencies from Viking can be found in Alien: Isolation - for example, in the console build, many unused Viking config files are left over including UI scripts, weapon scripts, and attack data. Early Alien: Isolation character configuration files also share a large number of attributes from Viking's characters where they have been ported to the Cathode XML/BML format. It was noted by developers that these character configuration files have survived from early EA sports games that the Creative Assembly have produced, and although it is not an ideal system, it works well which is why it has carried across. Other older dependencies can be found, such as the engine's level load function forcing a level type of "STD_LEVEL", which was previously read from a file in Viking.

Cathode performance suite hq

An example of realtime CATHODE performance metrics.

The updates to Viking: Battle for Asgard's engine were detailed in a talk by Clive Gratton, Alien: Isolation's lead programmer, where he explained how Viking's engine was reworked to become Cathode. Aside from the new features added to the engine such as the largely publicised deferred rendering, behind-the-scenes a number of new tools were created to use with the engine, the main tool being the Cathode scripting system for the Creative Assembly Game Editor (CAGE). This editor was similar to the blueprint tooling found within Unreal Engine, and allowed programmers to easily script elements of the game through a custom set of nodes.

CATHODE EDITOR

Another shot of the CATHODE script editor.

Clive spoke of issues faced in early development, particularly with developers creating elements of the game before the script editor was finished, which meant those elements then had to be remade when the editor was ready. This meant that around 6 months worth of work in production was wasted, and could have led to the events that caused the game's story to be rewritten around a year before release, causing a number of environments to be scrapped and/or reworked, such as the Solace, which was given an alternate art pass to become the Anesidora. It could also have potentially occurred at the same time that the game switched from third to first person, dropping the name Alien Year Zero.

AI Behaviours[]

Alien behave compressed

The Xenomorph behaviour tree.

AI behaviours in Cathode were controlled by a series of behaviour trees, the goal of which was to allow designers to tweak behaviours easily when they wished to add new characters or pull specific character reactions to certain triggers. This dream ultimately didn't come true however as the behaviour trees for Alien: Isolation were incredibly complex and only the AI programmers were able to easily understand them.

The behaviour trees for Cathode were created within Brainiac Designer, an open source tool that utilised a plugin known internally as "LegendPlugin" (Legend being a name carried over from an older cancelled project). A fan-made recreation of LegendPlugin is publicly available which allows access to view and modify all of the behaviour trees within Alien: Isolation. There are around 14 main behaviour trees within the game files, spanning across 86 separate files. These behaviour trees link to characters through their configuration files, which also define other parameters such as locomotion modulation, capsule height, and peeking distance.

As well as the engine's behaviour tree system which formed the local behaviours of the AI, there was also a primary "stage manager" implemented for Alien: Isolation's Xenomorph. The stage manager fed information between the behaviour tree controlled characters, and a script-controlled "director" AI. This director, similar to that of Left 4 Dead, would monitor the player and alien at all times. Metrics were kept (known as gauges) which would monitor the amount of time that the player had spent in an encounter with the enemy (the Xenomorph). This director AI would make sure that encounters remained tense through something known specifically as the "menace gauge". If the menace gauge filled to maximum, the AI director would force the Xenomorph to go "backstage" (into the vents). Scripted searches were also implemented to the game to force NPCs to search around the player when in hiding for a set radius.

Changes in NPC state (such as mood and hostility) are controlled via nodes in the Cathode scripting system.

Particles/VFX and Collision[]

Ai gbuffer

TOP LEFT: Albedo, TOP RIGHT: Normal mapping, LOWER LEFT: Shininess, LOWER RIGHT: Fully-lit scene!

Cathode features two separate systems for handling particles and VFX. The engine's particle system ran as a separate render pass, working in screen space to calculate 2D collisions with level geometry. This allowed particles to appear as if they reacted with the meshes in an environment without calculating full 3D high-poly collision. VFX was handled differently however, having access to a full high-poly collision map of the entire environment through Havok. VFX could then interact with the environment through this 3D collision map, allowing for electric bolts and other effects to bounce from wall to wall in a realistic way.

Collision for characters is also provided through Havok, however this operates on a lower poly collision mesh which is created over the higher poly baked collision and separated into a separate collision group. This allows character collision to be a cheaper calculation than handing every mesh in the environment. A character can only walk on a surface that is covered by the engine's navmesh, with the collision map being used to place their feet correctly.

Level Streaming[]

Cathode utilises asset streaming to allow for a low memory overhead when loading assets for a level. Each level in the engine is split into a series of zones, blocked by either distance-based visibility or a door. When reaching a door, the engine will pull in assets for the upcoming zone and push them to the renderer (shown in Alien: Isolation by a flashing door lock light).

Cathode Artist Profiler HQ

An example of the realtime artist profiler.

This was made possible by the engine's custom PAK/BIN format used for models and textures, in which all asset names and sizes are provided in a small manifest BIN file loaded at the start of the level, and all asset content provided in a separate PAK archive at offsets specified through the BIN. Assets were organised in each PAK to be close to each-other relating to their zone and position in the level for faster loading from disk, as well as by frequency in a level, in order to speed up reading on a physical HDD. For this reason, every level in Cathode requires a copy of its contained models and textures, bloating the final install size of any game.

As some streaming is done by view distance, therefore on older platforms (notably the Xbox 360) it is possible in certain sections of Alien: Isolation to physically out-run the engine's load function. This error was rarely spotted due to the threat of running.

Alongside requiring all models/textures per level, the engine also includes all scripts and shaders used by the level in each. Support for streaming scripts was in the pipeline for the engine, but not completed before launch. Additionally, tests were done during development of Alien: Isolation to stream levels without a loadscreen, utilising maps marked with a prefix of "TRANS_" and "EXT_" which would have placed the player inside a transit car or transit shuttle while unloading/loading levels. This however didn't ship, and the final game uses loadscreens between map loads.

Sounds[]

CathodeAudioEngine

A screenshot of the Cathode audio scripter for the ENG_TowPlatform map - M33_Pt01_DIALOGUE.

Cathode used Wwise for sounds, and a custom complex multilayered sound system which mixed sound effects in real time during play to react to the current state of the environment around the player. This was primarily done by utilising six audio channels for each ambient soundtrack, being two channels each (left+right) for low, medium, and high tension. These channels would then be faded between at runtime to dynamically increase tension dependant on the game's state, while keeping the pace of the previous tension layer.

Wwise-Layer-Splitter

A graph showing Wwise mixing between the layers in the 6-channel audio file.

The Sound mixer would also create tension by lowering and raising the volume of different audio sets (such as player foley) to make players feel more vulnerable in certain situations through Wwise RTPC. The idea was to mirror the player's focus to subconsciously draw attention to the threats without you noticing. In Alien: Isolation, the Alien's frontstage "AreaSweep" utilises the six channel method mentioned previously, and also produced the soundtrack on-the-fly from sets of audio stingers and premade sections, enhancing the tension of Alien encounters. Each map had a set of "flowgraphs" for mission sections and specific events within CAGE's audio editor.

Alien- Isolation Sound Node Network

A debug render showing the nodes for the sound node network in the Airport.

Cathode also utilised a bespoke system known as the "sound node network" to allow enemies (primarily the Xenomorph) to react to player generated sounds. Each level contained a series of "listener networks" which each consisted of a series of nodes placed around the environment which would act as a rudimentary navmesh to route player created sounds to the enemies' location, simulating a real world sound propagating through the environment. When a valid route is found along the node's paths, the hunting enemy is directed to investivate the sound (for example, a player sprinting). A similar system was implemented in the game Half-Life: Alyx, and is explained in this SIGGRAPH presentation.

Multiplayer[]

Cathode implemented a rudimentary online multiplayer system, intended to be used within Alien: Isolation for a Dark Souls style system known as "Memento Mori" where players could discover & loot dead bodies of other players. It appears that as well as this, at some point in development full multiplayer modes were planned (perhaps scrapped due to SEGA's review post Aliens: Colonial Marines). Support for client hosted game sessions and networked player entities with physics support exist throughout the codebase, written in a wrapper of NetZ. A PvP object marking system for alerting players in the lobby of weapons and dangers also exists. A respawning system exists to respawn players with allegiance groups at set points over intervals depending on the number of players left alive. A networked egg spawning system is referenced with a hostility option.

Other Features[]

Emitters ReactorCore2

A screenshot in the level editor, showing sound nodes in Alien: Isolation's ENG_ReactorCore.

The Cathode engine has a heavy use of a custom file format with the extension of PAK. While some PAK files are simply compiled source files with padding between (such as UI.PAK), others are more complex and require other manifest-type files to unpack them (see "Level Streaming"). Another common format is "BML" a binary XML format which is used throughout the game to configure things such as weapon parameters, difficulty settings, character configurations, and more. A number of third party libraries are utilised for bug reporting, and also for engine functions such as physics. Havok provides collision and physics maps, with a custom dynamic blocker implementation added. Navmeshes are provided by an open source tool named Detour, with a custom wrapper.

The scripting system used within Cathode builds scripts to a level-specific "COMMANDS" file, which is a custom compiled flowgraph file utilised by the engine to populate levels with characters, animations, dialogue, and other mission related scripts. In 32-bit versions of the game, this is a ".PAK" file, while in 64-bit versions of the game this is ".BIN". The ".PAK" version is a compressed version of the data in ".BIN" which is utilised for memory reasons.

Higher poly geometry is faked in the engine through a tessellation system which increases geometric complexity in the player's screen space. This works well on objects such as ribbed pipes which can be modelled as a cylinder but rendered as a high complexity object.

The engine has a "cover and traversal" system that is seemingly unused in the final version of Alien: Isolation, which was built for the early third person version of the game. This system has a set of rules for object heights and sizes to calculate if it can be traversed (climbed) or used as cover (the third person version of the game was very reliant on using sticky cover controls to hide from the Alien).

RAD Telemetry was utilised within the engine to allow for performance debugging. Telemetry is a performance monitoring suite that shows detailed thread process data with little overhead. The static libraries for the performance monitoring were left in the press copies of Alien: Isolation, however later removed in a post-launch update. As well as Telemetry to monitor performance, the engine utilised its own crash reporter to track crash issues in builds. Crash data was collected and sent back to a LevelDB database via cURL, with the open source JavaScript library "flotr2" being used to display graphs of debug JSON data that Cathode could produce.

CathodeGameIntro

The animated logo which originally played when booting Alien: Isolation.

Trivia[]

  • The PAK2 format created for Viking: Battle for Asgard was carried over to Cathode, meaning mod tools are compatible for some PAK files between the games.
  • Although being trademarked by SEGA, Cathode was never licensed out.
  • The renderer found within Cathode was upgraded to DX12 and repurposed for Halo Wars 2.
  • The deferred rendering that was added to Viking's engine for Isolation was first previewed at the 2012 "Develop Conference".
  • The initial greenlight demo of Alien: Isolation ran in-engine on an early version of Cathode.
  • The original main menu for Alien: Isolation (for pre-release demos) included a boot logo for Cathode, but this was cut from the retail version of the game. The boot logo can be seen at the top of this article.

Further Information[]

Further information about the engine can be found at the following links:

Advertisement