Posts

Monogatari v2.9.0

Download Link: monogatari-v2.9.0.zip

v2.9.0 is the biggest fix release Monogatari 2 has had. While rewriting the documentation, every page was checked against the engine itself, and that turned up problems in every corner of it, from games that froze after a typo to music that didn’t play when a game was opened from its file. This release fixes them, each one with a test that fails without the fix.

Your script, your settings, your styles and your players’ saves keep working: nothing was renamed or removed, and for most games upgrading means replacing one folder.

Yui and Mio in front of the Palacio de Bellas Artes, in four moments of the Start Here tutorial
The new Start Here tutorial, "After the Bell", with art by Queen BeeBee

๐Ÿ’œ Support Monogatari

Monogatari is free, open source, and built in the open: releases like this one are powered by the people who chip in to keep it going. If the engine helps you bring your stories to life, please consider sponsoring its development:

๐Ÿ“ฐ Release Change Log

๐ŸŒŸ Highlights

๐Ÿ›Ÿ A mistake no longer freezes your game

In 2.8, any statement that failed, like a jump to a label that doesn’t exist, left the game stuck on that line. In 2.9.0 the statement shows its error dialog, the next click goes on with the statement after it, and Back steps over it:

'y Come on, the lamps are about to come on!',
'jump Lamps', // There's no label called Lamps
'm Looks like that label isn\'t written yet...',

On the left, an error dialog titled The label "Lamps" does not exist over the game; on the right, Mio's next line with Yui and Mio in front of the palace
The dialog names the missing label and the ones you may have meant. One click later, the story goes on.

Problems that used to be silent open a dialog while you develop, too: an object statement no action knows (a misspelled Choice), a label that runs out of statements without an end or a jump, a jump to an empty label, an endless loop of jumps, and a wait whose time isn’t a number. A typo in any of your .js files opens one dialog that names the file and the line, where 2.8 left a blank page. Diagnosing Errors lists every dialog by its title.

โช Back undoes exactly what happened

Going back now undoes exactly what each statement did, for choices, music, sounds, videos, particles, the gallery, the text box, images, backgrounds, canvases and NVL pages. In 2.8, some of these brought back things that were never there, or removed more than they should. Back from the line an option showed returns to the choice menu and runs its onRevert.

๐Ÿ’พ Saves you can count on

  • Saves made with 2.8 load in 2.9.0, and going back from them works.
  • A new game starts from what js/storage.js declares, instead of carrying over variables from the last game or an older save.
  • Loading a missing slot, or a save made at a label your script no longer has, leaves the game as it was (2.8 emptied the screen).
  • monogatari.upgrade() works with IndexedDB, the starter game’s storage.
  • Lowering your Version or changing your Store no longer hides your players’ saves. The game keeps using them, and a dialog tells you what to change back.
  • Every save made in one visit to the save screen keeps its picture, and autosaves fill empty slots first, then the oldest.

โฉ Skip and auto-play

The quick menu’s Skip button and the S key turn skipping on and off whenever the Skip setting is above 0; in 2.8 they did nothing. Auto-play stops the moment the player turns it off, and a double click moves the game forward once.

๐Ÿ”Š Audio that plays

  • A game opened from its file, with no server, plays its music, sounds and voices. Audio effects still need the game to be served.
  • A missing or misspelled audio file no longer stops the game: a dialog names it while you develop, and the game goes on without it.
  • The delay, chorus, phaser, ringmod and autowah effects change the sound. In 2.8 they did nothing, so a game that used them will now hear them.

โœ๏ธ A typing cursor, and effects on every line

The new TypingCursor setting shows a blinking cursor after the last typed letter:

// js/options.js
'TypingCursor': true,

Style it with --cursor-blinker, --cursor-speed and --cursor-easing (see Type Writer). Text effects also show on lines that appear at once, and the effects that reveal letters start as each letter is typed.

