A visual novel engine written by Rust. Just Ayaka.

Overview

Ayaka

Ayaka is currently a project for OSPP 2022.

About the name

The frontend is Ayaka. The runtime is Ayaka. The script is Ayaka. Just Ayaka.

What we've done

  • A cross-platform visual noval (VN) runtime with rust
  • A well-defined and easy-to-author VN config file format, based on YAML.
  • An embedded custom script.
  • CLDR-based i18n support.
  • A flexible plugin system based on WebAssembly. It provides hooks of the runtime and interop functionalities with the script.
  • A decoupled framework - the frontend, backend and plugins are decoupled.
  • A CLI frontend to check grammar errors and debug quickly.
  • A GUI frontend powered by Tauri and Vue, with Live2D support.
  • A prototype LaTeX frontend to generate PDF from the config.

Docs

For authors with little experience of programming, see Ayaka cookbook.

For developers, see Ayaka Book.

For API docs, build into utils/target/doc:

$ make doc

Screenshot

Orga

License

This project is licensed under the MIT license.

Comments
  • Import other YAML files in config file.

    Import other YAML files in config file.

    https://github.com/Berrysoft/gal/issues/21

    We'd like to consider if the config.yaml could include other files. This will make the project easier to organize.

    Consider this folder structure:

    config.yaml
      └─paras
        ├─ja
        │ ├─start.yaml
        │ └─end.yaml
        └─zh-Hans
          ├─start.yaml
          └─end.yaml
    

    However, we need to consider these problems:

    • Is this structure forced or alternative?
      • If alternative, we need to extend YAML grammar, and it is not that easy.
    • When are the files loaded?
      • If they are not all loaded at first, we need to refactor many APIs to async.
    opened by Berrysoft 12
  • Enable multiple FRFS files overlay.

    Enable multiple FRFS files overlay.

    Related: #56

    Add this features to all frontends.

    The GUI will search for data.frfs, and then data.a.frfs to data.z.frfs. All existing files will be included.

    opened by Berrysoft 7
  • 请求解答一些疑惑

    请求解答一些疑惑

    From: ljlorljl [email protected] Topic: 请求解答一些疑惑

    尊敬的王 宇逸学长: 很高兴能看到您在2022年11月5日发表的演讲:使用Rust开发的视觉小说引擎,因为您的引擎开发项目能够促使下一代视觉小说引擎的开发(目前大多数视觉小说要么使用老旧的吉里吉里,要么使用大才小用的unity),我十分赞赏您开发的Ayaka。我将您的演讲实况转载到了哔哩哔哩(视频链接:https://www.bilibili.com/video/BV1wM411m7oN ),同时在评论当中b站用户提出的问题我想请您解答一下: 你们思路有大问题,,,, “

    1. 你为什么要引入新语言,你们有专门的调试器吗?有专门的文档吗?如果我是视觉小说作者,我要考虑的是上手成本

    2. 为什么要引入Web?直接走DX或者Vulkan不好吗?一个视觉小说,最重要的是一定的效果表现力。如果说rust生态有局限,重写就没有意义,如果说课程要求,当我没说。live2d是个好选择,但有时候有没那么必要。

    3. 在我看来,视觉小说应该注重资产管理,你们有没有资产管理的工具?有没有场景调试的工具?有没有预制一些动画特效和转场效果?

    4. 视觉小说的对话树你们有吗?帮助大家简化设计的工具有吗?如果你是从根本上解决这些问题,拿熟悉的语言去重写一个引擎是有必要的,否则就是重复造轮子 “ 期待您的答复!

    此致 LJL

    opened by Berrysoft 3
  • Our visual novel engine with Rust!

    Our visual novel engine with Rust!

    We finally named this project Ayaka today. It is such an important day, because we finally stopped calling it gal.

    About this project

    Ayaka is currently a project for OSPP 2022. According to the rules, we should show our work with a merged PR. Here is all our work recently. Contributions are welcomed after this PR is merged.

    About the name

    The frontend is Ayaka. The runtime is Ayaka. The script is Ayaka. Just Ayaka.

    What we've done

    • A cross-platform visual noval (VN) runtime with rust
    • A well-defined and easy-to-author VN config file format, based on YAML.
    • An embedded custom script.
    • CLDR-based i18n support.
    • A flexible plugin system based on WebAssembly. It provides hooks of the runtime and interop functionalities with the script.
    • A decoupled framework - the frontend, backend and plugins are decoupled.
    • A CLI frontend to check grammar errors and debug quickly.
    • A GUI frontend powered by Tauri and Vue.
    • A proto LaTeX frontend to generate PDF from the config.

    Non-goal byproducts

    • stream-future, a helper crate, separated from this repo.
    • A language matcher based on CLDR data in Rust. We need it to reduce the ICU dependency.

    What we need to do before merging

    • [x] Rename gal- to ayaka-. Rename gal binary to ayaka-check.
    • [x] Separate fallback and locale out.
    • [ ] Draw a new logo. We should not infringe the copyright of miHoYo/HoYoVerse, but we all love Ayaka.
    • [x] Organize the docs, the book and the README.
    • [x] Archive the old repo.
    • [x] Write reports.

    What we will do after merging

    • Enable github actions & dependabot.
    • Copy opened issues from the old repo.
    • Publish the SDK to crates.io.
    • Make some advertisements?
    • ~~Write some GalGame.~~
    opened by Berrysoft 3
  • Update wasmtime requirement from 2.0 to 3.0 in /utils

    Update wasmtime requirement from 2.0 to 3.0 in /utils

    Updates the requirements on wasmtime to permit the latest version.

    Commits
    • 01815a7 Release Wasmtime 3.0.0 (#5305)
    • 28718d9 c-api: Fix wasmtime_func_call_unchecked to communicate all errors (#5262) (...
    • b84167f Fix CI from the prior CVE fixes (#5250)
    • 75260f5 Merge pull request from GHSA-h84q-m8rr-3v9q
    • 82db744 Merge pull request from GHSA-44mr-8vmm-wjhg
    • 723409b Merge pull request from GHSA-wh6w-3828-g9qf
    • 0102cd7 [3.0.0] Backport some C-API trap-related changes (#5224)
    • d4f3851 Add release notes for 3.0.0 (#5213) (#5217)
    • fba2287 Fix mprotect failures by enabling cranelift-jit selinux-fix (#5204)
    • d3a6181 Add support for keeping pooling allocator pages resident (#5207)
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies rust 
    opened by dependabot[bot] 2
  • Switch 的 parse 有问题

    Switch 的 parse 有问题

    https://github.com/Uni-Gal/Ayaka/blob/c01f74587a641377ff81222d3974379837609390/utils/ayaka-script/src/line.rs#L46

    Ayaka Script 允许 ||| 算符的存在,要么换一个算符,要么就要写一个复杂的 parser。

    /cc @LaoshuBaby

    opened by Berrysoft 2
  • Ayaka Script 与国际化支持

    Ayaka Script 与国际化支持

    Ayaka Script 是完全没有国际化支持的。与之相关的资源文本虽然有国际化支持,但是在执行脚本时只是将当前语言的资源字典以及 fallback 传给了解释器。这相当于没有国际化支持。

    同时,Ayaka Script 的嵌入方式非常自由,因此给国际化也带来了很大的压力。

    我现在计划分离 Text 的 parsing 步骤,将 Action 分成两部分,一部分 ActionParams 是不变的属性与计算好的结果,不随语言变化;一部分 Action 在需要显示的时候即时获取,以保证所有的显示内容与当前语言匹配。但是由于 Ayaka Script 没有国际化支持,这个重构面临着某些强耦合。

    代码示例1:

    - \exec{ format.fmt(#r1, 123,456) }
    

    提问:如果 r1 在不同的语言下有不同的值, format.fmt 在何时执行?

    代码示例2:

    - \exec{ format.fmt("{}", random.rnd(10)) }
    

    提问:如何保证 random.rnd 只执行一次?

    代码示例3:

    - a = \exec{ $a }
    - b = \exec{ $b += 1; $b }
    

    提问:其它语言的文本怎么写?

    我们也许需要一种新的语法来解决脚本语言的问题。

    opened by Berrysoft 2
  • Use the new config structure.

    Use the new config structure.

    Fixes #3

    • [x] Separated paragraphs
    • [x] Separated resources
    • [x] Adjust frontends
    • [x] Adjust examples
    • [x] ~~Lazy load paragraphs & resources~~
    • [x] Fix bugs
    • [x] Update Ayaka Book
    opened by Berrysoft 2
  • Bump pixi.js from 6.5.8 to 7.0.5 in /bins/ayaka-gui

    Bump pixi.js from 6.5.8 to 7.0.5 in /bins/ayaka-gui

    Bumps pixi.js from 6.5.8 to 7.0.5.

    Release notes

    Sourced from pixi.js's releases.

    v7.0.5

    💾 Download

    Development Build:

    Production Build:

    Documentation:

    Changed

    https://github.com/pixijs/pixi.js/compare/v7.0.4...v7.0.5

    :bug: Fixed

    :broom: Chores

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 1
  • Pack resources to a single file

    Pack resources to a single file

    Now we simplify put all files on the disk, and try to find them at runtime. It is not suitable for deployment.

    We plan to take steps one by one.

    • [x] Don't check files' existance through WASI fs. #57
    • [x] Use tar as the pack format. #57
    • [x] Resource override rules. #63
    • [ ] Add compression?
    opened by Berrysoft 1
  • fix(.github/dependabot.yml): change cargo check to weekly

    fix(.github/dependabot.yml): change cargo check to weekly

    Docs: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval

    Haven't modify npm check because frondend tech-stack dependency update frequently.

    opened by LaoshuBaby 1
Releases(v0.1.0)
  • v0.1.0(Sep 28, 2022)

    What's Changed

    • Our visual novel engine with Rust! by @Berrysoft in https://github.com/Uni-Gal/Ayaka/pull/1
    • Bump async-mutex from 0.3.2 to 0.4.0 in /bins/ayaka-gui by @dependabot in https://github.com/Uni-Gal/Ayaka/pull/2
    • Add indenpendent LaTeX frontend type. by @Berrysoft in https://github.com/Uni-Gal/Ayaka/pull/6
    • Use the new config structure. by @Berrysoft in https://github.com/Uni-Gal/Ayaka/pull/7
    • Import format from host. by @Berrysoft in https://github.com/Uni-Gal/Ayaka/pull/10
    • Initial works for secondary language display. by @Berrysoft in https://github.com/Uni-Gal/Ayaka/pull/11
    • Add secondary language support. by @Berrysoft in https://github.com/Uni-Gal/Ayaka/pull/13
    • Adjust some structures. by @Berrysoft in https://github.com/Uni-Gal/Ayaka/pull/16
    • Simplify log with unwrap. by @Berrysoft in https://github.com/Uni-Gal/Ayaka/pull/17

    New Contributors

    • @Berrysoft made their first contribution in https://github.com/Uni-Gal/Ayaka/pull/1
    • @dependabot made their first contribution in https://github.com/Uni-Gal/Ayaka/pull/2

    Full Changelog: https://github.com/Uni-Gal/Ayaka/commits/v0.1.0

    Source code(tar.gz)
    Source code(zip)
Owner
UniGal
A universal galgame scripting language that opens and breaks engine barriers
UniGal
An enhanced search engine just for Lemmy/Fediverse

Please Read If anyone wants to help contribute to this, please feel free to reach out to me. You can obviously find me on Lemmy, mainly https://lemmy.

null 51 Jul 4, 2023
Exeprimental visual terminal for egui

eterm: a visual terminal for egui If you have a service written in rust (running on the cloud, or even locally) that you need to inspect, eterm might

Emil Ernerfeldt 48 Dec 29, 2022
Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)

WSLGit This project provides a small executable that forwards all arguments to git running inside Bash on Windows/Windows Subsystem for Linux (WSL). T

A. R. S. 1.1k Jan 3, 2023
A visual regex substitution tool

A visual regex substitution tool

Ilya Maximov 3 Feb 6, 2022
visual guide for writing Intrinsics(SIMD)

wasm-pack-template A template for kick starting a Rust and WebAssembly project using wasm-pack. Tutorial | Chat Built with ?? ?? by The Rust and WebAs

Ric Li 1 Apr 6, 2022
Stream-based visual programming language for systems observability

Stream-based visual programming language for systems observability. Metalens allows to build observability programs in a reactive and visual way. On L

Nikita Baksalyar 53 Dec 23, 2022
A visual node-based programming language

Stainless Script Stainless Script is a visual node-based programming language. The structure is as follows: program contains classes, objects (constan

null 4 Dec 15, 2022
Tight Model format is a lossy 3D model format focused on reducing file size as much as posible without decreasing visual quality of the viewed model or read speeds.

What is Tight Model Format The main goal of the tmf project is to provide a way to save 3D game assets compressed in such a way, that there are no not

null 59 Mar 6, 2023
Visual regression testing of H264 frames and images.

twenty-twenty The twenty-twenty library allows for visual regression testing of H.264 frames and images. It makes it easy to update the contents when

KittyCAD 4 Jul 16, 2023
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

Phoomparin Mano 31 Oct 11, 2023
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

Phoomparin Mano 32 Oct 11, 2023
Just a simple object renderer, written in under 500 lines using Rust.

All cargoes that the project runs are: bitflags: a crate for defining bitflag types cfg-if: a small macro crate for defining cfg-based - conditional c

null 3 May 4, 2023
Python package for topological data analysis written in Rust. Not limited to just H0 and H1.

Topological Data Analysis (TDA) Contents Installation Compiling from source Roadmap TDA is a python package for topological data analysis written in R

António Leitão 5 Feb 12, 2024
Just a UNIX's cat copy, but less bloated and in Rust.

RAT The opposite of UNIX's cat, less bloated, and in Rust. About the project The idea of this CLI is "A CLI program that is basically UNIX's cat comma

Renan Fernandes 2 Mar 5, 2022
A simple CLI I made while practicing rust to easily make QR codes with just one command, all in your terminal.

Welcome to rust-qrcode-cli ?? A CLI I made while practicing rust to easily make QR codes with just one command, all in your terminal. Install git clon

Dhravya Shah 2 Mar 2, 2022
Just a collection of tiny Rust projects I've did. None warrant a whole repo rn

Daily Rust I try to write some tiny programs daily to gradually improve my Rust skills! Current Program Descriptions first_prog.rs: My first program a

null 3 Nov 5, 2022
A just-for-fun™ JVM implementation in Rust

Caoimhe's Rust JVM (CaoRVM) This is a just-for-fun™ JVM implementation in Rust. This project was inspired by one of my previous C++ projects, CaoVM. S

Caoimhe Ní Bhroin 4 Jul 23, 2023
Rust low-level minimalist APNG writer and PNG reader with just a few dependencies with all possible formats coverage (including HDR).

project Wiki https://github.com/js29a/micro_png/wiki at glance use micro_png::*; fn main() { // load an image let image = read_png("tmp/test.

jacek SQ6KBQ 8 Aug 30, 2023
🤖 just is a handy way to save and run project-specific commands.

just just is a handy way to save and run project-specific commands. (非官方中文文档,这里,快看过来!) Commands, called recipes, are stored in a file called justfile

Casey Rodarmor 8.2k Jan 5, 2023