Skip to content

v0.2.1

Choose a tag to compare

@kefiiiiir kefiiiiir released this 31 Aug 09:53
· 5 commits to main since this release

VNengine v0.2.1

VNengine now builds and ships as a desktop app, not a browser tab — and the
diagnostics you used to have to dig for in F12 come straight to your terminal.

Highlights

Native window

playtest and every packaged build open the game in its own window via
pywebview (WebView2 on Windows) — no browser
chrome, no address bar, no tab. The HTTP server runs on a background thread and
shuts down when you close the window; there's no separate Ctrl+C step.
VN_NO_BROWSER=1 still serves headlessly, and if pywebview isn't installed it
falls back to opening your default browser.

Boot diagnostics in the playtest terminal

A ~60-line dev shim (tools/devlog.js) is injected into index.html only when
playtest.py has a console
(source runs, or a development build). It forwards
console.*, uncaught errors, and failed image/audio loads to the terminal, which
renders them grouped and colour-coded — errors red, warnings amber, one green
"no problems found" on a clean boot. Never referenced by index.html, never in a
shipping build; the real F12 console still works.

Two build profiles

The packager now asks for a profile:

profile runtime for
development --console testing — console window streams diagnostics next to the game
shipping --windowed release — no console, no dev shim, index.html untouched

Each profile has its own cached frozen runtime (keyed on a hash of
playtest.py), so switching profiles doesn't force a rebuild of the other.

index.html moved into the .pak

Packaged output is now just <Project>.exe + <Project>.pak — the HTML is
inside the archive, so there's no loose file for a player to edit.
project.json rides along too, and the window is titled from it (falling back to
the <title> in index.html). Old builds with a loose index.html still run
(disk fallback preserved).

In-world confirmation dialogs

"Erase save?", "Return to menu?", and checkpoint-jump prompts are now themed
in-engine modals — no more browser confirm() boxes reading "localhost:8000
says". Escape or a backdrop click cancels; destructive actions get a red button
with focus defaulting to Cancel; respects prefers-reduced-motion.

setup installs the toolchain

After scaffolding, setup offers to pip install the two packages a project
needs: pywebview (play/ship window) and pyinstaller (packager).

New dependencies

  • pywebview — required for the native window (graceful browser fallback if absent)
  • pyinstaller — required only for packaging

setup installs both on request; otherwise: pip install pywebview pyinstaller.

Upgrading an existing project

Projects are copies of the engine, so they don't auto-update. Either re-scaffold
with the new setup, or copy these into your project and reload:

  • playtest.py
  • tools/devlog.js (new file)
  • tools/projectpackager-windows.py
  • tools/projectpackager-tools/build-runtime.py
  • merge the js/engine.js + css/style.css changes (in-world dialogs)

Existing packaged .exe builds keep working unchanged.

Assets

  • VNEngine-Dist.zip — extract, run setup.exe (Windows)
  • Source: git clone, then python setup.py

Known rough edges

  • First frozen build per machine can take ~a minute (PyInstaller cold start).
  • A mis-bundled pywebview falls back to the default browser rather than erroring.
  • Only a single .pak beside the .exe is supported.
  • Tooling is Windows-first; running from source on macOS/Linux is untested.