Ren'Py vs Pixi’VN
Looking for a Ren'Py alternative? Compare Ren'Py and Pixi’VN visual novel engines, covering language, UI, performance, and flexibility.
If you are looking for a Ren'Py alternative, this comparison is for you. 将Ren'Py和Pixi’VN放在一起比较是很有必要的,因为Ren'Py是目前最广泛使用的视觉小说创作引擎之一。
模板
本对比由Pixi’VN团队制作,力求客观公正。 If you disagree with this comparison or think other features should be compared, feel free to write in the chat below!
什么是Ren'py?
Ren'Py是一款视觉小说引擎——被全球成千上万的创作者使用——它能帮助你使用文字、图像和声音,在电脑和移动设备上讲述交互式故事。这些故事既可以是视觉小说,也可以是生活模拟游戏。
- 编程语言:
Ren'Py语言。一种让你即使没有太多编程知识也能快速开发视觉小说的编程语言。它基于Python。 - 画布(canvas)库:
Pygame_sdl2,一个使用SDL2及相关库对Pygame API的重新实现。虽然它最初旨在于支持多种应用,但现在主要用作Ren'Py的基础技术。 - 工作原理:Ren'Py是一个完整的视觉小说引擎/框架,涵盖项目创建、执行、分发等几乎所有环节。
编程语言对比
Ren'Py使用其自有的Ren'Py语言,它是Python的超集。你可以在其中使用Python语句。
Pixi'VN使用JavaScript/TypeScript,这是当下功能强大且十分流行的编程语言。编写叙事时,你可以直接使用JavaScript/TypeScript,也可以选择一种或多种可用的叙事语言。
| 编程语言对比 | Ren'Py | Pixi’VN |
|---|---|---|
| 学习难度 | 面向无编程基础的用户 | 使用模板可快速上手,但随着进度推进及新功能集成,需要学习一些JavaScript/TypeScript、NodeJS和npm的基础知识 |
| 是否为类型语言? | ❌(使用Python虽可定义类型,但Ren'Py编译器并不会进行类型检查。且大部分原生Ren'Py代码也不会使用类型。) | ✅ |
| 是否支持调试器? | ❌ | ✅ |
| 包/库管理器 | ❌ | npm |
| 叙事语言 | Ren'Py语言及Python语句 | JavaScript/TypeScript及多种叙事语言(包括 Ren'Py 语言) |
| 小游戏实现 | 可使用Ren'Py创作者定义的可视组件(CDD) | 可使用PixiJS或安装其他库 |
| UI实现 | 可使用Ren'Py screens | 可使用PixiJS、React、Vue等。 |
| UI组件 | Ren'Py提供的组件,通常基于图像 | 取决于UI框架,可使用任意组件库(如Material-UI、Bootstrap、PixiJS UI等) |
叙事编写
使用Ren'Py编写叙事时,你需要使用Ren'Py语言。这种语言简单易学。其基于Python,并支持Python语句。
使用Pixi'VN时,你可以使用JavaScript/TypeScript编写叙事。 You can also use various narrative languages (potentially you can integrate any narrative language using PixiVNJson).
Ren'Py示例:
label start:
"Hello, world!"
"This is a Pixi’VN tutorial."
"I hope you enjoy it!"Pixi'VN示例:
const startLabel = newLabel("start", [
() => (narration.dialogue = "Hello, world!"),
() => (narration.dialogue = "This is a Pixi’VN tutorial."),
() => (narration.dialogue = "I hope you enjoy it!"),
]);=== start
Hello, world!
This is a Pixi’VN tutorial.
I hope you enjoy it!
->DONE小游戏实现
在 Ren'Py 中,要创建带有复杂机制/动画的小游戏,你需要使用 创作者定义的可视组件(CDD)。这是很有必要的,否则可能会出现性能问题。通过CDD,你可以在渲染循环中创建/控制一个或多个图形元素。但CDD不够直观,使用复杂,示例稀少,开发者也不算多。事实上,绝大多数Ren'Py小游戏并没有复杂的逻辑与动画。
在Pixi'VN中,可以直接使用PixiJS创建小游戏。 PixiJS是一款功能强大的库,支持复杂动画和机制。其文档和示例详尽,且拥有庞大的开发者社区。
你可以尝试体验一些Ren'Py和PixiJS的小游戏以了解差异:
UI实现
使用 Ren'Py 来创建用户界面,你可以使用 screens 和 styles 。推荐的实现方式是绘制一系列图像,并通过图形组件将其添加到画布中。但这些图形组件有限且不够直观。
在 Pixi'VN 中,除了使用PixiJS组件外,你还可以使用React、Vue等系统,并安装Material-UI、Bootstrap等组件库。这使得你能以优异性能构建更复杂的UI界面。
性能与项目体积
在选择框架时,性能和项目大小是需要考虑的重要因素。
所使用的画布(canvas)库:
Pygame_sdl2:性能表现欠佳。可以通过在Ren'Py中放入大量移动图形进行测试验证。- PixiJS:基于现代系统,性能卓越。你可以直接通过下面的示例测试:
UI performance:
- Ren'Py's UI is based on canvas components that use images within the project.
- With Pixi’VN you can use HTML and/or JavaScript frameworks, known for their performance and usability, or the canvas. HTML/JavaScript components are not necessarily based on images, which leads to a smaller project size.
Project size:
- The entire UI of Ren'Py is based on "physical images", making the project size very large.
- Since Pixi’VN is a library, it does not determine the project size, but if you use vite or other tools, the project size will be very light.
Distribution on multiple devices
Ren'Py is directly responsible for distributing the game on various devices.
Pixi’VN does not handle distribution. You can use various frameworks (Tauri, Electron, Cordova, etc.) to distribute the project on multiple devices. Pixi’VN provides templates that already include the necessary configurations for distribution.
| Distribution on multiple devices | Ren'Py | Pixi’VN |
|---|---|---|
| Ease of use | Very simple. You can use the Ren'Py UI to create the package to distribute | For less experienced users, it can be difficult to set up the project for multiple devices. Using templates can simplify this step. |
| Package configurations | Essential | Very complete (you can choose if the package should be installed or run without installation) |
| Deployment automations with GitHub Actions or GitLab Pipeline | ❌ | ✅ |
| System notification | ❌ | ✅ |
| Use connected devices (Camera, Flashlight, etc.) | ❌ | ✅ |
| UI scaling based on device type | ✅ | ✅ |
| UI scaling to fit screen size | ❌ | ✅ |
| Windows/Linux/Mac OS | ✅ (using Ren'Py) | ✅ (using Tauri, Electron, Cordova, etc.) |
| Android/iOS | ✅ (using Ren'Py) | ✅ (using Ionic or Cordova) |
| Web | ✅ (in beta) | ✅ (natively supported) |
| Xbox/PlayStation/Nintendo Switch | ✅ (using Sen’py) | Only Xbox with UWP |
Development possibilities
Ren'Py is an engine designed only for creating visual novels. Adding complex functionality through Python that goes beyond the development of a normal visual novel is very complicated and is not recommended by the Ren'Py team. It does not have a package/library manager.
Pixi’VN is an npm library that allows you to create visual novels. You can also use this library in a project that is not natively a visual novel. npm is a package manager for JavaScript and the world's largest software registry.
Longevity and ease of internal development
Ren'Py was born in 2004 and is still used today. It is a very stable and mature project.
Ren'Py, in addition to including the development of its own library for visual novels, also includes the development of Ren'Py language and Pygame_sdl2. Since Ren'Py also handles the distribution of the project on various devices, it is necessary to keep the system up to date with updates for supported operating systems.
This means that keeping Ren'Py updated is a constant and very complex process that "touches" many types of programming (parsing, graphics, etc.).
Pixi’VN was born in 2024. It is a very young project. Pixi’VN is only a library that uses PixiJS for the canvas. As well as providing functionality for visual novels, it doesn't handle anything else.
This means that keeping Pixi’VN updated is a very simple process and, once it reaches a stable version, it will not need constant updates to be compatible with the latest devices.
结语
In conclusion, if you know object-oriented programming and want to create a visual novel with many features, minigames, a very complex UI, etc., you should use Pixi’VN. If you are not a programmer, want to create your visual novel quickly, and are willing to learn knowledge over time that you can reuse later, consider Pixi’VN. If you want a unified framework that takes care of everything without you having to decide which libraries to use, then Pixi’VN is not for you—Ren'Py is a valid option. If you want a no-code framework, currently, neither Ren'Py nor Pixi’VN are for you.