๐ŸŒ Translations and right to left

  • monogatari.translations(object) adds strings to a language instead of replacing all of them.
  • A string a language lacks shows in English, and a missing language opens one dialog instead of one per string.
  • <html lang> and <html dir> follow the game’s language, so a game in Arabic is laid out right to left.

๐ŸŽจ Interface

The gallery screen with one unlocked picture of the palace and one locked card, next to the credits screen with Story and Thanks sections
Gallery pictures show again, and the credits screen is laid out as a centered column.

  • Gallery pictures show. In 2.8 their cards had no width, so unlocked pictures were invisible.
  • The credits screen is laid out as a centered column, roles on the left and names on the right.
  • The loading bar fills as the files load.
  • Messages, alerts and the name prompt are narrower on wide screens, and the quick menu’s icons are 24 pixels (they were 16).
  • Fifteen new CSS variables reach colors that used to need a selector of their own. Nothing changes until you set them:
/* style/main.css */
:root {
  --text-box-text-color: #fff7e6;
  --choice-text-color: #fff7e6;
  --modal-background-color: #fdf6ec;
  --loading-bar-color: #c28cf0;
}

The full list is on CSS Variables.

โ™ฟ Accessibility

Screen readers read every new line with its speaker, sprites by name and expression, and the name of every button and slider. The starter game allows pinch zoom on phones (Accessibility shows the one-line change for your own index.html), and the message asking players to rotate their phone has an OK button.

๐Ÿ–ฅ๏ธ Desktop apps

  • FileSystem storage works in both the Electron and the Electrobun apps: saves are files in the app’s data folder.
  • Links to websites open in the player’s browser. In 2.8, Electron asked whether to quit the game.
  • The Electrobun app shows your game’s name as its title, and lists window sizes in the settings.
  • The starter’s package.json runs without Yarn, builds the Linux app and makes a smaller Electron app. Releasing for Desktop lists the lines to copy into yours.

๐ŸŒ Offline play on the web

With the new service-worker.js, a game in a sub-folder of a website (itch.io, GitHub Pages) plays offline, players get the scripts and stylesheets you change on their next visit, and two games on one website keep their offline copies apart.

๐Ÿ”„ Live reload while you work

Serve your game with bun run serve and the page reloads by itself each time you save a file, showing the change, a replaced picture or sound included. In 2.8 it never did: the starter’s own security policy blocked the reload. Open Your Game shows how to start the server.

๐Ÿ“š New documentation, and art you can use

The docs at monogatari.io/v2 were rewritten and checked against the engine, from a Start Here tutorial that goes from the downloaded zip to a story shared online, using only a browser and a text editor, to a reference for every action, component, setting and engine method, and a path for people who want to work on Monogatari itself.

The tutorial and the docs use art by Queen BeeBee: the Palacio de Bellas Artes at four times of day, and Yui and Mio, remade from their original files. Two downloads bring them to your own projects:

Mio and Yui as layered sprites in front of the palace; in the second picture, Yui grins
Layered sprites from the character download: one statement, show character y:mouth grinning, changes Yui's mouth and nothing else.

IMPORTANT

The art isn't covered by Monogatari's MIT license. It comes with its own terms, in TERMS.txt in both downloads: use it to learn and in games you give away for free, always credit Queen BeeBee with a link to her page, and never use it with AI or in anything that makes money. The FAQ has the details.

โš ๏ธ Changes You Might Notice

None of these need a change in your game, but they can make it look or behave a little differently:

  • A variable’s value shows as text. If a player types <b>Kim</b> as their name, the line shows the tags instead of a bold name, so nothing a player types can change your page. If your own variables hold HTML on purpose, turn it back on:
