Teaching · Interactive resource
Making games in Twine
A playable tutorial and a visual guide to Twine and its SugarCube story format, built around the games my Interactivity students play before they make their own.
Playable tutorial
How to Use SugarCube
A Twine game that teaches SugarCube by being one. Twelve short sections cover links, variables, styling, images and packaging, then debugging, accessibility, a complete mini-project, saves and replay, with a quick reference.
Import the file into Twine to see the code behind every passage.
Companion guide
Visual techniques from the course games
How each game styles itself, with live demonstrations and CSS you can adapt for your own story.
Before you start
Setting up Twine
Twine is free and runs in a web browser or as an app. These five steps get you ready to work through the tutorial.
Get Twine
Use Twine in your browser with nothing to install, or download the app for Windows, macOS or Linux. The app is safer for a project you will work on over several weeks.
Twine in your browserDownload the appInstalling Twine
Keep your work safe
Browser Twine saves stories inside the browser, so clearing its storage or using a shared computer can lose your work. Do not use browser Twine in Safari on a Mac. Whichever version you use, choose Library, then Archive, at the end of each session and keep the file somewhere backed up.
Archiving and exporting storiesBackups
Import the tutorial
Download the .twee file, then in the story library choose Library, then Import, and pick the file. Open the story and double-click any passage to see how it was made.
Creating, copying and importing stories
Switch your story to SugarCube
New stories may start in a different story format. In your story, choose Story, then Details, and pick SugarCube. Everything in the tutorial is SugarCube code.
Changing the story format
Find the stylesheet
The CSS in the tutorial and the guide goes in Story, then Stylesheet, not in a passage.
Editing story JavaScript and CSS
How-to guides
The best places to look things up
Recipes for the course games
Testing, sharing and getting help
The games
Play these first
These games provide the visual and mechanical examples. The tutorial also includes SugarCube features you can use in your own work.