Skip to content

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

Start: First lines →
  1. Chapter 1

    First words

    Lines, comments, speakers, and reading errors.

    0/3
    1. First linesEvery line the player reads starts with >. Lines that start with // are notes for you.
    2. Who's talking> @Name: says who speaks a line, and > @Name (mood): adds how they feel.
    3. Reading errorsErrors and warnings show up while you write, with a line number and often a fix.
  2. Chapter 2

    Crossroads

    Questions and choices, and what happens after them.

    0/4
    1. Your first choiceChoices start with * and sit indented under a question.
    2. What happens nextThe lines indented under a choice play when it's picked.
    3. The story carries onAfter a choice's lines, the story continues below the question.
    4. Questions inside choicesThe lines under a choice can ask another question.
  3. Chapter 3

    Threads

    Places in the story, jumps, choices that come back, and detours.

    0/3
    1. Threads and jumps# starts a named thread; -> jumps to it.
    2. Choices that come back* choices disappear once picked; + choices stay.
    3. Detours<- plays a thread and comes back.
  4. Chapter 4

    Remembering

    Variables, values in text, and choices with conditions.

    0/4
    1. VariablesGive a value a name, and show it in a line with {braces}.
    2. Changing valuesAssign again to change a variable; -= and += subtract and add.
    3. True, false and sumsVariables can hold true or false, and {braces} can hold any expression.
    4. Choices with conditions{condition} at the start of a choice shows it only when the condition is true.
  5. Chapter 5

    Living text

    Sequences, cycles, randomness, plurals, text with conditions, and markup.

    0/5
    1. Sequences[a|b|c] shows the next option each time, then sticks on the last.
    2. Cycles and randomnesscycle: loops, any: picks at random, one: picks once and keeps it.
    3. Plurals[count: n | none | one | many] picks text by number.
    4. Text with conditions[if: condition | yes | no] picks text by a condition, inside a line.
    5. Markup<b>, <i>, <color>, <size> and <pause> style the text.
  6. Chapter 6

    Logic

    if and else, loops, and switch.

    0/3
    1. if and elseRun one block or another, depending on a condition.
    2. Loopsfor repeats a block for each number or item; while repeats while a condition holds.
    3. switchPick one block by value.
  7. Chapter 7

    Building blocks

    Functions, lists, objects, local variables and enums.

    0/4
    1. Functionsfunc name(): gives a block of rows a name, so you can use it anywhere.
    2. ListsA list holds several values, with push, remove and contains.
    3. Objects{wick: false, lit: false} groups named values together.
    4. EnumsA named set of values, checked before the story runs.
  8. Chapter 8

    Scenes that pause

    Functions that hand back values one at a time, and scenes that unfold in stages.

    0/2
    1. GeneratorsA function with yield hands back values one at a time.
    2. Scenes that pauseA generator can show lines and ask questions between yields.
  9. Chapter 9

    Talking to the game

    Tags, game functions and events, waiting, typed answers, translation and files.

    0/6
    1. Tags#tags at the end of a line are notes for the game.
    2. Game functions and eventsextern names functions the game provides; event lets the game listen.
    3. Waiting for the gamewait pauses the story until the game says go on.
    4. Asking for textinput() lets the player type an answer.
    5. Several filesimport makes another file part of the story.
    6. TranslatingLine IDs let a game play the same story in any language.
  10. Chapter 10

    The full story

    Endings, polish, and sharing your finished story.

    0/2
    1. Endings## starts a thread inside a thread: a tidy home for endings.
    2. Finishing touchesMake the story remember, play it through, and share it.
  11. Track

    Bruja for Lua programmers

    Eight short lessons: what is the same, what looks different, what Lua lacks, and the story side.

    0/8
    1. Familiar groundWhat carries over from Lua, and the few things that look different.
    2. LoopsRanges instead of numeric for, do until instead of repeat, and a real continue.
    3. Functionsfunc and arrow functions. One return value, and every parameter passed.
    4. Arrays, objects and stringsLua's tables split into two types, and the string library becomes methods.
    5. switch, enums and constantsThree things Lua leaves you to fake with strings and if chains.
    6. Coroutines become generatorsA function with yield is a generator. No wrapping needed.
    7. Errors, events and the gameerror and assert instead of pcall, extern for the game's functions, and events.
    8. 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.