.. | ||
ambient.md | ||
anim.md | ||
ball_catcher.md | ||
ball_launcher.md | ||
box_dropper.md | ||
button.md | ||
clock.md | ||
collision.md | ||
decor.md | ||
door.md | ||
doorway.md | ||
dynamic_box.md | ||
elevator.md | ||
fizzler.md | ||
location.md | ||
pedestal.md | ||
point_light.md | ||
README.md | ||
room.md | ||
security_camera.md | ||
signage.md | ||
static.md | ||
switch.md | ||
trigger.md |
Level Objects
Objects can be placed in a level via their associated .blend and .yaml files, causing them to be rendered and animated properly by the game at the correct position/orientation and with the correct materials applied.
However, the game needs to be able to give each object the proper behavior. Buttons activate specific doors, triggers start relevant cutscenes, the floor stops the player from falling through, and so on.
Naming convention
At level export time, level definition C source files are generated using the
Lua scripts in tools/level_scripts/
, initiated by export_level.lua
. The way
the level exporter knows how to properly populate these definitions with objects
is by using their names. Every object in a level's .blend
file has a name of
the form:
@TYPE [ARG]...
That is, an @
-prefixed type name followed by 0 or more space-separated
arguments. The number and type of the arguments is object type specific.
This could have been done with Blender's custom object properties feature, but one nice benefit of this approach is that it makes searching for related objects easy.
Object types
See the linked pages below for details on specific level objects.
Type | Description |
---|---|
@ambient | Ambient light source for baked lighting |
@anim | Animatable armature bone |
@ball_catcher | High energy pellet receptacle |
@ball_launcher | High energy pellet spawner |
@box_dropper | Cube spawner |
@button | Flat, circular button |
@clock | Countdown clock |
@collision | Static collision |
@decor | Generic dynamic object |
@door | Sliding door |
@doorway | Level segment connection for rendering and collision |
@dynamic_box | Dynamic collision |
@elevator | Level transition elevator |
@fizzler | Emancipation grill |
@location | Referenceable point in the world |
@pedestal | Portal gun holder |
@point_light | Omnidirectional light source for baked lighting |
@room | Discrete level segment for rendering and collision |
@security_camera | Wall-mounted camera |
@signage | Start of level informational sign |
@static | Static geometry |
@switch | Button on pedestal |
@trigger | Signal and cutscene activating volume |