Documentation
Use the search panel on the left to jump to the editor guide, the Sterren FS reference, or the build notes.
Start here
A quick map of the editor guide, Sterren FS guide, and build notes.
This page is organized so you can scan the left rail, search for a topic, and jump straight to the part you need.
- Editor guide to learn the workspace and panel layout.
- Workflow and files to understand project structure and asset flow.
- Viewport and play mode to get comfortable moving around scenes.
- Sterren FS basics to start scripting.
- Build and test when you are ready to compile locally.
Editor guide
How the dockable ImGui editor is organized.
The Sterren editor is a dockable ImGui application for building scenes, previewing assets, and running the game runtime.
Main panels
- Project Browser — browse project files, create folders, scripts, materials, and scenes.
- Hierarchy — the entity tree for the open scene.
- Inspector — edit transforms and components.
- Viewport — the live 3D editing surface with play controls.
- Script Editor — analyze and edit
.fsscripts. - Console — filter info, warning, and error output.
Workflow and files
Project structure, asset handling, and expected layout.
Expected project layout
Assets/
Assets/Scenes/
Assets/Scripts/
Build/
Assets/ holds the project content, Assets/Scenes/ stores scene files, Assets/Scripts/ stores .fs scripts, and Build/ is the recommended location for generated output.
Viewport and play mode
How to navigate the scene and switch into runtime.
- Orbit — right-drag, or Option/Alt + left-drag on trackpads.
- Pan — Shift + right-drag, or Shift + middle-drag.
- Dolly or zoom — Ctrl/Cmd + right-drag, or the mouse wheel.
- Press Play in the Viewport or Game panel to enter runtime; use Stop to leave.
Sterren FS basics
The scripting format, script shapes, and lifecycle hooks.
Sterren FS is the engine's Lua-based scripting format. Files use the .fs extension.
local script = Behaviour.define({
props = { moveSpeed = 4.0 },
state = { velocityY = 0.0 },
})
function script:update(dt)
if Input.Held("MoveForward") then
self.xform.pz = self.xform.pz - self.props.moveSpeed * dt
end
end
return script
Lifecycle hooks
start()runs once after a script is loaded.update(dt)runs every frame.fixedUpdate(dt)runs on the fixed 60 Hz step.collision(otherEntity, contact)runs on physics collisions.
Sterren FS reference
Exports, built-in modules, schema helpers, runtime helpers, and diagnostics.
Export fields
The editor reads -- @export ... comments and turns them into Inspector controls.
-- @export <type> <name> <default>
Supported export types include:
float,int,bool,string,color,vec3, andenum.entityreffor entity references.
-- @export float moveSpeed 4.0
-- @export int lives 3
-- @export bool enabled true
-- @export string displayName "Robot"
-- @export color tint 1.0 1.0 1.0 1.0
-- @export vec3 offset 0.0 1.0 0.0
-- @export enum cameraMode "FirstPerson;ThirdPerson" 0
-- @export entityref target "" ""
enumstores a quoted list of options separated by semicolons and a default index.entityrefstores an entity reference and can carry an optional filter string.- Exported values are preserved when the editor reparses the same script.
Built-in modules
The framework bootstrap creates and normalizes these namespaces before scripts run:
Sterren.WorldSterren.EntitySterren.QuerySterren.InputSterren.PhysicsSterren.TimeSterren.EventsSterren.AudioSterren.DebugSterren.MathSterren.AssetsSterren.ScenesSterren.NetSterren.ReplaySterren.ProfilerSterren.JobsSterren.RandomSterren.Services
Common helpers
Sterren.Time.now()Sterren.Input.Held,Down, andReleasedSterren.World.spawnPrefab,spawn,destroy, andDestroyEntitySterren.Query.FindEntity,FindEntityByName,FindEntityByTag, andFindEntitiesInRangeSterren.Physics.Raycast,sphereCast,boxCast,capsuleCast,overlapSphere, andoverlapBoxSterren.Assets.loadAsyncSterren.Scenes.load,loadAsync,loadAdditive,unload, andsetActiveSterren.Audio.PlayEntity,StopEntity,PauseEntity,ResumeEntity,PlayOneShot, and volume controlsSterren.Debug.log,warn, anderrorVec2,Vec3,Vec4,Quat, andColor
Descriptor and schema helpers
Behaviour.define,System.define,Service.define,Asset.define,Query.define, andTest.defineProp.*schema helpers for inspector-exposed fields includingbool,int,float,string,vec2,vec3,vec4,quat,color,enum,flags,entityref,componentref,assetref,prefabref,sceneref,materialref,audioref,animationref,inputAction,layer,layerMask,tag,curve,gradient,bounds,rect,variant, anduiref, plusgroup,struct,list, andmap.State.*schema helpers for runtime state includingbool,int,float,string,vec2,vec3,vec4,quat,color,entity,table,list,map, andvariant.Signal.defineandValidation.ok,Validation.warn,Validation.error.
Runtime instance helpers
self.entity:id(),name(), andhasTag(tag)self:emit(signalName, ...),self:on(...), andself:send(methodName, ...)self:task(name, callback)and task helpers such asnextFrame(),fixedUpdate(),waitSeconds(seconds),untilCondition(predicate), andcancel()self:service(name),self:getState(path),self:setState(path, value), andself:isAlive()- The runtime keeps the entity proxy and
self.xformaccess available, which is why sample scripts can move entities directly from Lua.
Hot reload and diagnostics
- The runtime keeps per-entity script instances stable so exported values and state can survive hot reload when the descriptor still matches.
- The Script Editor warns about long lines, unmatched brackets, debug prints, invalid
@exportdeclarations, and missing script descriptors. - When a script fails, the error is forwarded back into the editor console.
Build and test
How to compile the project and run the test suite.
cmake -S "/path/to/forge3d" -B /tmp/sterren-build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE="/path/to/forge3d/vcpkg/scripts/buildsystems/vcpkg.cmake" \
-DCMAKE_BUILD_TYPE=Debug
cmake --build /tmp/sterren-build --target forge_editor
ctest --test-dir /tmp/sterren-build --output-on-failure