Read the book →
Build a small game, then work through the language, engine interface, and compiler. Edition 0.3 includes bits, bytes, and buses.
Download the PDFWick 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.
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 →
Build a small game, then work through the language, engine interface, and compiler. Edition 0.3 includes bits, bytes, and buses.
Download the PDFSyntax, types, collections, built-in functions, and the lt.* engine API. For checking a detail while you write.
Mask a value, wrap a register, or display a bus in binary. Includes a processor example and the runnable Bit Lab workbench.
Bit Lab sourceTypes 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.
// 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.
rand() and Lantern’s fixed-timestep mode support repeatable runs. Development loop →