// js/options.js
'AllowHTMLInVariables': true,
  • A {{variable}} that doesn’t exist shows in the line as written. 2.8 emptied the whole line.
  • Variables the game never declared are removed when a game ends or a save loads. Declare every variable in js/storage.js.
  • The Text Speed slider is faster to the right. Players’ saved speeds don’t change.
  • The wave effects lift the letters. If you set a negative --effect-wave-amplitude to make them rise, use a positive value now.
  • Centered lines have a box, with white text on the main color. For the 2.8 look, add centered-dialog { background-color: transparent; color: var(--text-color); } to style/main.css.
  • Your game shows more error dialogs while you develop, one for each problem 2.8 kept quiet about. Each one points at something to fix in your script.

๐Ÿงฉ For Extension Authors

  • monogatari.configuration({ part: { โ€ฆ } }) changes the configuration, and a menu on screen redraws when its configuration changes. Menu methods like addButton() work anywhere in your files, not only after init().
  • onSave() on actions and components runs after every save.
  • A didApply() that returns nothing waits for the player instead of throwing.
  • Preloading fires a new assetFailed event for each file that fails, and didPreloadAssets always fires.
  • Component.get(id) and instance(id) find elements by data-instance, and a component registered for a tag that’s already in use keeps the first one.
  • The engine no longer writes into your script’s statement objects.
  • TypeScript projects can import the engine’s types from @monogatari/core (TypeScript 5.0 or later).

๐Ÿ“ฆ Misc

  • The console no longer shows “Lit is in dev mode”: the engine bundles Pandora 0.5.1, built for production, and is about 8 KB smaller.
  • Without the debug file, a released game’s console only shows errors and warnings.
  • The error dialogs’ help links point at the docs and GitHub instead of the old community forums.
  • The engine’s code follows one formatting style, checked on every build, and the continuous integration checks that the committed bundles match the source.
  • The npm package has been updated to 2.9.0.

๐Ÿงพ Every Fix

Here is everything 2.9.0 fixes, area by area, the highlights above included. Open an area to read it.

The game keeps goingMistakes in a script, clicks and controls
  • A statement that fails, like a jump to a missing label, a missing character or sprite, or hiding something that isn’t shown, opens its error dialog, and the next click goes on with the statement after it. In 2.8 the game stopped there, and only Quit still worked.
  • A function statement that throws no longer holds the game.
  • A didApply() that returns nothing waits for the player instead of throwing.
  • Two clicks in the same instant advance one statement instead of two, and two Backs go back one.
  • A label that runs out of statements, with no end or jump, shows an error at its end.
  • A jump to an empty label shows an error, and an endless loop of jumps stops with one instead of freezing the page.
  • Skip works: the quick menu’s button and the S key turn it on and off when the Skip setting is above 0.
  • Stopping auto-play stops it at once. In 2.8, one more statement went by.
  • Clicking a button with a data-action inside the game screen no longer advances the game too.
  • Moving the Text Speed slider while a line was typing no longer freezes the game.
  • wait reads its time after extra spaces ('wait 500'), and a time that isn’t a number shows an error instead of waiting for a click.
  • vibrate in a browser that can’t vibrate, and show notification in one without notifications, go on instead of holding the game, and a notification no longer waits for the player to answer the permission prompt.
Going backBack undoes exactly what each statement did
  • Going back past the first show scene or show background clears it, and its duration too.
  • Going back past one copy of an image removes that copy only, and going back over hide image brings back every copy it hid.
  • Going back over show textbox hides the text box only if it was hidden before, and going back over a hide textbox that found it hidden keeps it hidden.
  • Going back over gallery unlock only locks a picture that statement unlocked.
  • Going back over hide particles or hide video only brings back what was showing, and videos no longer appear twice.
  • Going back past a second particles restores the first system instead of removing every particle.
  • Going back while a modal or immersive canvas waits removes it, going back past a canvas its own code hid works, and going back over hide canvas shows the canvas again in its own mode.
  • Going back over show canvas removes and forgets only the most recent canvas with that name and mode.
  • Music: going back past a plain play resume no longer pauses tracks that were never paused, going back past a second play of a playing track no longer stops it, and going back past a stop no longer brings a paused track back playing.
  • A video shown with its mode left out is forgotten when going back.
  • Going back from a statement that waits after an NVL line keeps that line on the page. The dialog log stays in step on NVL pages, and a load followed by Back no longer empties the NVL box.
  • Going back from the first line of a label that a function statement jumped to stays on that line, without running the function again.
  • A function statement’s Reverse works after a load.
