Dusk


Documentation in progress

Dusk is a WIP 3D Game engine.

It is a personal project I started back in May 2021 with the intention of learning more about how a game engine functions under the hood, as well as C++ & 3D rendering.

I stopped working on Dusk regularly in July 2023 to focus on other projects.

Dusk

This serves as a one-page documentation, breaking down Dusk’s systems - how and why I implemented them.

Overview


TODO

Project Structure


Dusk is divided into 3 main modules, the engine, the editor and the runtime.

They are located at the root level of the project, and the dependencies inside the dependencies folder.

The engine is compiled as a static lib, which is linked to the editor and runtime executables. The dependencies are all static libs, some required by the engine (in essence, required by both the editor and runtime) or just the editor/runtime.

Every dependency is a submodule maintained separately. The majority of them are forks, with my build system scripts and some changes on top to tailor them to my engine. The ones that are header-only are just a regular submodule of the original repository.

The dependencies are as follows:

Engine: (required by both editor and runtime):

Editor:

Runtime:

Because the editor has all its dependencies statically linked and its assets embeded in the source code, it is distributed as a single binary, which was something I wanted to achieve for simplicty’s purpose. No complicated install process, just get the binary and run it.

The runtime is also distributed as a single binary with all game assets (textures, scripts, models) by its side. I am currently in the process of condensing all of these into a single binary blob for even easier distribution of a game.

Build System


Dusk uses premake as its build system.

Premake can generate project files for multiple toolsets, namely MSVC and gcc. It’s scripts are written in lua.

At the root of the project sits a premake file which includes all modules and defines some global configurations (targets, output dir, intermediates dir, etc).

Each module of the project has its own premake script with details pertaining to type of binary, pch, include directories, linking, preprocessor, pre- & post-build commands, platform specific configurations, among others.

To generate project files, run premake at the root level with the respective command for your toolset.

E.g. premake vs2022 or premake gmake2. Then just compile and run.

Systems


Rendering

TODO

Editor

TODO

Asset Management

TODO

Asset Importing

TODO

Scripting

TODO

Other

TODO

Resources


Collection of some of the resources I used.

Youtube

Blogs

Repositories

Books

Discord

Screenshots


TODO


Disclaimer: These are my personal opinions and experiences, I strongly recommend conducting thorough research and consulting multiple sources for a comprehensive understanding of the topic.