Offtrail Tales

Offtrail Tales plays interactive stories with pictures, music, sound and video. Stories are written in ink, inkle's language for interactive fiction. Each tale fits in one .tale file: import it and play it in a browser, on a computer or a phone. Or export a ZIP from the Offtrail Tales Editor to put on itch.io or any web server.

The app is at https://offtrail-tales.github.io/. The Offtrail Tales Editor is at https://offtrail-tales.github.io/editor/.

Looking for how Offtrail Tales compares to other tools? Features & comparison.

Version v0.7.1, 2026-11-15 14-45-33 UTC

The app

Title screen

The first screen shows the app's background art and logo. A tale its author hosts may show their own picture instead. "Press any key" starts on a keyboard; "Tap to start" on a touch device. The menu music begins after the press.

A list of tale cards, built-in tales first, then imported tales. Below the list:

Tale cards

Each card shows the tale's cover picture (or a default tile), title, authors, description, language, size and version. Imported tales are marked "Imported".

Press a card to see its actions:

Import a tale

"Import tale" opens a file picker for a .tale file. The app checks every file in the tale against its hashes, with a progress bar. It warns when a tale with the same ID is already imported (replace or cancel) and when the browser does not have enough storage space.

Importing verifies every byte and then stores the whole file in the browser. It reads in small chunks, so memory stays low, but it takes time proportional to the tale's size: a 200 MB tale imports in seconds. On a MacBook M2 Pro in Safari, a 2.3 GB tale took about 20 seconds. On an iPhone 14, the same tale took about 20 seconds to verify and 3 to 4 seconds to store. Getting the file to the phone is a normal file transfer on top of that. The tale must fit in the browser's storage: up to 60% of free disk in Chrome, 80% in Safari. If it does not fit, the app says so before it starts.

A .tale file holds data, not code. It is safe to accept from anyone.

Import tale does not take an Export for itch.io ZIP or its page. For a tale you received that way, ask for its .tale file. Each imported tale shows its fingerprint on its card (see Fingerprints).

New game and the title card

A new game opens on the title card: the tale's title, authors and cover picture, over the theme's background. Any key or tap starts the first passage.

The game screen

The top bar has a menu button (hamburger), the tale's title, and a Map button when a map tag is active.

Below is the story: text and pictures scroll in a column. After each passage, the player picks a choice at the bottom. The chosen option stays in the story as a divider.

If the story crashes at runtime, the player sees the error and returns to the main menu.

Speech

A line written as Name: line shows the speaker's name once, above a run of their lines. The name is up to three words, each starting with a letter. Narration with a colon stays narration (for example, "He had one rule: never look back.").

The End

When the story ends, the screen shows "The End" with two buttons: Main menu and Play again. The autosave is deleted.

Game menu

The menu button in the top bar opens:

Save files

The app saves automatically after every choice. Each tale has one autosave, encrypted in browser storage. "Continue" on a tale card resumes it.

"Save game" downloads an .otsave file. "Load game" opens one. The browser may clear the autosave over time, so save to a file when you leave for a while. A save from a different version of the tale warns before loading. A save from a different tale asks to switch.

Maps

When a map tag is active, a Map button appears in the top bar. The tale may give it another name, such as File. It opens the map picture. The player can zoom (scroll wheel, pinch, keyboard plus and minus, or buttons) and drag to pan. Layers on the map show or hide as the story progresses.

Settings

Sound rail

On every screen: a mute toggle and a volume slider at the right edge. Moving the slider unmutes. Unmuting at zero volume brings it to 50%.

Sound and video pause when you switch to another app or tab, and carry on when you come back.

About and Credits

About explains what the app is, its safety statement ("no account, no tracking, nothing leaves your device"), and a "What's next" note.

Credits lists the licences of the engine, its libraries, art, music and the sample tale. Both end with the build version.

Tale themes

A tale can bring its own six colours and a background picture. The app wears them from the title card through the game screen, the game menu, Settings and videos. The main menu keeps the player's own theme.

