Reference
Exact answers, quickly.
Language truth comes from Decay. Sindri host API truth comes from Sindri. This site presents it instead of inventing a third version.
Language
decay/LANGUAGE.mdLANGUAGE.mdThe complete Decay language referencescriptGameplay script declarationstateTyped shared project stateeventProject-wide typed eventsVec2Two-dimensional vector valueSindri API
decay-api.jsonOverviewAll 59 host types and 45 globalsActionWhat the player means rather than what they pressed: the input actions the scene declares, such as "jump" or "move", each bound to keys, buttons and sticks that can be changed while the game runs. A binding is written as text: "key.Space", two sources for an axis ("key.A/key.D"), or four for a direction ("key.W/key.S/key.A/key.D"). A name the scene does not declare is an error.AimWhich block in a 3D block world the mouse or finger is pointing at, for building and digging games.AnimationPlaying an object's animations, such as walk or jump, set up for it in the scene.AudioPlaying sound effects and music. Every sound goes through a bus — "effects", "music", or any other name — and every bus through "master", so a settings screen can turn each down.CameraThe game's camera: projection sizing, 3D orbit with obstruction pull-in, and engine-owned 2D follow, confinement and shake.CharacterCarry3dVerified solved platform carry, already included in total character translation. A platform rotation moves the probe origin along a straight swept chord; it does not rotate the actor.CharacterCollision3dOne historical movement-phase collision; internal stair and snap probes are not events.CharacterMotion2dA copied result of scene-owned 2D character movement. Gameplay reads support and collision flags to choose its own gravity, jump and recovery policy. This is historical movement, not a live solver contact or a pending request.CharacterMotion3dCopied historical scene-owned 3D character result. Gameplay chooses gravity, jumping and recovery. This is not a live contact or pending request.CharacterMovement3dCopied raw Rapier movement phase. Backend flags are not classified walkable support and must not alone authorize snapping. No independent step/snap displacement or iteration-limit status is available.ColorTweenA managed Color tween; read with Tween.color_value.Contact2dA copied solid solver contact from the last fixed step, relative to the queried body. Sensors are excluded. Multiple points/pieces may name one entity. Sleeping contacts retain support geometry and report zero new impulses/force. Editing a snapshot does not change physics.EffectsParticle effects, such as sparks and explosions. The particles are only drawn; they are not objects and nothing can touch them.EntityAn object in the game, such as a player, an enemy or a button. Scripts get these from calls like World.find and can store them, compare them and change their transform, sprite or shape.GameNumbers stored under names that every script can read and write, such as a score. Declaring them with state is safer, because a misspelt name then becomes an error.GamepadGame controllers. Each player gets a number from 1 to 8 when they press a button on their controller; 0 means any controller.GestureWhat the player did with the mouse or a finger: a tap, a hold, a drag or a pinch. Works the same for both.GraphicsHow richly the game is drawn: how far cameras see and how far and sharp shadows are. A settings menu offers it.GridGrids of tiles, flat or stacked in layers like building blocks: what each cell holds, where objects stand on them, and paths across them.InputEvery way the player reaches the game, in one place. Start with Input.Action, which works the same whatever the player holds; Input.Pointer, Input.Stick and Input.Gesture for mouse and touch; Input.Keyboard, Input.Touch and Input.Gamepad for one device read directly. The calls directly on Input are the keyboard, kept for older scripts: prefer Input.Keyboard.KeyboardThe keyboard, as Input.Keyboard. Keys are named by position, such as "W", "ArrowLeft" or "Space", so controls work on any keyboard layout. For controls that also work on a controller or a touch screen, use Input.Action.LightA directional, point or spot 3D light. Writes validate the whole candidate before changing the payload. Missing components and invalid values are errors. Rotation/position come from the entity transform.Light2dA light in a 2D scene: it brightens sprites, tiles and shapes near it when the scene's environment turns 2D lighting on, in every direction or, with a cone_angle below 360, in a beam. Switch one off with its object's set_active.LightingAsks the scene's 2D lighting about places in the world. Requires a scene whose environment has 2D lighting on, and fails otherwise. Every light and occluder in the world counts, wherever the camera is. A point is lit by a light when no occluder edge crosses the line between it and the light's centre, so a soft penumbra is a hard edge here, and a light that does not cast shadows shines through occluders.NumberTweenA managed number tween; read with Tween.number_value.ParticlesA particle emitter on an object: smoke, sparks, embers. It throws rate particles a second while it plays. An object's own emitter is particles; another, named one is particles("surge").Physics2D physics: moving objects with speed and pushes, and finding out what this script's object bumped into.Physics3dIndependent 3D physics controls, indexed queries and copied last-step events. Requires a 3D physics host. Controls require an active body. Before synchronization, valid authored 3D bodies with nonempty primitive colliders or convex-model references accept ordered setters/impulses. Convex asset geometry, scaled hull mass and pending controls validate at scene synchronization; replay uses actual compound mass. Unconsumed requests expire after successful synchronization. Authored motion fields are unchanged, so structural rebuilds restore authored settings.PointerThe mouse, or a finger on a touch screen, handled the same way so one game works on both.ProfileA profile: a data file of settings shared across a project. Chosen in the editor for a script's @export field and read with Profiles.ProfilesReading settings from a profile, a data file shared across a project, such as a weapon's damage and fire rate.QuatA copied quaternion value, with x/y/z/w components. Build with Quat(x: 0.0, y: 0.0, z: 0.0, w: 1.0), or copy transform.rotation. Change a local var's components, then assign the whole value; no quaternion arithmetic or interpolation methods are provided.RandomRandom numbers. The same seed always gives the same numbers, so a run can be replayed.RayHit2dA copied 2D ray hit snapshot. Null means no hit. Holds entity, world-space point and normal, and distance in world units. Copying or editing a snapshot never changes physics.RayHit3dCopied closest 3D ray/shape-cast hit, optional where no hit exists. World-space point/normal and world-unit distance; editing fields never changes simulation geometry.SaveSaving progress between play sessions: numbers, text and true/false values stored under names, such as a best score.SceneScenes are a game's separate places or screens, such as a menu, a level or a shop. This asks which one is playing and moves to another.SceneBloomThe glow that spreads from bright light, such as a lamp or an emissive model.SceneEnvironmentThe existing authored scene environment on an entity. Changes affect the next extracted frame without restarting. Missing components and stale entities are runtime errors; writes validate the full payload atomically. Fog, the color grade and bloom are reached through fog, post_process and bloom.SceneFogFog over the 3D world, from the camera outward and thickest low down. A section the scene never authored starts from its defaults, and a write keeps every other field. Refused values leave the payload as it was.ScenePostProcessThe grade applied to the lit world before the interface is drawn over it.SequencePlaying an object's sequences: choreography set up for it in the scene's Timeline, such as a title sliding in or a door opening, with named cues along the way.ShaderParamsThe four numbers a sprite's shader reads. What each one means is up to the shader.ShapeA shape drawn in the game world, such as a circle, polygon or ring, with an inside color and an outline.Sight2dA viewer in a 2D scene: everything it cannot see in a straight line, past the edges of occluders, is dimmed when the scene's environment turns 2D lighting on. Lights are not changed; only what is out of sight.SpriteA 2D image drawn in the game world, and how it is colored.StickA virtual joystick for touch screens: wherever a thumb lands becomes the centre, and dragging from there steers. A thumb that lands on an on-screen button presses the button instead, so the stick waits for one that lands off them.TimeTime in the game. A game runs as a series of frames, many times a second.TouchEvery finger on a touch screen, numbered from 0, for games that need more than one finger.TransformWhere an object is, how it is turned and how big it is. For an object attached to another, these are measured from that parent.TweenCreates automatically playing gameplay tweens owned by the calling script. Copies alias playback state. Advance occurs before the owner's subsequent updates using script delta. No automatic property binding. Curves: linear, ease, ease-in, ease-out, ease-in-out. Finite endpoints and finite non-negative duration are required; zero duration completes immediately. Maximum 8192 retained handles per runner; dispose unused handles.TweenHandleThe common handle accepted by playback controls; only factories construct one.UiThe interface drawn over the game: changing text and bars, and checking buttons and sliders.UiImageAn image in the interface drawn over the game, such as a health bar or an icon, rather than in the game world.Vec2TweenA managed Vec2 tween; read with Tween.vec2_value.Vec3TweenA managed Vec3 tween; read with Tween.vec3_value.ViewportThe area of the screen the game is drawn in.WorldFinding, creating and removing the objects in a game. Every object in a scene (a player, an enemy, a button) is an entity.WorldTextWords placed in the game world, such as a damage number or a name over a character. Change the words with Ui.set_text and Ui.set_number, as for interface text.