let x = 0
fn update(dt: num) {
x = (x + 40 * dt) % 400
}
fn draw() {
lt.clear(0.1, 0.1, 0.2)
lt.rect(x, 100, 16, 16, 1, 0.8, 0.2, 1)
}
Look up a rule, type or function while you write.
- Syntax & control flow
let,fn,if, loops- Types & optionals
num,str?,??, narrowing- Records & collections
- Named fields, lists and maps
- Built-in functions
- Numbers, strings, randomness, assertions
- Bits, bytes & words
bit_*,u8,u16,hex- Compiler & runtime errors
- Messages, causes and corrections
The host for your game
Lantern engine
Meshes, sprites, sound, input and saves. One game folder, a frame callback, and a typed lt.* API.