@drincs/pixi-vn

中文文档
1.9.9发布于 2026/11/06LGPL-2.1TypeScriptESM + CJS近 30 天下载 2647

Pixi'VN is a very versatile and powerful game/story-driven engine.

原始使用文档
文档目录7 节
  1. Templates
  2. Distribution
  3. Wiki
  4. Prerequisites
  5. Installation
  6. Initialize
  7. Agent Skills

Pixi’VN - PixiJS Game Engine

pixi-vn-cover

npm version npm downloads per month jsDelivr hits (npm) NPM License Discord

Pixi’VN is a very versatile and powerful story-driven engine. It is based on JavaScript/TypeScript and PixiJS, and supports animated characters through Spine 2D and Live2D.

Pixi’VN aims to be an innovative and fast engine, and puts a strong emphasis on AI-assisted development: an AI agent can start your game, gain all the knowledge it needs about your project through Agent Skills, and test the game by launching it in a browser — with the ability to keep driving it from the outside while it plays.

You can use narrative languages that are able to take full advantage of the engine's features, as well as any custom features you add to your project. Currently supported:

Templates

For a quick start, various project templates are available, built with React. Less experienced developers can use these templates without much knowledge of JavaScript/TypeScript.

  • Visual Novel: a classic dialogue-driven experience, with characters, backgrounds, and choices.
  • Point & Click Adventure: an adventure game where the player explores scenes and interacts with objects and characters.
  • Interactive Fiction: feels like reading a book. Unlike a visual novel, images are shown as vignettes, just as illustrations would appear on a page.

To create a new project from a template, run:

npm create pixi-vn@latest

Distribution

Pixi’VN is independent of any distribution technology, but strong emphasis is being placed on Roves, built by the same team behind Pixi’VN.

PlatformRovesTauriElectron
Windows✅✅✅
macOS✅✅✅
Linux✅✅✅
Android✅✅❌
iOS✅✅❌
Nintendo🚧❌❌
PlayStation🚧❌❌
Xbox🚧❌❌

Wiki

Prerequisites

Before starting, you must have the following tools installed:

Installation

To install the Pixi’VN package in an existing JavaScript project, use one of the following commands:

npm install @drincs/pixi-vn

Initialize

Before using the Pixi’VN engine, you must initialize the game. You can do this by calling the Game.init method.

import { Game } from "@drincs/pixi-vn";

const body = document.body;
if (!body) {
  throw new Error("body element not found");
}

Game.init(body, {
  height: 1080,
  width: 1920,
  backgroundColor: "#303030",
}).then(() => {
  // ...
  Game.start("start", {});
});

// read more here: https://pixi-vn.com/start/other-narrative-features.html#how-manage-the-end-of-the-game
Game.onEnd(async (props) => {
  Game.clear();
  // navigate to main menu
});

Game.addOnError((error, props) => {
  console.error(`Error occurred`, error);
});

Game.onNavigate((path) => navigateTo(path));
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Game</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>
html,
body {
  background-color: #242424;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

Agent Skills

Pixi'VN ships a set of Agent Skills that teach AI coding assistants how to correctly use each part of the engine.

In LM Studio Bionic, ask the agent to install skills from https://github.com/DRincs-Productions/pixi-vn, or add the skill files in Settings → Skills. To reuse skills installed for Codex or Claude Code, enable Settings → Skills → Use skills found in other apps.

Codex:

npx skills@latest add DRincs-Productions/pixi-vn@latest --skill '*' --agent codex -g -y

Claude Code:

npx skills@latest add DRincs-Productions/pixi-vn@latest --skill '*' --agent claude-code -g -y

Other agents:

npx skills@latest add DRincs-Productions/pixi-vn@latest --all -y

Available skills:

  • pixi-vn — the index/entry point of the skill set: skill map, installing the package and initializing the Game
  • pixi-vn-assets — local vs. online assets, the manifest/bundle/alias system, and loading strategy
  • pixi-vn-canvas — images, sprites, text, video, transitions and effects
  • pixi-vn-characters — defining and registering characters
  • pixi-vn-history — going back/rewinding and reading the narration backlog
  • pixi-vn-narration — labels, dialogue and choices
  • pixi-vn-saves — exporting/restoring game state and persisting save files
  • pixi-vn-sound — music, sound effects and audio channels
  • pixi-vn-storage — game variables, flags and stored classes
  • pixi-vn-testing — driving/inspecting a running game from an AI agent or script via Game.testing, for automated play-testing
  • pixi-vn-ui — mounting HTML/PixiJS UI layers over the canvas, screen navigation, theming, and connecting UI to storage
  • pixi-vn-migration — upgrading an existing project to the current version

版本与发布记录

@drincs/pixi-vn 共发布 264 个版本,首次发布于 2024/03/21;过去 12 个月发布了 85 个版本。

版本发布日期距今
1.9.9latest2026/11/067 天前
1.9.82026/11/049 天前
1.9.72026/11/0112 天前
1.9.62026/10/2123 天前
1.9.52026/10/011 个月前
1.9.42026/09/291 个月前

其他发布通道:beta → 1.5.3-beta.1。

关于 @drincs/pixi-vn 的常见问题

@drincs/pixi-vn 是什么?

Pixi'VN is a very versatile and powerful game/story-driven engine.

如何安装 @drincs/pixi-vn?

在项目目录运行 npm install @drincs/pixi-vn,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:tone(>=15.1.0)、motion(>=12.38.0)、pixi.js(>=8.17.0)、pixi-filters(>=6.1.0)、@pixi/devtools(>=2.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@drincs/pixi-vn 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@drincs/pixi-vn 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@drincs/pixi-vn 可以商用吗?

@drincs/pixi-vn 使用 LGPL-2.1 许可。弱 Copyleft:作为库被调用时通常不要求开源你自己的代码,但修改库本身需以 LGPL 开源;前端打包合并后的适用边界存在不同理解。以上为概括,不构成法律意见,请以许可原文为准。

@drincs/pixi-vn 的下载量有多少?

根据 npm 官方下载统计,@drincs/pixi-vn 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,647 次,日均约 88 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@drincs/pixi-vn 还在维护吗?

最新版本 1.9.9 发布于 2026/11/06(7 天前);至今共发布 264 个版本,其中过去 12 个月发布了 85 个;首次发布于 2024/03/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。