Getting Started

Project DVN

Contents


Installing DVN

DVN doesn't need installation like many other engines, you simply download the empty visual novel project and get started.

It really is as easy as that.

However you might want to download some things if you ever wanna extend DVN or do things beyond the scripting language, or customize the UI more than configurations allow.

(Optional) Download a D compiler such as DMD from here: https://dlang.org/download.html

(Optional) Download dub (if not installed with the D compiler) here: https://github.com/dlang/dub/releases

(Required) Download the empty visual novel project here: https://github.com/ProjectDVN/Empty/archive/refs/heads/main.zip (Source Code + Windows x86_64 build)

Creating your first project

Follow this guide to create your first visual novel using our launcher.

1. Requirements

Download the visual novel launcher here: https://github.com/ProjectDVN/launcher/archive/refs/heads/main.zip (Source Code + Windows x86_64 build)

Note: Some launcher features are currently Windows-only. The launcher still works on Linux and macOS, and core functionality is supported.

2. Starting with the launcher

First you need to open the launcher.

You can find the Windows x86_64 build in launcher-main/ProjectDVNLauncher/build/client called DVN.exe.

First press the label that says “CREATE NEW PROJECT”

1

Next up give your project a title and then choose a color theme.

You can change all the colors later in settings.json if needed.

2

Afterwards hit save and the project will be created.

3. Select the project

Now that the project has been created select it from the list.

3

If you press the "LAUNCH PROJECT" button then it will launch your project and you'll be able to preview any changes made.

Folder structure

  • data/backgrounds for the loading background and the main menu/settings menu background image.
  • data/fonts for font files.
  • data/images for the SDL logo image.
  • data/music for music and sound effects. (Optional - only if music/sound effects are added) -- This may also be data/game/music, or somewhere else.
  • data/resources for the main resource file which contains the main menu background and the logo for the game.
  • data/game for resource files that contains animations, game backgrounds, character images and music/sound effects.
  • data/game/animations for animation files. (Optional - only if animations are added)
  • data/game/backgrounds for game background files.
  • data/game/characters for character image files.
  • data/game/images for image files used in the game, by default it contains the logo.
  • data/game/scripts for visual novel script files used to develop the visual novel story.
  • data/game/views for the main menu view files used to modify the main menu and its appearance.

Running a basic scene

Simply open the data folder data/game/scripts and you should see a file called main.vns.

Open that file with any text editor - .vns files are just text files.

In the file you should see the following:

[main]
bg=MainMenuBackground
act:start:Start Story=Act 1 - Main

[start]
bg=Background
c=Stickman
Stickman=Hello World!

You may change "Hello World!" to anything you like.

Note that each "command" has short-hand versions like text= can be written as t= - but more about that in the Scripting Language docs.

You can even change the whole script like below and it will work instantly.

[main]
bg=Background
Hello!
option1 -> Say hi back
option2 -> Walk away

[option1]
You smile. Maybe this world isn't so bad.

[option2]
You say nothing and keep walking.

Save -> run -> you're now making an interactive story.

Building + exporting

Building

You don't need to build DVN for everything to run, UNLESS you have extended it in D code. By default everything will just work out of the box, like editing scripts, assets etc.

If you need to build DVN then it is as simple as the following command-line execution with dub for example:

dub build -a=x86_64 --config=windows --force

where --config=windows can be windows, linux or macos.

Exporting

There is no real exporting in DVN, to export you basically just take your whole game folder "build" and release that. Don't release the "source" folder.

However you can bundle most assets and scripts. build/client where DVN.exe lives simply create a file called bundle.txt and it will bundle your scripts into data/scripts.dvn and your images into data/images.dvn.

For example Empty-main/Empty-main/build/client/bundle.txt

You may delete the files in the folders data/game/scripts, data/game/characters, data/game/backgrounds afterwards.

It is possible to compress, encrypt etc. by overriding the events:

ubyte[] scriptBundleWrite(ubyte[] buffer);
ubyte[] scriptBundleRead(ubyte[] buffer);
ubyte[] imageBundleWrite(ubyte[] buffer, bool isName);
ubyte[] imageBundleRead(ubyte[] buffer, bool isName);