Choices, conditions and inputsPicks you can take back, and fields that behave
  • A choice whose options are all hidden is passed over, instead of showing an empty menu that never goes away.
  • A choice option whose Do is an object, or is missing, no longer leaves the game waiting.
  • A choice with two or more options that have their own Condition no longer locks the game after the pick.
  • Back from the line an option’s Do showed returns to the menu, runs onRevert and forgets the pick, so picking again runs onChosen once.
  • An option whose onChosen has no onRevert can’t be gone back past, every time. In 2.8, Back showed the menu again with the first pick’s changes still in place.
  • Back from an option whose Do failed shows the menu again, with onRevert run.
  • A save made on the line an option’s Do showed loads on that line, instead of on the menu with the pick kept.
  • Going back to a menu that was on an NVL page keeps the page’s lines.
  • Disabled options look disabled.
  • A Conditional with no branch for the result goes on to the next statement, and an error in the branch it ran no longer runs the other branch too.
  • An input whose Validation returns neither true nor false shows an error, instead of leaving the player stuck.
  • Date, time, range and telephone inputs start on their Default.
Saves and storageSaves you can count on
  • A new game, and every save you load, start from what js/storage.js declares: variables the game added without declaring them no longer carry over.
  • Loading a missing slot, or a save made at a label your script no longer has, leaves the game as it was, with an error dialog while you develop. 2.8 emptied the screen and left the wait cursor on.
  • monogatari.upgrade() works with IndexedDB, the starter’s storage, and from any of your files, after preferences() too. In 2.8 it left a blank page, or never ran.
  • An upgrade in one tab no longer waits for the game’s other tabs to close: they let go of the storage and ask the player to reload.
  • A Version set lower than before, a Version of 0.0.0, or a changed Store no longer hides your players’ saves. The game goes on with the data they have, and a dialog says what to change back.
  • A Name with no Latin letters or digits, like ็‰ฉ่ชž, gets a storage name of its own, so saves work. LocalStorage saves a 2.8 game made without a name prefix are copied over once.
  • Every save made in one visit to the save screen keeps its picture, and an autosave no longer takes a manual save’s picture.
  • Autosaves fill empty slots first, then the oldest, across visits. They only save while the game is being played, and get a readable name.
  • Slots show their date as players read it, and saves from v1.4.1 no longer say “Invalid DateTime”.
  • When the storage can’t open, one dialog says why, without a second one from the save list.
  • FileSystem storage runs its upgrade functions, and in a browser its dialog says it needs a desktop app.
  • The Screenshots setting no longer claims it needs IndexedDB: save pictures work with every storage.
Music, sound and videoAudio that plays, and videos that let go
  • A game opened from its file plays its music, sounds and voices. Their audio effects apply when the game is served.
  • Opened from a file, preloading skips audio instead of logging a failure for every track, and Chrome no longer logs worklet errors.
  • A missing or misspelled audio file, or one that can’t be decoded, names itself in a dialog while you develop, and the game goes on without it.
  • The delay, chorus, phaser, ringmod and autowah effects change the sound. In 2.8 they did nothing.
  • Resuming paused music with a fade fades it in.
  • play music for a track that’s already playing keeps its loop, and a save restores the track once, even a 2.8 save that held it twice.
  • A load restores a paused track paused, without playing it first.
  • play music with โ€ฆ and stop music with fade โ€ฆ without a track name no longer store a track called “with”, so saves and Back treat them right, and stopping several tracks fades them out together.
  • A misspelled kind (play musik theme, stop musik, pause musik) shows an error instead of crashing, and a named pause of a track that isn’t playing no longer fails.
  • A name in a preload block that was never declared with monogatari.assets() is reported instead of skipped.
  • Videos: the mode can be left out (show video intro with close), a modal video with close no longer skips the line behind it, and immersive and fullscreen videos without close let the player move on once they end.
  • hide video on a modal, immersive or fullscreen video lets the game go on, and hide video rain fadeOut plays fadeOut.
  • A video that fails to load, from an undeclared name or a missing file, no longer holds the game.
  • Removing a media player no longer makes the browser request the page itself as media.
