Welcome! This is the official tutorial series for Bardic, designed to take you from "Hello, World" to a fully-functioning, Python-powered interactive game.
You don't need to be a programmer to start, but Bardic's real magic comes from its "Python-first" design. This tutorial series is a single, linear path that gently introduces new concepts.
You'll start as a Writer, learning to create simple branching passages. Along the way, you'll become a Technical Writer, learning to add logic and memory to your story. By the end, you'll be a Python Magician, able to import your own custom classes and build complex narrative systems.
No matter your skill level, start at Part 0 (Setup). Each lesson builds on the last.
- Part 0: Downloading Bardic (and Python) - Choose Your Path
- Get set up with Bardic and Python. I promise it's simple and fast!
- You'll create: A Python install with Bardic included
- Part 1: Your First Branching Story
- Learn the absolute basics. We'll create "pages" (passages), link them with choices (
+), and play your first story in the terminal. - You'll create: A playable branching story
- Learn the absolute basics. We'll create "pages" (passages), link them with choices (
-
- Let's make your story remember things. We'll use variables (
~), conditional logic (@if:), and one-time choices (*) to build a classic "locked door and key" puzzle. - You'll create: A puzzle game with state
- Let's make your story remember things. We'll use variables (
-
Part 2.5: Complex State (Lists and Dictionaries)
- Go beyond simple variables. Learn to use lists for inventories and dictionaries for character sheets.
- You'll create: An inventory system and character stats
-
Part 3A: Objects Have Superpowers
- Discover that lists, strings, and dictionaries are objects with built-in methods. Learn to use
.append(),.upper(),.keys()and more. - You'll learn: What objects are and how to use their methods
- Discover that lists, strings, and dictionaries are objects with built-in methods. Learn to use
-
Part 3B: Creating Your Own Objects
- Now create your OWN objects! Learn to write a simple
Itemclass, import it into your story, and give objects custom superpowers. - You'll create: A custom Item class and shopping system
- Now create your OWN objects! Learn to write a simple
-
Part 3C: Reusable Passages & The Standard Library
- Stop copy-pasting! Learn to write reusable passages with parameters, and explore Bardic's built-in modules for inventory, economy, and dice rolling.
- You'll create: A complete merchant trading game with shops, currency, and random events
-
Part 4: Building a "Game" with a Custom UI
- Let's break out of the terminal. You'll learn how to use the NiceGUI template, ask for the player's name with
@input, and send game data to your UI with@render. - You'll create: A web-based game with custom UI
- Let's break out of the terminal. You'll learn how to use the NiceGUI template, ask for the player's name with
-
Part 5: Finishing & Polishing Your Story
- Your story is getting big! We'll cover the tools you need to manage a real project, like splitting your files with
@includeand debugging your plot with thebardic graphvisualizer. - You'll learn: Project organization and professional workflows
- Your story is getting big! We'll cover the tools you need to manage a real project, like splitting your files with
| Part | What You Can Build After |
|---|---|
| 1 | Simple branching stories (like Twine) |
| 2 | Stories with memory and puzzles |
| 2.5 | Games with inventories and stats |
| 3A | Stories using built-in object methods |
| 3B | Games with custom Python objects |
| 3C | Merchant games, shops, and reusable game systems |
| 4 | Web-based games with custom UIs |
| 5 | Large-scale, organized projects |
If you want to make interactive fiction without diving too deep into programming:
- Complete: Parts 1, 2, 2.5
- Skim: Part 3A (just see what objects can do)
- Skip: Part 3B (unless you get curious!)
- Optional: Part 4 (only if you want custom UI)
- Complete: Part 5 (learn project organization)
Result: You can build complete IF games with variables, conditionals, loops, and complex data structures. This is enough for most stories!
If you want to leverage Python's full capabilities:
- Complete: All parts in order
- Focus on: Parts 3B & 3C (these are the game-changers)
- Definitely do: Part 4 (custom UIs are powerful)
- Master: Part 5 (for building large projects)
Result: You can build complex narrative systems with custom objects, reusable passages, external APIs, databases, and professional UIs.
Ready? Let's get started!
→ Begin with Part 0: Technical Setup
- No programming experience needed for Parts 1-2
- Basic comfort with text files (you should know how to create/save a text file)
- Python 3.10+ installed on your computer
- A text editor (VS Code recommended, but Notepad works too!)
- Bardic installed:
pip install bardic
- Type everything yourself. Don't copy-paste the code examples—typing helps you learn.
- Experiment freely. Try changing values, adding passages, breaking things!
- Play your story often. Compile and test after every few passages.
- Don't rush Part 3. The concept of objects is fundamental—take your time.
- Ask for help. Join our Discord if you get stuck!
- Passages:
:: Name - Choices:
+ [Text] -> Target(sticky) or* [Text] -> Target(one-time) - Variables:
~ variable = value - Display:
{variable}or{expression} - Conditionals:
@if condition:...@endif - Loops:
@for item in list:...@endfor - Python:
@py:...@endpy
- Standard Library Reference - Full docs for dice, inventory, economy, relationships, and quests
- Custom Classes Deep Dive - Advanced guide to serialization and best practices
- Lint Plugins - Write custom lint checks for your game's mechanics
- Language Specification - Complete syntax reference
- Example Games - See Bardic in action
- Choosing Your Installation Path
- Your First Branching Story
- Adding State & Memory
- Complex State (Lists & Dictionaries)
- Objects Have Superpowers
- Creating Your Own Objects
- Reusable Passages & The Standard Library
- Building a Custom UI
- Finishing & Polishing Your Story
Ready to begin? Start with Part 1 →