User Interface

Overview

Creating UI with CRYENGINE is easy and straightforward. We start our journey in the UI world with the basics, which everybody working on UI needs to know and should understand. After all of the underlying systems are presented and explained, the user can follow a tutorial for creating a simple button which sends events to the game code and reacts on user input.

CRYENGINE uses Scaleform for the in game User Interface. Scaleform is an external middleware that provides functionality to render / run Flash assets. The rendered assets can be used to implement Menus, HUD etc. They can even act as materials, which can be applied to in world geometry see UI Elements as Dynamic Textures.

Key Components

There are three key elements, which power the UI implementation in CRYENGINE:

  • UI Elements - These are the actual UI Flash assets. They define what is displayed on screen and also contain all the logic exposed to Flowgraph or accessible from C++ code. They can be viewed as the smallest integral part, that the whole UI system is built upon.
  • UI Actions - These are a special version of Flowgraph. They are typically used to define, encapsulate and link UI logic with the game code.
  • UI Event System - In order to simplify the communication between game code, UI code and Flowgraph even more, CRYENGINE provides a custom event system, which handles sending events in both directions.

Useful CVars

There are different CVars that can control the Flash environment:

  • sys_flash = enables/disables the Flash rendering.
  • sys_flash_info = enables Flash profiling, and various information is displayed.
  • sys_flash_log_options = enables logging of several Flash related aspects (Flash loading, Flash action script execution, etc).

Further Reading