DDecayKnowledgebase
Sindri's gameplay language

Build game logic.
Keep Rust underneath.

Decay is a Rust-inspired, statically typed language made for gameplay. Learn it by building, look up exact syntax when you need it, and get back to your game.

player.decay
script Player {
    @export
    var speed: f32 = 220.0;

    fn update(dt: f32) {
        let direction = Input.axis("move_left", "move_right");
        this.transform.position.x += direction * speed * dt;
    }
}
Start here

Learn by making things happen.

Short lessons introduce language features when a game actually needs them. Revolutionary concept, apparently.

01

Your first script

Attach behaviour, expose a value, and understand the update loop.

→
02

Variables & types

Values, mutability, primitives and vectors.

03

Functions

Turn behaviour into readable, reusable pieces.

04

Entities & scripts

Understand where gameplay behaviour lives.

05

Communication

Typed script messages, events and shared state.

06

Put it together

Build a small playable system from the pieces.

Learn Decay / Getting started

Your first Decay script

A Decay script adds gameplay behaviour to an entity. Start with the smallest useful thing: a value you can tune in Sindri and code that runs every frame.

What you'll learn

Scripts, exported fields, typed values, functions, update, and why dt exists.

Declare a script

script Player {
    @export
    var speed: f32 = 220.0;
}

script Player declares a gameplay script type. @export makes speed editable from Sindri instead of burying tuning values in source.

Run behaviour every frame

fn update(dt: f32) {
    let direction = Input.axis("move_left", "move_right");
    this.transform.position.x += direction * speed * dt;
}

The engine calls update while the script is active. Multiplying movement by dt makes speed depend on time rather than frame rate.

Guided project

Make a complete game.

One project from empty scene to exported build. No mysterious starter project quietly doing half the work.

Coming next

Build a tiny arena game

Movement, enemies, collisions, health, score, events, shared state, audio, Weave UI and export, introduced because the game needs them.

15 chapters
Knowledgebase foundation in progress
Cookbook

How do I…?

Answers for when you already know enough Decay and simply need the thing on screen to behave.

Movement

Move an entity

Read input and apply frame-rate-independent movement.

Communication

Talk to another script

Use typed script references instead of property-name strings.

Architecture

Keep game-wide score

Choose shared state when data belongs to the game rather than one entity.

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.

Concepts

Choose the right communication tool.

One particular script?Typed script reference / message
→
Announce something happened?Event
→
Game-wide data?Shared state