Scenes, characters and imagesColors, sprites and their animations
  • A color with an animation (show scene black with fadeIn, show background red with fadeIn) shows the color, and with no longer ends up as a class.
  • hide character and hide image with a class that isn’t an animation remove the sprite at once, instead of leaving it on screen.
  • end- animations keep their whole name (end-shake-hard), and work for images too.
  • An image whose name ends in “at” followed by more words gets the right position.
  • A character with no sprites, or show character with no name, shows an error dialog instead of a TypeError.
  • A character whose id is also an action’s word gets an error dialog while you develop.
  • A default_expression without expressions is used as the side image’s file, and the line shows. Preloading no longer asks for it as a file for every character.
  • Layered sprites (experimental) are no longer cut in half, and keep their size and place when a layer changes.
  • Layer exit animations and end- classes play, and a layer you removed stays gone.
  • A layer missing from layer_assets, or listed there but not in layers, shows an error instead of throwing or never being drawn.
Canvas, particles and effectsEffects that come and go cleanly
  • A text box hidden with hide textbox shows again in the next game.
  • gallery unlock of a picture already unlocked no longer adds it twice.
  • show canvas stars with fadeIn works without a mode, and each show gets its own copy of the canvas’s nested state.
  • A modal canvas can be clicked: the particles layer no longer covers it.
  • hide canvas stops, removes and forgets one canvas when an object was shown twice, takes classes written without with, and removes the canvas at once when its class animates nothing.
Text and typingEffects, markers and variables in your lines
  • Text effects show on lines that appear at once, with typing off, and when the player clicks to finish a line.
  • Effects that reveal letters (fade, blur, scale, slide, glitch-hard, invisible ink, handwriting, strike, flicker, staticโ€ฆ) start as each letter is typed, instead of showing the text early.
  • The wave effects lift the letters, and --effect-reveal-duration sets how long the reveal effects take.
  • Icons in a line show while it types.
  • A marker after an HTML tag runs where it is in the line, and two markers side by side run once each.
  • didStartTyping fires once per line.
  • A TextSpeed set from code keeps working after the first line, and the Text Speed slider no longer drops a showCursor set in the type writer’s configuration.
  • The Text Speed slider is faster to the right. Players’ saved speeds don’t change.
  • The new TypingCursor setting shows a blinking cursor after the last typed letter, and --cursor-color follows the text color.
  • Centered lines have a box, with white text on the main color.
  • The dialog log’s narrator style applies.
  • A {{variable}} that doesn’t exist shows in the line as written. 2.8 emptied the whole line.
  • A variable’s value shows as text, so nothing a player types can change the page; 'AllowHTMLInVariables': true brings back values as HTML. A value that refers back to itself stops with an error instead of overflowing the stack.
Translations and right to leftEvery language, both directions
  • monogatari.translations(object) adds strings to each language, instead of replacing the language’s whole table.
  • A string a language lacks shows in English, and a missing interface language opens one dialog instead of one per string.
  • _(Key) markers work side by side and inside parentheses.
  • A message’s actionString works and survives a language change, and so do the quick menu’s swapped labels.
  • The settings screen’s language list follows the language selection screen.
  • Removing a language no longer leaves the players who picked it with a blank page: they get the game’s Language.
  • The save-name placeholder is translated, with the new SaveSlotName string.
  • Deutsch, Nederlands, ๆ—ฅๆœฌ่ชž and ็ฎ€ไฝ“ไธญๆ–‡ have the strings that were still in English, and so does Espaรฑol’s AllowPlayback.
  • <html lang> and <html dir> follow the game’s language, so a right-to-left game is laid out right to left.
  • With rtl, the text box’s line is right-aligned, the side image is no longer mirrored twice, and the screens’ back button sits at the top right.
  • The side-image--non-independent and side-image--unconstrained classes do what they say.
