A simple 3D game engine with a focus on integrating high quality, high visibility, cross-platform, open-source C++ libraries.
- Build a game engine in C++, using lightweight tools such as
vcpkg
,cmake
andVisual Studio Code
- Keep code organized, lightweight, minimal
- An editor that is built from the engine itself
- 3D renderer - bgfx
in process
- Model loading - tinyGLTF
in process
- Windowing and input system - SDL2.0
in process
- Physics collisions - JoltPhysics
not started
- Audio system - OpenALSoft
not started
- 2D UI elements - ImGUI
lib downloaded
- Networking - SDL2-net
not started
- A focus on pedagogy. Anyone forking this should be able to build it, learn from it quickly, and work on it if they want
- Minimal dependencies in third party libraries. You can check each of the above libraries in
vcpkg
- Quick startup for building and running from source
- Target C++17
- Only manage memory you absolutely have to. Allow libs to manage their own memory
- Avoid singletons (if possible, entirely) for the purposes of unit testing
None. This is for fun/learning.
Clone the repo (fork and clone if you want to contribute). It is expected that CMake
and Visual Studio Code
will be used, so you'll need to make sure you have all the tooling installed properly.
If you aren't familiar with vcpkg
, take a look at vcpkg.json
above. It's fairly intuitive. It contains all dependencies and tools/features required.
In vscode
I'm using the CMake Tools
extension, and there's one additional setting needed in order to integrate with vcpkg
:
It incorporates the vcpkg.cmake
file into the toolchain (you'll need to set up the vcpkg/CMake tooling first):
-DCMAKE_TOOLCHAIN_FILE=C:\path_to_vcpkg\scripts\buildsystems\vcpkg.cmake
Hit Ctrl+Shift+P
to bring up the command pallette in VSCode
. Scan for toolkits in CMake, select the appropriate one, then configure the project. Afterwards you should be able to build using the cmake build command. First time build might take a few minutes to download all the dependencies and build, prior to building this application.
It will probably crash immediately. This is likely because the shaders aren't built.
- Navigate to
assets/shaders
in a terminal - Run
.\compile_shaders_win.bat
Try re-running SimpleEngine.