Visual Graphing – Earthquake System

The Earthquake Manager
The Earthquake Manager (Quake Manager) is a versatile system used to produce screen shake, gamepad rumble, and earthquake sounds. It can be configured to loop repeatedly, deactivated during specific events and reactivated as needed.



Graph Functionality:

A. Toggle Quakes Off – The quake manager can be configured to start on or off on the manager itself or dynamically toggled on and off using Custom Events. In this branch of the graph a Custom Event can toggle the manager off. As you can see from the graph nodes that a local boolean variable is used. This allows the manager to finish any quakes currently playing and avoid playing additional quakes until the manger is turned back on.

B. Toggle Quakes On – In this branch of the graph a Custom Event can toggle the manager on.

C. Graph Enable – On Graph Enable, if the looping quake boolean is True, continue processing the graph.

D. Random Float – The “Set Random Float” node finds a random float between a min and max float defined by the world builder or artist. This value is used as a delay between quakes while the quake manager is active. Once the random delay is completed the quake manager is checked to verify that quakes are still active. If True the graph continues.

E. Gate and Switch – A “Gate” node allows for cutscenes to suspend the quake system to avoid the quake system from disrupting any special cutscene cameras. If the gate is open, a “Switch” node randomly selects the next branch of the graph to process.

F. Cutscene Detection – If a cutscene is used in the same environment as the quake manager this section detects when the cutscene starts and ends. When the cutscene starts the quake manager is suspended by gating the quake manager from progressing. When the cutscene ends the gate is opened allowing the quake manager to resume progress.

G. Quake Variants – The quake manager allows the user to define 3 quake variants. By default these variants are large, medium and small corresponding with the length of the camera shake, gamepad rumble and sound. If the “UsePlayerLocation” boolean is True, the player’s location is used to spawn the rumble and camera shake prefab. If False, the prefab is spawned where the quake manager was placed in the environment (these prefabs cleaned themselves up after 10 seconds to avoid memory problems). By default the 3 quake variants were 2D game objects to simplify functionality so this option was not used.

H. Sound – The quake manager allows the user to define a delay that should coincide with the length of the quake variant. Once this delay has completed silt is triggered (more on this below). Each quake variant also has a looping sound variant that must be triggered on and off.

I. Quake FX – The quake manager sends a custom event to the Quake FX graph that handles the toggling on and off of all silt particle systems in the scene.

J. Verification – The graph verifies it is still active before proceeding.

K. The Loop – The graph loops back to the delay to repeat the process until the player leaves and the graph is unloaded or the graph is suspended.

Quake FX
The Quake FX graph handles the activation and deactivation of the silt particle systems placed in the environment by the design or art team.


Graph Functionality:

A. Trigger Volume Option – The Quake FX graph allows an artist or a designer to trigger a specific earthquake effect based on a trigger volume.

B. Trigger Deactivation/Reactivation – The Quake FX graph can be configured to deactivate the trigger volume once the player enters the trigger the first time. It also allows for the reactivation of the trigger volume after a delay.

C. Spawn Prefab – The “Spawn Prefab” node is used to spawn the screen shake and rumble functionality at a specific location.

D. Delay – Since the silt particle systems should follow the screen shake and rumble, a delay is available for configuration by the user.

E. External Event – The most common use for the Quake FX graph is triggering silt particle systems from the Quake Manager graph above.

F. Silt Activation – The Quake FX game object allows the artist or designer to define as many silt particle systems as needed. For each system in the list, a random float value delay is used to stagger the activation of each effect.

G. Silt Deactivation – After a defined delay all silt particle systems are turned off.