Skip to end of metadata
Go to start of metadata

How to add interactivity to cinematics

The following types of interactivity will be covered here:

(In)finite pauses

This type of interaction is the most simple to implement. It just pauses the sequence and keeps it in a loop until the player presses a button. Examples for uses could be: picking something up, moving forward, require to jump, notch the head etc.

A lazy (but easy) implementation would be nothing more then just adding a trackevent to your sequence when the pause should happen and setting up a flowgraph that sets the PlaySpeed of the sequence to 0 and back to 1 when the user pressed the required button:

This implementation has some problems though: the sequence stops and continues suddenly and its completely static, there is no movement at all during the pause. A more sophisticated solution includes several Interpol:Float nodes to slowly (de)-accelerate the playspeed and a small loop (ping-pong in this case) to keep a bit of movement in the scene:

This would now be an infinite pause of the sequence. In order to make it automatically continue after a certain amount of time, we simply add a Time:Delay node as an optional path to the Input:Action node. Please note how to prevent the sequence from continuing two times by the Logic:Gate node!

Deadly QuickTimeEvents

This interaction include a button press under time pressure and a fail sequence. The implementation looks a bit different to the above situation, as we now don't need a loop to wait for the player input here, but rather continue the sequence normally for the time given the player got to react. If the player fails to press the correct button in time, the normal sequence is stopped and a appropriate fail sequence is started which shows the players death accordingly.

Note that you have to make sure, that the last frame of the main sequence and the first frame of the fail sequence fit more or less together to get proper motion!

Things you might want to add here (but depends on project):

  • make the button hint blink to show its urgency (e.g. set its time to 0.5s and add a timer that shows it every 0.75s)
  • logic to kill the player itself after the fail sequence has finished

Non-Deadly QuickTimeEvents

Non-Deadly QuickTimeEvents can be used to lower the difficulty of QTEs coming afterwards and training the player the functionality. The easiest solution would be by letting the sequence continue normally no matter what the player does. Though the better approach would be to give the player some feedback, e.g. letting him stumble but still continue to run. Below is a sample setup which shows how to do it with a separate sequence which runs in parallel to the main sequence (the main sequences playspeed is set to 0 during the playtime of the semi-fail sequence, afterwards main sequence gets set to the last SequenceTime plus length of the semi-fail sequence):

Additional (ambient) interactivity

This type of interactivity doesn't change the sequence flow, but rather add some ambient and feedback to the scene. The following actions might be added:

Rumbling the gamepad

You can add rumbling in Trackview by adding special Script Variables or in Flowgraph by using the node Game:ForceFeedBack. See Force Feedback in cinematics for a detailed description.

Allowing the player to look around

You can enable the player to look around freely, even in camera controlled sequences by adding special Script Variables to your Trackview sequence. The variables are:

  • Cinematic_CameraLookUp
  • Cinematic_CameraLookDown
  • Cinematic_CameraLookLeft
  • Cinematic_CameraLookRight

The values you assign to the keys are the angles of freedom in degrees.

By default the camera will be recentered if no camera control input was received of some time. You can disable this behavior by adding a special Script Variable to the Trackview sequence:

  • Cinematic_CameraDoNotCenter

Setting the value of this key to 1 will disable the recentering.

Enable some button actions

Another possibility to add ambient interaction is to allow the player some button presses and let the environment react to it. Examples could be:

  • The suit modes in Crysis2 and let marines give feedback (e.g. "Uh oh, he's cloaked!" when the player activates cloak mode)
  • Combine the free look above with flowgraph logic that detects when the player looks at something, e.g. at another character which then in return looks at the player; you can use the CinematicTrigger entity for it or read out the current camera rotation Camera:CameraYPR node) and react to certain angles.
  • No labels