The story can change these colours for a while with a theme tag (see Scene colours under Media tags).

Back to top

Writing a tale in ink

Ink is a plain-text language for interactive stories, made by inkle. Five words name the shapes of a story:

Word Looks like What it does
knot === name === A scene.
stitch = name A part of a scene.
divert -> name Goes to a scene or a stitch.
choice * or + Something the player picks.
gather - Where the branches meet again.

Speech is Name: line. Media is tags (see Media tags below).

The Offtrail Tales Editor's Help button shows a quick reference with examples and an Insert button for each pattern. The More menu inserts patterns too.

What ink can do

The full language is in inkle's manual: Writing with ink.

Back to top

Media tags

Tags link story text to media and to player input. A tag is # at the end of a line, then a key, a colon and an argument. Tags run before their line shows. Missing media is not an error: the story goes on without it.

Tag Argument What it does Lasts
bg: <id> picture Sets the background Until the next bg
bg: none Clears the background
img: <id> [frame] picture Shows a picture with the line This line
music: <id> sound Starts a looping track Until the next music
music: none Stops the music
music: default Plays the menu theme
sfx: <id> sound Plays a sound once Until it ends
video: <id> video Plays a video (skippable) Until it ends or is skipped
map: <id> picture Shows a Map button Until the next map
map: none Hides the Map button and removes all layers
map-label: <name> up to 30 characters Names the Map button, like File Until the next map-label or map: none
layer: <id> picture Adds a layer on the map Until removed
layer: <id> off Removes that layer
layer: none Removes all layers
wait: <n>s Holds back the passage That many seconds
input: <var> [keypad [digits]] on a choice Asks the player to type Until ink changes the variable
theme: <colour> <value> colours Changes the tale's colours Until changed or theme: tale
theme: tale Gives the tale's colours back

A tag without : is a note. Unknown tags are ignored.

Backgrounds

bg sets a full-screen background picture.

The mist clears. # bg: village

bg: none clears it. Without a background (or while it loads), the app shows the tale's theme picture, or if there is none, the app's own art.

Pictures and frames

img shows a picture with the line. An optional frame word sets the border. The player can click or tap the picture to zoom in on it, as on a map.

A worn map lies on the table. # img: old-map mat

The six frames:

Frame Look
plain Rounded corners, a shadow, no border.
line A thin line around the picture.
mat A soft mat around the picture (padding, thin line, rounded corners).
double A thin line and a second line outside it. The default when no frame is given.
glow A warm glow around the picture.
print A tilted snapshot on paper, like a photograph.

Pictures are shown at half pixel size (retina). Make them twice as wide as they should appear on screen. The story shows a picture at most 600 px wide, so 1200 px is sharp there. More pixels show only when the player zooms in, and they make the tale bigger to download.

Music

One track at a time, looping. A new music tag crossfades from the current track.

# music: night-theme
The stars come out.
# music: none 5s

On a new game, the first passage cuts to its music (no crossfade from the menu). A tale with music tags, none of them music: default, sets all its own music: the menu theme fades out on its title card over three seconds, and stays off until the tale's first music tag.

Sound effects

sfx plays a sound once, from start to end.

# sfx: door-slam
The door falls shut behind you.

Several sounds can play at the same time. The story cannot stop or fade them. All sounds end when the player leaves the tale. A percentage sets the volume: sfx: rain 30%.

Video

video plays a video over the story. The player can skip it. If the browser blocks autoplay, a Play button shows.

# video: intro

The story continues when the video ends or is skipped.

Maps

map gives the player a Map button in the top bar. It opens the picture in a zoomable, pannable window.

=== harbour ===
# map: harbour-map
Gulls wheel over the quay.

map: none hides the button and removes all layers. Make a map at least twice the display size, so the player can zoom in on details.

Map layers

layer adds a picture on top of the map, as a transparent overlay. Use it for routes, fog of war or details that change during the story, without replacing the whole map.

=== harbour ===
# map: harbour-map
# layer: fog-harbour
The harbour is hidden in fog.
* [Light the beacon] -> beacon

