A small language
for Lantern games.

Wick is the Lantern engine’s scripting language. It pairs a familiar, lightweight syntax with static types and explicit handling of missing values.

Write a main.wick file, run it in Lantern, and save to reload. The compiler checks your code and engine calls before the game starts.

Build your first game Coming from Lua?

main.wickA moving square
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)
}

Lantern calls update and draw each frame. Engine API →

Learn & look things up

What Wick checks

Types are inferred or written explicitly. Engine calls are checked at load time. A misspelled variable is an error, and conditions must be bool.

Values that might be absent have an optional type, such as str?. Handle the missing case before using the value.

Types and optionals →
Loading a score that may not exist
// load_save returns str?; num returns num?
let saved = lt.load_save("best")
let best = num(saved ?? "") ?? 0

?? supplies a fallback for nil. This handles both a missing save and text that cannot be parsed as a number.

How it fits into a game

Data
Flat records with named fields, lists, and maps. Records →
Runtime
A bytecode VM without a JIT. Garbage collection runs between frames. Internals →
Repeatability
Deterministic rand() and Lantern’s fixed-timestep mode support repeatable runs. Development loop →
Scope
Wick is a small language under active development. Check the supported features and current constraints. Limits & ledger →