A game editor written in C++20 using Vulkan and the QT framework
TODO
-
Vulkan SDK Low-level 3D graphics and computing API.
-
Qt6 (
Qt::Core
,Qt::Widgets
,Qt::Qml
,Qt::Quick
andQt::Svg
) Cross-plaftorm GUI framework.NOTE: The QT framework requires around 8 GB of disk space per target architecture (For example
msvc2019
ormsvc2019_64
). -
vcpkg C++ package manager.
-
The required libraries can be installed using vcpkg:
vcpkg install liblzma protobuf nlohmann-json stb pugixml glm catch2 nano-signal-slot lua date
Note: This command varies depending on the triplet you want to compile against. For instance, for compiling against x64-windows, the command would be
liblzma:x64-windows protobuf:x64-windows nlohmann-json:x64-windows stb:x64-windows pugixml:x64-windows glm:x64-windows catch2:x64-windows nano-signal-slot:x64-windows lua:x64-windows date:x64-windows
To build the project, first install the required Dependencies.
- Download and install Visual Studio 2022 Preview (Community).
- Follow steps 1.3 in Building with CMake.
- Open
./build/VulkanGameEditor.sln
with Visual Studio. - If necessary, update C++ version to
Preview - Features from the Latest C++ Working Draft (/std:c++latest)
. This can be done by right clicking a project in the solution explorer -> Properties -> Configuration Properties -> General. This must be done for each project in the solution. - Run.
Build configurations can be changed under Project -> CMake Settings for VulkanGameEditor
.
-
Download and install CMake.
-
Empty the
build/
folder. -
Environment Variables
- Add the Qt6 bin folder to the
PATH
environment variable:
<your Qt6 install path>/6.1.0/msvc2019_64/bin
-
Set the environment variable
LIB
to the Windows libpath. Its default path isC:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64
Select the last folder based on the architecture you are building for (for example x86 or x64).
-
Set the environment variable
Qt6_CMAKE_FOLDER
to<your Qt6 install path>/6.0.0/msvc2019_64/lib/cmake/Qt6
- Add the Qt6 bin folder to the
-
In
./build
, run (for example)# Use the Visual Studio 16 2019 makefile generator, targeting the x64 platform with the ClangCL compiler. cmake ../ -G "Visual Studio 16 2019" -A x64 [-T ClangCL]
Flags:
- -G specify a makefile generator.
- -A specify platform name if supported by generator.
- -T Toolset specification for the generator, if supported.
to generate the build structure.
OPTIONAL: Follow the instructions here to be able to use the
clang
compiler (-T ClangCL
) -
In
./build
, runcmake --build .
to compile a debug build, orcmake --build . --config release
to compile a release build. -
Copy over the folders
shaders
anddata
into./build
.
To run the test suite vme_tests
, run ./runtest
in the project root.
There are four targets:
-
main (Executable): The
main
target is the executable of the application. This target links thecommon
andgui
libraries statically. -
common (Library): The
common
target contains all code that is not related to GUI (i.e. everything except Qt6-reliant code). -
gui (Library): The
gui
target contains all code that is related to GUI (i.e. all code that is Qt6-reliant). -
vme_tests (Executable): Contains tests for the
common
andgui
libraries (See Run tests using CMake).
The main purpose of having the common
and gui
library separate from the main
target was to enable running unit tests against the code. It also ensures that there is no coupling introduced between core editor functionality and Qt6 (common
does not have Qt6 as a dependency).
An action is an event that can occur and can be undone/redone.