=== beacon ===
# layer: fog-harbour off
# layer: route-beacon
The beacon burns. A path opens through the fog.

Layers stack in the order they are added. layer: <id> off removes one layer. layer: none removes all layers. Make each layer the same pixel size as the map.

Map names

A map can be any picture the player keeps at hand: a form that gets stamps, a case file, a letter. map-label gives its button and window another name than Map, up to 30 characters.

# map: citizen-file
# map-label: Citizen file
Press Citizen file, at the top, to see it any time.

The name lasts until the next map-label or map: none. map-label: none gives back Map. Older copies of the app ignore the tag and show Map.

Pauses

wait holds back the rest of the passage (its remaining text and choices) for a number of seconds. A tag runs before its line shows.

The door creaks open.
# wait: 2s
Something moves inside.

The player cannot skip a wait.

Text input

input goes on a choice, inside the brackets. The player types text, which goes into an ink variable.

VAR code = ""
+ [Enter the code #input: code keypad]
    {code == "1984": The lock opens.|Nothing happens.}

A window opens with a text field, Cancel, Clear and Submit. The player can type at most 100 characters, in any script, not only ASCII: accented letters such as é, other alphabets and emoji all work (Unicode). The 100 counts as browsers do: é counts as one, most emoji as two. Ink compares text exactly, so "Zoë" is not "Zoe", and "Paris" is not "paris". keypad after the variable name shows a tappable keypad picture, and the field takes only digits: as many as the code the ink compares with, here 4. To set them yourself, add a number, from 1 to 20: keypad 6, or keypad 4-8. With too few digits, the window says so and stays open. The variable must be declared as a VAR in the story.

Scene colours

theme changes the tale's colours mid-story, for a dark scene or a red warning. Name only the colours you want changed, each followed by its new value. The others keep theirs.

=== cellar ===
# theme: background 000000 text c9c2b8
The lights go out.
* [Wait] -> still
* [Run #theme: highlight e0483f] -> hall

=== hall ===
# theme: tale
The lights come back.

See story-package-spec.md, section 7, for the full rules.

Back to top

The Offtrail Tales Editor

What you need

A computer. In a narrow window, the text and the preview stack, one over the other. On a phone or narrow tablet, the editor says so and offers to go back to the app. If you use it anyway, it shows the computer layout, shrunk to the screen: pinch to zoom in, drag to move round. The editor is at <site>/editor/. The app's main menu links to it under "Write a tale".

Learn by example

The fastest way to learn is to open the worked example. Press New, then pick The worked example ("No Experience Required"). It is a complete tale with five ink files, pictures and music. Read the code, change things, and watch the preview update. The comments in the story explain what each part does. It uses most elements (scenes, choices, speech, variables, backgrounds, pictures, music and sound effects), except video and maps. Each browser tab holds its own tale, so you can keep the example open in one tab while writing your own tale in another.

The layout

The code editor sits on the left. The right side switches between Preview, Story map and Media. The Theme tab replaces the code editor when open.

Drag the line between the two sides to give either more room. The browser keeps the width. A double click on the line gives back the default. The arrow keys move it too, once it has focus. In a narrow window the two sides stack, and the line goes.

The header bar

From left to right:

Starting a tale

New offers:

Projects and tales

Two kinds of file:

Open takes .otproject, a .zip of a tale's source folder (tale.json, story/ and media/, as an .otproject holds them), or a plain .ink file. It does not take .tale files or an Export for itch.io ZIP: they hold no ink text.

Files are named <title>.<date-time>.<extension> and sort by time.

Your source is standard .ink throughout. Every media tag is a standard ink tag that Inky and inklecate silently ignore. No EXTERNAL functions, no custom syntax. Write here, leave any time, take your files with you.

Both format specifications are on the wiki: story package spec and project file spec.

Where the work is kept

The tale you are editing is stored in the browser's IndexedDB, at the site's address. The editor saves after each change.

Each browser tab holds its own tale (via Web Locks). After a reload, a tab resumes its tale. Closing or navigating away asks when unsaved work, media tasks, or unkept media would be lost.

Safari may delete site data after 7 days without a visit. Save the .otproject regularly. It is the file that keeps your project.

The "Kept in this browser" report (the status button in the header bar) shows the tale's save status, its size, whether the browser has promised persistent storage, and other tales kept in this browser.

The code editor

The editor uses Ace with ink syntax highlighting and folding. Search with Cmd+F (or Ctrl+F on Windows and Linux).

The editor checks the story about 400 ms after you stop typing. Problems show in the left margin and in the problems list below the code. The editor saves the tale to the browser about 800 ms after you stop typing.

Keyboard shortcuts

Shortcut Action
Cmd+Z (Ctrl+Z) Undo.
Cmd+Y (Ctrl+Y) Redo.
Cmd+S (Ctrl+S) Save now (the editor auto-saves, so this forces an immediate save).
Cmd+F (Ctrl+F) Search in the code.

Closing or navigating away asks when unsaved work exists.

File tabs

main.ink is always the first tab. + File adds a new .ink file and its INCLUDE line in main.ink. The close button (x) on a tab removes the file and its INCLUDE. Tabs can be reordered by dragging (except main.ink).

The download button on the active tab saves that single file as .ink text.

Insert toolbar

Buttons for inserting ink patterns at the cursor:

Format (while the text has focus): B, I and BI wrap the selected text in <b>, <i> or <b><i> (something to act on). With nothing selected, they insert the pair and put the cursor between.

Scenes and links: Scene (a knot), Go to (a divert to a scene or END).

In a scene: Choice, Join (a gather), Speech (offers existing speaker names), Media (switches to the Media tab).

More (dropdown): stitch, bold italic (actionable text), pictures and sound tags, map, pause, typed input, variables, conditionals, varying text, notes, and a link to Help.

Problems list

Below the code editor: a count of errors, warnings and notes. Click a problem to jump to its file and line.

The preview

The right side's default tab. An iframe that runs the real game screen: exactly what the player sees. The title card shows on open. The story starts only when you press a key or tap.

After a code change, the preview replays your choices to return to the passage you were on. It suppresses that passage's sounds, videos and waits during the replay. Play passage again replays with sounds. Restart goes back to the title card with new random numbers. Stop mutes the preview.

The choices counter ("N choices in") shows how deep you are.

Story map

A visual graph of the tale's scenes (knots) and their parts (stitches). Each box shows a scene's choices, with arrows to their targets. Dashed boxes are unreachable scenes.

Click a box or a choice row to jump to that line in the code editor. Zoom with the minus and plus buttons. The map reads the ink text directly, so it works even when the story has compile errors.

Media

Drop files anywhere on the page, or use the "add files" button. The file's name becomes its asset ID: Forest Clearing.avif becomes forest-clearing. The asset can be renamed later with the Rename button.

Each media card shows a preview and buttons for inserting tags:

Click a picture's preview to see it whole, in the window where a player zooms in on a story picture.

Rename changes the asset ID. The editor updates every tag in the story that references the old name, and updates the cover and credits if they use it. You can also click the pen icon next to the asset name.

Remove asks first, and shows how many tags in the story use the file. On "Remove", the editor deletes the file and strips every tag that references it from the ink text, including lines that become empty. You do not need to clean up the tags by hand.

Sort by name (A to Z, Z to A) or by type (pictures, sounds, videos).

Media conversion

All conversion runs on your device. Nothing is uploaded. A file already in the right format and within the limits goes in as it is.

A sound may be at most 10 MB and a video at most 200 MB: a longer file is refused before conversion. Split a longer piece into two files yourself: two music tracks crossfade, two video clips play in sequence. These limits keep each file small enough to play on any device. When the tale is hosted, the browser fetches and caches one file at a time, so its total size has no practical limit; an imported tale is stored whole, in the browser. The limits may be raised in a future version.

Pictures Sounds Videos
In PNG, JPEG, WebP, HEIC, HEIF, GIF, BMP, TIFF MP3, WAV, FLAC, Ogg, Opus, AAC, AIFF, M4A MP4, MOV, WebM, MKV, M4V
Out AVIF, quality 60 M4A: AAC, 48 kHz, 128 kbps, stereo at most MP4: H.264 at 5 Mbps, AAC at 128 kbps
Limits 5120 px long edge (scaled down); 2 MB advised 10 MB, about 10 min 200 MB, about 5 min; 1920 px wide (scaled down)
As is AVIF; WebP beside the same AVIF M4A with AAC, no video MP4 with H.264, and AAC or no sound; MOV with H.264 keeps its picture track

Pictures go through libavif (WebAssembly), sounds and videos through the browser's own encoders (WebCodecs). Pictures show at half pixel size: make them about twice as wide as they should appear.

If the browser cannot encode a video's codec, it says so and asks you to convert the file to MP4 with H.264 and AAC first (for example with FFmpeg or HandBrake).

Theme

The Theme tab (the last tab in the code editor) gives the tale its own colour palette and a background picture.

Changes show in the preview immediately.

Tale details

Opened from the title button in the header bar, or before the first Publish.

Back to top

How to publish and host tales

A tale can reach a player in two fundamentally different ways, and the difference matters for large tales:

How creators share a tale

Three channels, from simplest to most involved:

  1. Send a .tale file. Publish in the Offtrail Tales Editor, share the file by email, download link or forum post. The player opens the app, chooses Import tale and picks the file. Nothing to host, nothing to install. Best when the tale is not too large (say, less than 1 GB) and you do not want to run a server. With the offline player app (see Download player), it also plays without a network.

  2. Host your tale. Export for itch.io makes a ZIP of the player app and one tale. Upload it to itch.io or unzip it on any static server. Players open the page and play instantly, with no import step and no file to manage. Best for larger tales, or when you want your own address. The export dialog lets you choose whether players can import other .tale files into the page. itch.io allows 200 MB zipped by default; beyond that, self-host or use another provider. To host several tales as one set, import them on the main site, then choose Player with your imported tales in Download player.

  3. Self-host the full app. Download player saves the player app and the editor as a ZIP. Unzip it on your own server: a classroom, a festival kiosk, a community site. Players import .tale files into it. Best when you want the whole app under your own address (Self-hosting the full app).

Most authors in the interactive fiction community care about writing, not hosting. The app is already live on the web, so the .tale file is the simplest path. Hosting matters when the tale is large, when players should not have to import a file, or when you want your own address.

Where each route works

A hosted tale is an export on itch.io or any web server. Large means over about 1 GB.

Online Offline
Computer Play tale
• Small: a .tale file, or a hosted tale
• Large: a hosted tale
Author tale
• The editor
Play tale
• Small: the offline player app with a .tale file
• Large: a hosted tale on a local server
Author tale
• The full app on a local server
Phone or tablet Play tale
• Small: a .tale file, or a hosted tale
• Large: a hosted tale
Author tale
• No: the editor is made for a computer
Play tale
• No: it needs an app from the App Store or Google Play
Author tale
• No

A private window forgets imported tales when it closes. Safari may delete imported tales after 7 days of use without opening the page, so keep the .tale file. In the editor, a large tale must fit the browser's storage. On a local server, use the same port each time.

A web server should send each media file's type, such as audio/mp4 for .m4a and video/mp4 for .mp4. Most servers do. On one that does not, some browsers play music and video only once the whole file is in.

Download player

Download player in the main menu, on a computer, saves the player app for use without the main site:

A copy made from that ZIP offers no Download player of its own, so every download comes from the main site, in its latest version.

Old and new versions

The main site always runs the newest player app. An older one can be hosted (an exported page, a self-hosted copy, or a tab left open since before an update) or local (the offline player app).

Older player app Newer player app
Older tale Works Works
Newer tale Not always Works

A newer player app opens every older tale. An older player app refuses a tale with a new kind of detail or media, and skips tags it does not understand, so a newer tale may not work there. Then open it in a newer player app, such as the main site.

Publishing

Publish .tale builds a tale file for players.

  1. It asks for the tale details the first time.
  2. It refuses while errors exist.
  3. It plays the tale 50 times with random choices, to catch crashes and missing assets. If no path leads to an -> END or -> DONE, it asks before it goes on, as a tale may be meant to go on without end.
  4. For a tale with pictures, it asks about small copies (see Small copies of pictures).
  5. It packs the .tale file and downloads it as <title>.<date-time>.tale.

Import the file in the app to play it, or share it with others. A .tale is data, not code (see Import a tale).

We have tested tales up to 2.3 GB on a phone. The player's device needs to receive the file first (at 100 Mbps, a 2 GB download takes about two and a half minutes), then the app verifies and stores it (about 20 seconds on a MacBook M2 Pro, similar on an iPhone 14). For large tales, consider hosting instead.

Exporting for itch.io

Export for itch.io does the same checks as Publish, then downloads a .zip with the player app and the tale. Upload it to itch.io as an HTML game, or unzip it on any web server.

The dialog asks for a Menu picture: the app's art, no picture (just the colour), or one of your pictures. It shows on the title screen, and dimmed behind the menu. Menu music: the menu theme (+1.4 MB, Content ID registered), none, or one of your sounds. Your own music also plays wherever the tale would play the menu theme (see music: default).

Include feature: Import tale lets players load other .tale files into the page. For a tale with pictures, Reduced-size picture copies adds small copies (see below). Both start off: the export is your tale on the web, not a player for other tales. The size estimate and the start-up line update as you change the options.

The ZIP holds index.html at its root (the player app), tale.json, the story and every media file beside it, and the app's own pictures and menu music too. The browser fetches each file when it is needed, so a large tale starts as fast as a small one, and a slow phone sees the title screen after about 0.3 MB. itch.io's default limits for HTML5 games are 200 MB zipped, 500 MB unzipped and 1,000 files. The export warns when the ZIP approaches them; itch.io support can raise them.

A page is code, so open it only from a source you trust. To play a tale someone sent you, ask for its .tale file and import that (see Import a tale).

For really large tales (like 1 GB+), host the export on your own server. The server sends each file on demand, so there is no size limit, and the device keeps only the browser's temporary cache.

Small copies of pictures, for slow phones

On a website, the browser loads each picture when the story shows it. Over a slow phone connection, a big picture takes long. Publish .tale and Export for itch.io can add a small copy of each picture for this: tick Reduced-size picture copies. It starts off.

Self-hosting the full app

Full app with editor in Download player saves the whole app as a ZIP: the player app and the editor, with no built-in tales on its menu. Players import .tale files into it. To ship your own tales built in, tick them under Full app with editor (see Download player).

On your own computer: unzip it, run python3 -m http.server 8080 --bind 127.0.0.1 in the folder, and open localhost:8080. Only this computer can reach it. Use the same port each time, as the browser keeps tales and drafts by address. On a Mac, the first python3 asks to install Apple's command line tools, which needs a network. Windows needs Python first.

On a web server, such as a school, club or festival site:

To update, download the ZIP again from the main site and replace the files. Players keep their tales and saves, as the address stays. A self-hosted copy offers no Download player of its own.

Fingerprints

Publish and Export for itch.io show the tale's fingerprint, such as A8B8-DB05-AF77-E217-3323. It names exactly this tale: change any word, picture or sound, and the fingerprint changes. So it tracks the tale's integrity, and lets you recognise your tale wherever a copy turns up.

Post it where your players trust you, such as your web page or your itch.io page, next to the file. An imported tale shows its fingerprint on its card in the main menu. If it is not the one the author posted, the tale was changed on the way: remove it.

The fingerprint checks the tale, not a page around it. An exported page that you open directly shows no fingerprint, because a changed page could show any fingerprint it likes.

Back to top

Accessibility

Back to top

Licence

The app and editor are MIT-licensed. Tales you make are yours, under whatever licence you choose. The app claims no rights over your content.

Back to top