Free course · 36 short lessons · no sign-up
The Quest
Write The Lighthouse, a small mystery, from its first line to a finished game you can share. Each lesson is one idea and a few tasks, checked as you go, with a real Bruja editor, player and shell. Your progress is saved in this browser.
0 of 36 lessons done
- Chapter 1
First words
Lines, comments, speakers, and reading errors.
0/3 - Chapter 2
Crossroads
Questions and choices, and what happens after them.
0/4- Your first choiceChoices start with * and sit indented under a question.
- What happens nextThe lines indented under a choice play when it's picked.
- The story carries onAfter a choice's lines, the story continues below the question.
- Questions inside choicesThe lines under a choice can ask another question.
- Chapter 3
Threads
Places in the story, jumps, choices that come back, and detours.
0/3 - Chapter 4
Remembering
Variables, values in text, and choices with conditions.
0/4- VariablesGive a value a name, and show it in a line with {braces}.
- Changing valuesAssign again to change a variable; -= and += subtract and add.
- True, false and sumsVariables can hold true or false, and {braces} can hold any expression.
- Choices with conditions{condition} at the start of a choice shows it only when the condition is true.
- Chapter 5
Living text
Sequences, cycles, randomness, plurals, text with conditions, and markup.
0/5- Sequences[a|b|c] shows the next option each time, then sticks on the last.
- Cycles and randomnesscycle: loops, any: picks at random, one: picks once and keeps it.
- Plurals[count: n | none | one | many] picks text by number.
- Text with conditions[if: condition | yes | no] picks text by a condition, inside a line.
- Markup<b>, <i>, <color>, <size> and <pause> style the text.
- Chapter 6
Logic
if and else, loops, and switch.
0/3 - Chapter 7
Building blocks
Functions, lists, objects, local variables and enums.
0/4 - Chapter 8
Scenes that pause
Functions that hand back values one at a time, and scenes that unfold in stages.
0/2 - Chapter 9
Talking to the game
Tags, game functions and events, waiting, typed answers, translation and files.
0/6- Tags#tags at the end of a line are notes for the game.
- Game functions and eventsextern names functions the game provides; event lets the game listen.
- Waiting for the gamewait pauses the story until the game says go on.
- Asking for textinput() lets the player type an answer.
- Several filesimport makes another file part of the story.
- TranslatingLine IDs let a game play the same story in any language.
- Chapter 10
The full story
Endings, polish, and sharing your finished story.
0/2 - Track
Bruja for Lua programmers
Eight short lessons: what is the same, what looks different, what Lua lacks, and the story side.
0/8- Familiar groundWhat carries over from Lua, and the few things that look different.
- LoopsRanges instead of numeric for, do until instead of repeat, and a real continue.
- Functionsfunc and arrow functions. One return value, and every parameter passed.
- Arrays, objects and stringsLua's tables split into two types, and the string library becomes methods.
- switch, enums and constantsThree things Lua leaves you to fake with strings and if chains.
- Coroutines become generatorsA function with yield is a generator. No wrapping needed.
- Errors, events and the gameerror and assert instead of pcall, extern for the game's functions, and events.
- Dialogue, built inThe part Lua doesn't have. Functions that talk to the player.
Your progress
Saved in this browser, no account needed. To continue on another device, copy a sync link or download a file.