quest'n'click 4.5.0 · r1

Built for quest'n'click 4.5.0, revision r1. Whether it is published, and which one is current, is recorded at publication.json.

Upgrade

Français · Type: how-to · Audience: author · Context: created project · Status: ready · Applies from: 4.3.0

Moving a game to a newer engine is three commands: install the new engine, migrate, verify. This page gives them with the checks around them, for a created project first, then for a game inside the engine repository and on a hosted Studio.

In short

# in the created project
npm install https://github.com/wanoo/quest-n-click/releases/download/v<version>/quest-n-click-<version>.tgz
npx quest-n-click migrate
npm run verify

Once the engine is on npm, the first line is npm install quest-n-click@<version>. Read the upgrade notes of each version you cross first; the rest of this page is the same procedure with its checks.

What you get

Your game on the new engine version: its sources at that engine's authoring format, checked by verify, its players' saves still loading.

Context and versions

Prerequisites

Where to run the commands

In the created project's folder, on your machine.

Steps

  1. Commit the project as it is, so the upgrade is one reviewable change:

    # in the created project
    git add -A && git commit -m "Before the engine upgrade"
    
  1. Install the new engine. Today, from the release archive (the engine is not on npm: Install from npm, once published):

    # in the created project
    npm install https://github.com/wanoo/quest-n-click/releases/download/v4.4.0/quest-n-click-4.4.0.tgz
    

    Once the engine is on npm, this step is npm install quest-n-click@<version>.

  1. Bring the sources to the installed engine's format. --check first says what is due and writes nothing:

    # in the created project
    npx quest-n-click migrate --check
    npx quest-n-click migrate
    

    migrate does, in order: makes tsconfig.json acceptable to TypeScript 7 (drops baseUrl, the paths made relative, 4.1.8); renames what still says web-scumm (imports, tsconfig.json, package.json's commands, 4.3.0); then, for a game still on authoring schema 2, writes its stable ids (ids --write --map) and prints what is left to do by hand. A game already on schema 3 gets ✔ [<id>] authoring schema 3: up to date with this engine.

  1. If migrate renamed package.json, install again: npm install.
  1. Check the game, then rebuild its assets if the notes ask for it:

    # in the created project
    npm run verify
    npm run assets
    
  1. Load a save made before the upgrade. In npm run dev, continue from an autosave or a slot, or import an exported save from the pause menu, and play on.
  1. Build: npm run build, then commit the upgrade.

Guarantee · migrate-check-says-due · referenced · executed on aff6caab7514 · scope self-checked by the author (AI), not reviewed migrate --check on a game still at authoring schema 2 exits with code 1 and says authoring schema 2: a migration to 3 is due.

The test runs it on a schema-2 fixture. That nothing is written is read in the code (--check exits before the ids are written); the test does not assert it.

Players' saves

Expected result, and how to check it

npx quest-n-click help prints the new version on its first line. npx quest-n-click migrate --check exits 0. npm run verify passes. An old save loads and plays on.

Common errors

SymptomCauseFix
npm error 404 Not Found - GET https://registry.npmjs.org/quest-n-clicknpm install quest-n-click@<version>: not on npmInstall the archive's URL (step 2)
✖ tsconfig.json has baseUrl, which TypeScript 7 refuses: a migration is dueA project made before 4.1.8npx quest-n-click migrate
✖ still under the former name web-scumm: …A project made before 4.2.5npx quest-n-click migrate, then npm install (Coming from web-scumm)
✖ [<id>] authoring schema <n> is newer than this engine's (3): install a newer quest-n-clickThe game was written for a newer engineInstall that engine, not an older one
An import of web-scumm/content (or another web-scumm/…) no longer resolvesImports under the former name, gone in 4.3.0npx quest-n-click migrate

Files or data changed

package.json and package-lock.json (the engine's version); what migrate rewrites: tsconfig.json, package.json's scripts, the game's sources (imports, and stable ids for a schema-2 game, with ids.migration.json and ids.paths.json); public/assets/ after assets. Players' saves stay in their browsers: nothing on your side rewrites them; the new engine reads them.

Recovery or going back

Before the release goes out: git reset --hard to the commit of step 1, then npm install to put the old engine back. After players have played on the new version, going back is not supported: their saves may already be in a format the old engine does not read.

A game inside the engine repository

In the engine repository the engine is the checkout itself: move it to the new version (git pull, or git checkout v<version>), then:

# at the root of the engine repository
npm ci
GAME=<id> npm run migrate -- --check
GAME=<id> npm run migrate
npm run verify:game

A game on a hosted Studio

The owner upgrades a hosted game's engine from the Studio (POST /api/engine/migrate): the migration runs on the worker, is judged like a revision, and is written as one undoable operation, or refused (422) with nothing written: Upgrading the engine of a hosted game. Upgrading the server itself is Upgrading the server.

References


Edit the source of this page · Report an error