Part I · Getting It Running
Chapter 1: Meet QF Code
Everything you need to start is already open in front of you: a browser. No installer, no account, no setup. That's not an accident. It's the whole point.
Opening QF Code
Go to the QF Code IDE and you'll see two main areas: the editor on one side, where you write code, and the output panel on the other, where your program talks back to you. A Run button sits above the editor. Press it, and whatever you've written executes top to bottom, printing its results into the output panel as it goes.
That's the entire loop you'll use for this whole book: write, run, read the output, change something, run again. You don't need to understand every button on the toolbar right now. Save, Open, Find, and the rest are there when you need them, and we'll pick each one up exactly when a chapter gives you a reason to reach for it.
Your First Line
Type this into the editor:
writeln("Hello, adventurer.")Press Run. The output panel should show:
Hello, adventurer.That's a complete, real QF Code program. One line. Nothing missing. You
don't need a main() function, you don't need to import anything, you
don't need to tell the computer where your program starts. It starts at
the first line and runs until it runs out of lines.
Write and Writeln
QF Code gives you two ways to print something: write and writeln.
They look similar, but they behave differently in a way that will trip
you up once if nobody warns you, so let's get it out of the way now.
write("A")
write("B")
writeln("C")You might expect this to print ABC on one line. It doesn't. It prints:
AB
Cwrite keeps adding to the same line. writeln always starts a fresh
line of its own, even if there's text waiting from an open write. Think
of write as talking without taking a breath, and writeln as always
clearing its throat and starting a new sentence. For most of this book,
writeln is what you'll reach for. write earns its keep in a handful of
specific places, and you'll know one when you see it.
Comments
A line starting with // is a comment. The computer skips it entirely.
It's a note to yourself, or to whoever reads your code next.
// This program greets the player.
writeln("Hello, adventurer.")One thing worth knowing early: // is also QF Code's division operator,
for whole-number division. The language can tell the difference based on
where the // shows up, but you can save yourself any confusion by
sticking to one habit, put // at the start of a line when you mean
comment, and only use it between two numbers when you mean division.
Starting the Adventure
Everything in this book builds toward one project: a small text adventure. You're going to write it a few lines at a time, chapter by chapter, and by the end you'll have a complete little game that didn't exist before you built it.
It starts here, with three lines:
// The Hollow Cottage
// Chapter 1
writeln("You are standing outside a locked cottage.")Run it. That single line of output is the whole game so far. It isn't much. By chapter 14, this same file will have rooms, an inventory, a locked door you can actually open, and sound effects when you win or lose. Every single piece of that will get added because the story needs it, not because it was next on a list.
Make It Yours. Before you move on, change the cottage. Make it a cave, a spaceship, a treehouse, whatever you want the reader of your game to see first. This is your program now, not a copy of mine.
Chapter Checkpoint
Open either known-good checkpoint directly in QF Code, or download the .qfc file to keep locally. The IDE opens in a new tab and does not run the program automatically.
Start this chapter
Chapter 1 starting checkpoint.
Continue from here
Chapter 1 completed checkpoint.
Every chapter in this book ends with a checkpoint: the starting code for the chapter, and the completed code after it. If something stops working along the way and you can't tell why, you can always load the checkpoint and pick up from there instead of getting stuck.
Starting code: an empty editor.
Completed code (Chapter 1):
// The Hollow Cottage
// Chapter 1
writeln("You are standing outside a locked cottage.")Copyright © 2026 Edison Mooers. Published by Gibidda Press. Free for personal learning and qualifying noncommercial educational use. Commercial training, organizational use, redistribution, and adaptation require written permission. Full use terms.