Simple and portable visual novels engine with Markdown-like syntax.

Evgeniy Parfenyuk fd90f6dfb3 Merge branch 'fix/docs-link' of Vinora-Project/vinora-engine into develop 1 ماه پیش
docs 3411685cc5 Add VN definitions 2 ماه پیش
external 092f910e1e Add raylib library 2 ماه پیش
src 2d88409829 Add license to main.c 2 ماه پیش
CONTRIBUTING.md f19111b7c5 Add git workflow 1 ماه پیش
CONVENTIONS.md 051d1ec4c5 Conventions fix 2 ماه پیش
LICENSE.md 634886d8d5 Inital commit 2 ماه پیش
Makefile 598bd03f60 Add Makefile and example main.c file 2 ماه پیش
README.md c128f089b5 Fix broken links 1 ماه پیش

README.md

Vinora Engine

Vinora Engine is a visual novels engine with focus on simplicity and portability.
It doesn't use any script language (like Python in Ren'Py), but instead it use Markdown dialect called Vinora Screenplay.

It's on early stage of development, so it has no use if you an average user.
But if you are a programmer -- you are welcome to contribute.

Table of Contents

Installation

Just run:

$ make run

That's all!
Except if you never built a GUI program, linker throw errors at you. Well, you have two choices here:

  1. Get raylib library as binary from Github (only for Linux/MacOS for now). That's kinda easier, but you need to trust Microsoft Corporation. (Not cool).
    Just run make fetch-raylib for that, then make run once again.
  2. Build it yourself. Good news is that raylib's source code is included in repo (external/raylib/src/), and make trying to build it by default. So, if you have an error you need some OS-specific additional steps. Read them here:

    • Linux
    • MacOS
    • Windows
    • ChromeOS
    • FreeBSD
    • Raspberry Pi
    • Android

Design

Game structure

Visual novel on Vinora Engine looks like this:

example
├── engine
│   ├── vinora_lin
│   ├── vinora_mac.bin
│   └── vinora_win.exe
├── game
│   ├── bg
│   │   ├── school_day.png
│   │   └── school_night.png
│   ├── cg
│   │   └── debate.png
│   ├── conf
│   │   ├── main.ini
│   │   └── options.ini
│   ├── music
│   │   ├── day.mp3
│   │   ├── home.mp3
│   │   ├── night.mp3
│   │   └── school.mp3
│   ├── sounds
│   │   ├── door.ogg
│   │   ├── exit.ogg
│   │   ├── play.ogg
│   │   └── stop.ogg
│   ├── sprite
│   │   ├── alice
│   │   │   ├── happy.png
│   │   │   └── sad.png
│   │   └── bob
│   │       ├── happy.png
│   │       └── sad.png
│   ├── ui
│   │   └── main_menu.png
│   ├── video
│   │   ├── ending.mp4
│   │   └── opening.mp4
│   ├── Chapter1.vnrs
│   ├── Chapter2.vnrs
│   └── Chapter3.vnrs
├── mods
├── translations
└── run_game.bat

A little bit overwhelming, but it's actually really simple. Let's start with root directory:

example
├── engine
├── game
├── mods
├── translations
└── run_game.bat

run_game.bat is cross-platform (Bash/Batch-compatible) script, which will run a right engine binary from engine/ depending from which OS it was executed.

Than this binary will look at game/ and start reading game script. If user in-game would choose to play mods/ or switch to one of the translations/, it will overwrite any information from mods/ in RAM.
(For example, if I switch to Russian, translations/ru/intro.vnrs would be displayed instead of game/intro.vnrs. Same with mods.)

game/ directory has a bunch of Vinora Screenplay (.vnrs) files and assets directories (bg, cg, conf, video, etc).
Obvious question is why we didn't make general audio/ and video/ directories?

Well, in Vinora Screenplay to play some music you write something like this:

[](music/home.mp3)

So, difference between music and sound is that music is played on loop. You can change by appending {loop} or {!loop}, but still, this is default behaviour.

And the only way how Vinora can distinguish music from sound or sprite from bg is by parsing their directory name.