Modular Level Logic in Veil

The Problem

Adventure game levels often have specific logic that happens only once, such as playing a cutscene in a newly discovered level, or a unique puzzle.

Unreal provides level blueprints to help with this, but take designers out of the level whilst they code, and makes for difficult-to-transfer level logic.

The Solution

To give my level designers (aka me) tools to try new ideas out quickly, I created a series of actors to place in my level that do simple tasks:

  • Override player camera
  • Trigger volumes to detect player
  • Moving shapes
  • Switches for the player to flip
  • Music players
  • Dialogue players
  • Lights that turn on and off
  • Play a Level Sequence (animation)

These actors each have a state within: a simple boolean. They are designed to be able to link to each other, responding to one-another’s states.

For example, a music player could be linked to a trigger, playing club music when the player enters a building, and turning off when exiting.

This is similar to the boolean logic many creative games give players. Its simple and easy to use.

Examples

Dialogue trees are composed of airprints, and can split between two different directions depending on a condition.

Puzzles use airprints. Here is a door requiring two levers to open.

Menus use airprints to function, making it a simple task to setup buttons with new behavior.

Important variables in the game can be set or read with airprints. For instance, every time the player jumps we could add 10 stars to their inventory.

Did you know?

Retro Studios coded the Metroid Prime games in a similar manner!

Website Powered by WordPress.com.