LingFanEngine.Abstractions 0.1.3

dotnet add package LingFanEngine.Abstractions --version 0.1.3
                    
NuGet\Install-Package LingFanEngine.Abstractions -Version 0.1.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LingFanEngine.Abstractions" Version="0.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LingFanEngine.Abstractions" Version="0.1.3" />
                    
Directory.Packages.props
<PackageReference Include="LingFanEngine.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LingFanEngine.Abstractions --version 0.1.3
                    
#r "nuget: LingFanEngine.Abstractions, 0.1.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LingFanEngine.Abstractions@0.1.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LingFanEngine.Abstractions&version=0.1.3
                    
Install as a Cake Addin
#tool nuget:?package=LingFanEngine.Abstractions&version=0.1.3
                    
Install as a Cake Tool

[中文] | English

灵泛引擎(LingFan Engine)

是一个基于 .NET、C#、Avalonia 为核心框架开发的叙事、沙盒类小说游戏引擎。

灵泛以“一切皆为 List 和 Dict”的思想驱动一切,但同时对 AOT 友好。我在 AOT 友好的前提下,依然保持了高度动态的叙事能力——这点是我自己预料到并且验证过的。

“灵泛”二字不是空穴来风,是我在设计之初的灵光一现。嗯,所以这个名字就这样诞生了。

我借鉴了 Ren‘Py,但没有照抄。我参考了一些思想和 API,然后做了自己的本地化。


灵泛引擎可以干什么?

  • 做叙事小说类游戏
  • 做沙盒类小说游戏
  • 高度可自定义拓展(基于 DI,你可以替换掉大部分默认行为)

灵泛引擎的推荐思想是什么?

世界观上的自然。

你在没触发 NPC 或场景之前,我们推荐别写到全局。我们支持场景级的 NPC 属性注入——在你不认识他之前,他也不认识你,没有数据。


我们该做什么?

引擎不做游戏相关的预制,只预制了引擎核心状态。但我们提供了一些 Handler 能力,你可以复用,也可以自定义。


开发范式推荐

如果你是 C# 开发者,我推荐你面向 AOT 开发。
因为基于 AOT 的情况下,安全性更好。AOT 不难,我推荐它作为第一开发范式,但如果你愿意,也可以 JIT 式开发。

给 DSL 创作者的悄悄话

如果你愿意的话,更好的方式还是面向 C# 开发,DSL更合适写故事。
DSL 更适合写故事流程,因为它天然支持文本级回溯。C# 适合写扩展功能——如果需要精确读档,请用 DSL;如果不需要,就用 C#
是的,它不难,它很优雅,你的选项很多。

致社区朋友们

首先,感谢你的到来。这个引擎还很年轻,但我相信它已经承载了一些独特的东西——将 AOT 的安全性与动态叙事融为一体,而这一切仅由 List 和 Dict 驱动。如果你觉得它有用,一个 star 就是对我最大的鼓励;如果你发现了 bug 或不够完善的地方,请提交 issue —— 我一个人确实无法覆盖所有测试。

我为什么建造它

我喜欢视觉小说和沙盒游戏,但一直没有找到真正拥抱 AOT 又能保持灵活性的引擎。所以我从头开始构建了一个——以 AOT 为地基,而非后期修补。事实证明,“List & Dict”哲学达到了一个奇妙的平衡:你既享有编译时安全,又拥有运行时动态。我强烈建议你在扩展引擎时也采用 AOT 优先的思路——它现代、安全,而且面向未来。

对于 DSL 作者:一旦你编译好了游戏外壳,就可以在 DSL 中编写和迭代整个故事,无需重新编译。只需加密你的 story 文件,大部分数据变更都能在 DSL 内完成——只有新增功能时才需要重新编译。这意味着你把精力聚焦在叙事上,而不是反复等待构建。

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on LingFanEngine.Abstractions:

Package Downloads
LingFanEngine

灵泛引擎,一款通用文字视觉游戏引擎

LingFanEngine.DslCore

灵泛引擎,一款通用文字视觉游戏引擎

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.3 153 7/10/2026
0.1.2 126 7/10/2026
0.1.1 129 7/9/2026
0.1.0 120 7/9/2026