Interface and styleScreens, menus and the stylesheet
  • Gallery pictures show. In 2.8 their cards had no width.
  • The credits screen is laid out as a centered column, and a section written as text keeps its heading and its variables, shown as text.
  • The loading bar fills, counts each file once, and sits in the middle of the screen.
  • The help screen no longer lists an A key, and leaves out Skip and Back when your game turns them off.
  • Main-menu buttons without an icon no longer get icon="undefined", and menu labels can be plain text as well as translation keys.
  • Menu changes (addButton() and the others) work anywhere in your files, and configuration('main-menu', โ€ฆ) or component('main-menu').configuration('buttons', โ€ฆ) changes the menu on screen.
  • The settings screen shows preferences the game changed after it started, sets itself up when it’s added later, and keeps its volume sliders in step.
  • A screen’s button for a screen that isn’t in index.html shows an error instead of an empty page.
  • The labels of alerts, messages and the name prompt can be plain text as well as translation keys.
  • monogatari.alert() works before init(), and dismissing one alert leaves the others open.
  • Messages, alerts and the name prompt are narrower on wide screens, and error dialogs show above them.
  • The quick menu’s icons are 24 pixels (they were 16).
  • Fifteen new CSS variables reach colors that used to need a selector of their own, the bars at the top of the game included.
  • On a phone held the wrong way for your Orientation, the rotate message has an OK button.
  • Kayros’s .margin class has its unit.
  • The rules in the starter’s style/main.css match what the engine draws.
AccessibilityFor players with screen readers, keyboards and small screens
  • Screen readers read every new line with its speaker.
  • Sprites are described by name and expression.
  • Every button, slider and list has a name, the screens’ back buttons and the quick menu included.
  • The gallery’s back button works from the keyboard.
  • The starter’s index.html allows pinch zoom.
Error dialogs and the consoleOne clear dialog per mistake
  • The debug file turns the dialogs on by itself, so they show even when js/main.js never sets a debug level.
  • A typo in one of your .js files opens one dialog that names the file. A typo in js/main.js no longer leaves a blank page, and one in js/script.js no longer adds a second dialog about the Start label.
  • Errors that happen together all show, wherever the game is hosted, not only on your own computer.
  • “An Unknown Error Occurred” also covers errors after the page loaded.
  • Dialogs that opened before their texts loaded show their real title and message.
  • Details read well: elements show as markup, lists, functions and classes by name, and text from your script as written, never run as HTML.
  • An error a statement finds while it’s being prepared names the statement instead of “undefined”, and Back doesn’t show it again.
  • The statements in the dialogs are highlighted, and their texts are corrected (“does not exist”, “occurred”, an apply error that says “apply”).
  • Without the debug file, a released game’s console only shows errors and warnings, even at debug level 5.
  • Help links point at the docs, Discord and GitHub instead of the old forums and Twitter, and the starter’s help message links the v2 docs.
  • The console no longer shows “Lit is in dev mode”: the engine bundles Pandora 0.5.1, built for production, and is about 8 KB smaller.
  • When offline play is off, the console says why (opened from its file, or plain http) instead of pointing at a Chrome app that no longer exists.
