Toolchain and projects
Vilanel is not distributed, so this is not an installation guide. It documents what the engine is built with and how a project is organised.
Build requirements
Vilanel runs on Windows and needs three tools:
| Version used | |
|---|---|
| Visual Studio 2022, with the C++ workload | 17.14, v143 toolset |
| CMake | 4.0 (3.28 or newer is required) |
| Vulkan SDK | 1.4 |
All other libraries are downloaded and built automatically the first time the project is configured, so the first build takes a while and later builds are fast.
The Vulkan SDK provides the shader compiler and the validation layers. Shaders are written in Slang and compiled as part of the build.
Microsoft's compiler is the main one, and a second compiler, clang-cl, is kept
working to catch problems the first one misses. The code builds without warnings
at /W4 in both Debug and Release.
cmake --preset vs2022
cmake --build build/vs2022 --config Debug
editor.exe --project samples/Demo
Language and graphics API
The engine is written in C++23 and uses Vulkan 1.3 with modern features: bindless resources, dynamic rendering, timeline semaphores and buffer device addresses.
Two conventions run through the code:
- Errors are returned as values rather than thrown as exceptions. Exceptions and runtime type information are both disabled.
- Types are identified by a hash of their name rather than by the compiler's type information, because a hash stays valid when game code is reloaded.
How a project is organised
A project is a folder that can live anywhere on disk. Three locations are involved:
| Contents | |
|---|---|
| The engine | The executables, shaders and built-in content. Shared by every project and never modified. |
| The project folder | Your .vproject file and your assets. This is what goes into source control. |
.vilanel/ | Generated files: converted assets, the compiled C++ module, packages and logs. It lives inside the project and is always safe to delete. |
The .vproject file stores the project's name, the engine version it uses, the
level it starts in and the project settings. Settings that belong to your own
machine, such as the editor layout, are stored in your user folder instead.
Projects do not need a compiler. Gameplay is built with visual scripting, and
levels, interfaces, input bindings and animations are all data. If a project
needs native code, it can add a source folder with a C++ module, which the
editor builds and reloads while it runs.
Assets are converted in the background when a project opens and whenever a file is saved. Packaging produces a single archive next to a copy of the runtime.
New projects start from one of two templates: Blank, with a camera and a
light, or C++ Module, which also adds a source folder. The engine ships
with two sample projects: the Demo, built entirely with visual scripting, and a
small 2D sample.
The Hub
The Hub opens the editor by passing it a project folder with the --project
option. The editor can also be started that way directly, without the Hub,
which keeps the two independent and easy to debug.
Related
- Actor classes: how gameplay is built
- Scene and entities: how levels are structured
- C++ modules and hot reload: adding native code