-
-
Notifications
You must be signed in to change notification settings - Fork 8
[EU] Understanding the engine library layout
Before release Alpha 0.9.3.0 the engine and game used to be compiled into a single executable. This was neat at the time, but with native scripting mod support being added in that very release, we had to switch to a shared library layout.
Now there are 3 binaries that are produced, your game's code and the engine(stored under Source/
and Engine/
respectively) now get bundled into the UntitledVulkanGameEngine
dynamic/shared library. This library links to the 2 wrapper executables, the first one uses the name from the uvproj.yaml
file and the other uses the same name but appends Modded
to the end.
The Modded
executable is hardcoded to load the ModLib
mediator library that all the mods link to, the other one isn't
Since the new wrapper executables now exists, you can write code for them under the WrapperSource
directory where the files Wrapper.cpp
and Wrapper.hpp
are defined. The 2 functions there are called inside the executables, in them, you call any functionality that you want to be executed before the whole engine launches, here are some examples:
- Verifying the integrity of the libraries
- Connecting to the game's servers
- Checking for an update of the game
And, because 2 executables are compiled, on compilation the UVK_COMPILING_WITH_MODS
macro is defined for the Modded
executable, this way you can check for what target you're developing certain features.
A very important thing to note here is that the wrapper functions shouldn't access any engine code(especially the wbegin
function) since the engine hasn't started at that moment(will lead to a crash or weird behaviour)
This project is supported by all the people who joined our discord server and became beta testers. If you want to join the discord you can click here
- Home
- Beginner concepts
- Advanced concepts
- Engine developer and contributor resources