Desktop appsElectron and Electrobun
  • FileSystem storage works in both apps: saves are files in the app’s data folder. In 2.8 it hung the game at boot.
  • Links to websites open in the player’s browser. In 2.8, Electron asked whether to quit the game.
  • The Electrobun app talks to its window: it shows your game’s name as its title and lists window sizes in the settings.
  • The engine’s default Resolution is '1280x720', so a window with ForceAspectRatio set to 'Global' opens at 16:9.
  • The starter’s package.json runs without Yarn, builds the Linux app, keeps Electrobun out of the Electron app (which makes it much smaller), and makes a release build of the Electrobun app.
  • Notarizing on a Mac passes the teamId it needs.
  • A second Electron window, on macOS after closing the first, no longer adds a second set of handlers.
  • electron-builder no longer warns about desktopName, so Linux matches the window to its app.
The web and the dev serverOffline play, updates and live reload
  • A game in a sub-folder of a website (itch.io, GitHub Pages) installs its service worker and plays offline.
  • Players get the scripts and stylesheets you change on their next visit, and pictures or sounds you replace under the same name by their second.
  • Two games on one website keep their offline copies apart.
  • The offline page says the player is offline, instead of “under maintenance”.
  • bun run serve reloads the page each time you save a file, and serves file names with spaces.
  • Firefox no longer warns about the starter’s Content-Security-Policy.
For extension authorsYour own actions, components and code
  • monogatari.configuration({ part: { โ€ฆ } }) changes the configuration. In 2.8 it changed nothing.
  • onSave() runs after every save, and fn(name) reads without overwriting what was stored. interrupt(), the static match(), _priority and _events, which the engine never used, are marked deprecated.
  • Component.get(id) and instance(id) find elements by data-instance, and Component.configuration('key', value) sets one key on any component.
  • Registering a component for a tag already in use keeps the first one instead of adding a second.
  • unregisterComponent() before setup keeps the experimental components.
  • Built-in components and actions have their engine from the start, so their helpers work before init().
  • setup() gets its selector, loadingOrder sorts as numbers, and a menu’s template() survives a configuration update.
  • Preloading fires a new assetFailed event for each file that fails, and didPreloadAssets always fires.
  • The engine no longer writes into your script’s statement objects.
  • TypeScript: the engine’s types are exported from @monogatari/core, registerAction() takes a subclass of Action in strict mode, and the doc comments of preferences() and registerAction() are corrected.
Building, testing and the packageFor people working on Monogatari itself
  • The npm package ships only the starter game’s files, not a leftover zip or desktop build.
  • The build uses the project’s own TypeScript, and the watch build rebuilds the right file and watches the CSS.
  • bun run test runs the Cypress specs in Chrome or Chromium.
  • The specs that failed on a clean checkout pass, and the save screenshots spec really tests LocalStorage.
  • CI checks that the committed bundles match the source.
  • The code follows one formatting style, two-space indentation included, checked on every build.
  • Comments in the type writer describe the marker syntax it reads today.

How To Upgrade

If you’re on v2.8.0 or v2.8.1

  1. Keep a copy of your game folder, so you can go back to it.
  2. Download the starter game and replace your game’s engine/core/ and engine/debug/ folders with its own.
  3. If your game is on the web, copy the starter’s service-worker.js into your game too. At its top, set NAME to your game’s name again, and add back any file you had added to the FILES list.
  4. If you serve your game with bun run serve, copy the starter’s serve.ts into your game too, for the automatic reload.
  5. If you release desktop apps, also copy the starter’s engine/desktop/, engine/electron/ and engine/electrobun/ folders.
  6. Play your game from the start with the debug file loaded: a dialog that’s new to you points at something to fix in your script.

Using npm? Run npm install @monogatari/core@2.9.0.

The Upgrading from 2.8 page lists every change a game could notice, area by area.

If you’re on an older v2.x.x version

Follow the steps above, and read the 2.8.0 release notes first: 2.8.0 changed how text effects close, and how custom actions block the game.

If you’re on v1.4.1 (stable) or below

If you’re upgrading from a game built on v1.4.1, we recommend reading the Upgrade Guide first: the jump to v2 is a big one.

Code changes: v2.8.1…v2.9.0