Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quick Reference

A scannable cheat sheet for daily Flint development.

CLI Commands

CommandDescription
flint init <name>Initialize a new project
flint scene create <path>Create a new scene file
flint scene listList scene files
flint scene infoShow scene metadata
flint entity createCreate an entity in a scene
flint entity deleteDelete an entity from a scene
flint query "<expr>"Query entities (e.g., "entities where archetype == 'door'")
flint schema <name>Inspect a component or archetype schema
flint validate <scene>Validate scene against constraints (--fix to auto-fix)
flint edit <file>Unified interactive editor (auto-detects file type)
flint play <scene>First-person gameplay with physics + scripting
flint render <scene> -o out.pngHeadless render to PNG
flint gen <spec> -o out.glbRun procgen spec to produce mesh/texture
flint asset generate <type>AI asset generation (texture, model, audio)
flint asset import <file>Import file into asset catalog
flint prefab view <template>Preview a prefab template in the viewer

Keyboard Shortcuts

Player (flint play)

KeyAction
WASDMove
MouseLook around
SpaceJump
ShiftSprint
EInteract
Left ClickFire
RReload
1 / 2Weapon slots
F1Cycle debug mode (PBR → Wireframe → Normals → Depth → UV → Unlit → Metal/Rough)
F4Toggle shadows
F5Toggle bloom
F6Toggle post-processing pipeline
F11Toggle fullscreen
EscapeRelease cursor / Exit

Scene Viewer (flint edit <scene.toml>)

KeyAction
Left-clickSelect entity / pick gizmo axis
Left-dragOrbit camera (or drag gizmo)
Right-dragPan camera
ScrollZoom
Ctrl+SSave scene
Ctrl+ZUndo position change
Ctrl+Shift+ZRedo position change
F1Cycle debug mode
F2Toggle wireframe overlay
F3Toggle normal arrows
F4Toggle shadows

Spline Editor (flint edit <scene.toml> --spline)

KeyAction
Left-clickSelect control point
Left-dragMove control point
Alt+dragMove vertically (Y)
Middle-dragOrbit
Right-dragPan
Tab / Shift+TabCycle control points
IInsert point
DeleteRemove point
Ctrl+SSave spline
Ctrl+ZUndo

File Type Auto-Detection (flint edit)

ExtensionOpens
.scene.toml, .chunk.tomlScene viewer
.procgen.tomlProcgen previewer (or texture pipeline editor)
.terrain.tomlTerrain editor
.glb, .gltfModel previewer (orbit camera)

Common TOML Snippets

Minimal Entity

[entities.my_thing]
archetype = "furniture"

[entities.my_thing.transform]
position = [0, 1, 0]
rotation = [0, 45, 0]
scale = [1, 1, 1]

PBR Material

[entities.my_thing.material]
base_color = [0.8, 0.2, 0.1]
roughness = 0.6
metallic = 0.0
emissive = [1.0, 0.4, 0.1]
emissive_strength = 2.0

Physics Body

[entities.wall.collider]
shape = "box"
size = [10.0, 4.0, 0.5]

[entities.wall.rigidbody]
body_type = "static"

Particle Emitter (Fire)

[entities.fire.particle_emitter]
emission_rate = 40.0
max_particles = 200
lifetime_min = 0.3
lifetime_max = 0.8
speed_min = 1.5
speed_max = 3.0
direction = [0, 1, 0]
gravity = [0, 2.0, 0]
size_start = 0.15
size_end = 0.02
color_start = [1.0, 0.7, 0.1, 0.9]
color_end = [1.0, 0.1, 0.0, 0.0]
blend_mode = "additive"
shape = "sphere"
shape_radius = 0.15
autoplay = true

Post-Processing

[post_process]
bloom_enabled = true
bloom_intensity = 0.04
bloom_threshold = 1.0
vignette_enabled = true
vignette_intensity = 0.3
exposure = 1.0

UI Layout

# ui/hud.ui.toml
[ui]
name = "HUD"
style = "ui/hud.style.toml"

[elements.score_panel]
type = "panel"
anchor = "top-right"
class = "hud-panel"

[elements.score_text]
type = "text"
parent = "score_panel"
class = "score-value"
text = "0"

UI Style

# ui/hud.style.toml
[styles.hud-panel]
width = 160
height = 50
bg_color = [0.0, 0.0, 0.0, 0.6]
rounding = 6
padding = [10, 8, 10, 8]
x = -10
y = 10

[styles.score-value]
font_size = 28
color = [1.0, 1.0, 1.0, 1.0]
text_align = "center"
width_pct = 100

Script Attachment

[entities.npc.script]
source = "npc_behavior.rhai"
enabled = true

[entities.npc.interactable]
prompt_text = "Talk"
range = 3.0
interaction_type = "talk"

Audio Source

[entities.campfire.audio_source]
file = "audio/fire_crackle.ogg"
volume = 0.8
loop = true
spatial = true
min_distance = 1.0
max_distance = 15.0

Prefab Instance

[prefabs.player]
template = "kart"
prefix = "player"

[prefabs.player.overrides.kart.transform]
position = [0, 0, 0]

Top Scripting Functions

FunctionReturnsDescription
self_entity()i64ID of the entity this script is attached to
get_entity(name)i64Look up entity by name (-1 if not found)
get_field(id, comp, field)DynamicRead a component field
set_field(id, comp, field, val)Write a component field
get_position(id)#{x,y,z}Entity position
set_position(id, x, y, z)Set entity position
distance(a, b)f64Distance between two entities
is_action_pressed(action)boolCheck if action is held
is_action_just_pressed(action)boolCheck if action pressed this frame
delta_time()f64Seconds since last frame
play_sound(name)Play a sound effect
play_clip(id, clip)Play an animation clip
raycast(ox,oy,oz, dx,dy,dz, dist)Map/()Cast a ray, get hit info
move_character(id, dx, dy, dz)#{x,y,z,grounded}Collision-corrected movement
spawn_entity(name)i64Create a new entity
load_scene(path)Transition to a new scene
push_state("paused")Push a game state (e.g., pause)
pop_state()Pop to previous game state
persist_set(key, val)Store data across scene transitions
load_ui(path)i64Load a .ui.toml document (returns handle)
ui_set_text(id, text)Set element text content
ui_show(id) / ui_hide(id)Toggle element visibility
ui_set_style(id, prop, val)Override a style property at runtime

Render Command Quick Examples

# Basic screenshot
flint render scene.toml -o shot.png --schemas schemas

# Framed hero shot
flint render scene.toml -o hero.png --distance 20 --pitch 30 --yaw 45 --target 0,1,0 --no-grid

# Debug views
flint render scene.toml -o wireframe.png --debug-mode wireframe
flint render scene.toml -o normals.png --debug-mode normals
flint render scene.toml -o depth.png --debug-mode depth

# Post-processing control
flint render scene.toml -o bloom.png --bloom-intensity 0.08
flint render scene.toml -o raw.png --no-postprocess