Skip to content

kateBea/Mikoto

Repository files navigation

Mikoto Engine

CodeFactor License

Mikoto is an open-source, Vulkan-based game engine written in modern C++. Developed as an educational project, the engine aims to provide hands-on learning experiences in graphics programming while helping me explore the capabilities of the Vulkan API.

The develop branch is a WIP for the Mikoto's new architecture. It brings some new features, like resources pools, automatic resource cleanup, and abstraction on top of render passes, amongst other features.


Mikoto Engine


Mikoto Engine


Mikoto Engine


Mikoto Engine


Mikoto Engine


Mikoto Engine


Feature List

Category Feature Name Feature Description Supported
Core Engine Model Loading Load 3D models via GLTF (for gltf scenes), defaults to Assimp for other formats ✔️
Image Loading Texture/Image loading via STB_Image ✔️
Cube maps Load equirectangular HDR images and use them as cube maps, requires pass to project from 2D to Cube ✔️
Entity Component System ECS for scene/game object management ✔️
Scene Serialization Editor scene save/load ❌ (WIP)
Particle System GPU particle simulation (fire, smoke, sparks, etc.)
Vulkan Ray Tracing Hardware accelerated RT
Physics Integration Basic collision detection with Jolt ✔️ (WIP)
UI Integration (ImGui) Runtime + editor ImGui ✔️
Animation System Skeletal animation, skinning
Audio Support Load and play audio ✔️
Text Rendering / Overlay MSDF-based text rendering ✔️ (WIP)
Visual Effects Clustered Forward+ Main render path with clustered/forward+ lighting ✔️ (WIP)
Clustered Light Culling Per-tile/cluster light assignment ✔️
Mesh Culling CPU mesh visibility culling
IBL (Image-Based Lighting) Diffuse irradiance + specular reflections
Shadows Directional, point, spot shadows
Cascaded Shadow Maps (CSM) Multi-split directional shadows
Outline Pass Object outlining effect
Infinite Grid Procedural grid for editor/world ✔️ (WIP)
Bloom Multi-pass bright blur
Depth of Field (DoF) DoF effect
Screen-Space Reflections (SSR) Reflections in screen space
Screen-Space GI (SSGI) Screen-space diffuse bounce lighting
Editor / Tools Gizmos (ImGuizmo) Move/rotate/scale gizmos ✔️ (Translations only)
Profiling / GPU Timers Pass timing, pipeline stats ❌ (WIP)
Asset Streaming Task-based async resource loading
Shader hot reloading Shader hot reload
Asset hot reloading Asset hot reload for scripts, etc. ✔️ (Limited, Scripts only)

Platform Support

Platform / Toolchain Architecture Status Notes
Ubuntu 24.04 LTS (GCC 13.3.0) x86_64 Supported (Tested) Tested
Other Linux Distros x86_64 Untested Untested
Windows (MSVC) x86_64 Supported (Tested) Tested
Windows (MinGW-w64) x86_64 Untested Untested

Note: This project has been tested on Ubuntu 24.04 for Linux compatibility. While it works properly on Windows, other Linux distributions are currently untested.


Requirements

Software Requirements

Software Requirements

  • CMake 3.22+ – Required for configuring and building the project.
  • Vulkan SDK – Install from the official LunarG SDK.
  • C++20-compatible compiler – Tested with GCC 13.3.0; other C++20 compilers should work but are untested.
  • Visual Studio 2022 onwards (Windows) – Recommended IDE and toolchain for Windows builds.
  • GLSL-C (Optional) – Only needed if you want to recompile shaders; precompiled SPIR-V binaries are already included.

Folder Structure

  • Resources/: Resources screenshots and some models to play around with.
  • Mikoto-Engine/: The core engine that powers the editor.
  • Mikoto-Editor/: The editor project for creating and managing game scenes.
  • Mikoto-Sandbox/: A sample project that demonstrates some of the engine's features.
  • Mikoto-Tests/: Contains lists of tests against the core engine.
  • Mikoto-Apps/: Standalone applications that showcase Mikoto features

Some models used for demos were downloaded from Morgan McGuire's Computer Graphics Archive https://casual-effects.com/data


Building Mikoto Engine

The build process is currently verified on both Linux and Windows. On Windows, the only requirements are the Vulkan SDK and Visual Studio.

Pre-Setup

Mikoto uses Lua 5.1+ for scripting. To set it up on Linux, follow these steps:

  1. Download Lua from the official Lua downloads page: https://www.lua.org/download.html and get the .tar.gz file.

  2. Run the following commands in your terminal:

# Access contents
tar -xvf lua-5.4.8.tar.gz
cd lua-5.4.8

# Install and tests lua
sudo make
sudo make test
sudo make install

If lua has been installed, the command lua -v should print something like the following:

Lua 5.4.8  Copyright (C) 1994-2025 Lua.org, PUC-Rio

Precompiled binaries are shipped with Mikoto to compile with MSVC on Windows.

Project Build

On Linux, we need to install certain dependencies to get started, we can do so by passing target InstallDependencies (--target InstallDependencies) to CMake command to install necessary dependencies, user might be prompted to give permissions:

cmake --build . --target InstallDependencies --config Release 
cmake --build . --config Release

Linux Required libraries

Following there's an example installation directly from the terminal on Ubuntu 24.04 (commands extracted from install.sh):

# Vulkan
sudo apt install vulkan-tools
sudo apt install libvulkan-dev  vulkan-validationlayers
sudo apt install vulkan-utility-libraries-dev spirv-tools

# Native file dialog
sudo apt-get install libgtk-3-dev

# GLFW
sudo apt install libwayland-dev libxkbcommon-dev xorg-dev
   

With the dependencies installed we can proceed with building the project:

# Fetch the repository. Recurse to pull the submodules
git clone --recursive https://github.com/kateBea/Mikoto.git
cd Mikoto

# Generate platform specific build system files
mkdir build && cd build

# This will pull the necessary third party repos
cmake -S .. -B .

# Build the application
cmake --build . --config Release

For Visual Studio users, CMake will generate .sln files by default. We want to open the solution in Visual Studio and build from there. CLion users can open the project directly and build it without extra steps.

Dependencies

The development of Mikoto Engine is made possible thanks to these fantastic third-party libraries:

Library Description Link
FMT Modern C++ formatting library fmtlib/fmt
GLEW OpenGL Extension Wrangler Library GLEW
GLFW Multi-platform library for window management glfw/glfw
GLM OpenGL Mathematics library g-truc/glm
ImGui Immediate Mode GUI library ocornut/imgui
Spdlog Fast C++ logging library gabime/spdlog
EnTT Fast and efficient Entity-Component System skypjack/entt
Volk Meta-loader for Vulkan API zeux/volk
Assimp Asset importer library assimp/assimp
VulkanMemoryAllocator Memory allocation for Vulkan resources GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
ImGuizmo Gizmo manipulator for ImGui CedricGuillemet/ImGuizmo
yaml-cpp YAML parser and emitter for C++ jbeder/yaml-cpp
nativefiledialog-extended File dialog library for native UIs btzy/nativefiledialog-extended
JoltPhysics Physics engine library jrouwe/JoltPhysics
tomlplusplus TOML configuration file parser for C++ marzer/tomlplusplus
stb_image Image loading library nothings/stb
msdf-atlas-gen Multi-channel signed distance field generator Chlumsky/msdf-atlas-gen
TaskFlow Moder C++ Task library [https://github.com/taskflow/taskflow)
Sol2 Moder C++ Library for Scripting with Lua [https://github.com/ThePhD/sol2)

Networking

Mikoto includes a networking layer built on top of ASIO to support TCP sockets. The engine supports both HTTP and HTTPS connections, but HTTPS requires OpenSSL to be installed on your system. If OpenSSL is not available the engine falls back to HTTP support only.

Profiling with Tracy

Mikoto integrates the Tracy Profiler for CPU, GPU, and memory profiling.

When Tracy instrumentation is enabled, the Tracy Profiler GUI must be running. If the profiler is not connected, Tracy will continue to run internally, which can lead to memory leaks. By default Tracy is disabled, in order to enabled one must compile with the MIKOTO_ENABLE_TRACY_PROFILING flag enabled in the CmakeLists.txt file. See the Editor CMake file for reference.

User will need to run Mikoto with Tracy's Profiler v3.3.0 which is the version used by the engine.

Slang in Mikoto

Mikoto uses the Slang shading language for runtime shader compilation (Reflection is still done by spirv-reflect).
The engine ships with precompiled Slang binaries, so no manual setup is required to use Slang with Mikoto.

If you prefer to download or update Slang manually, you can find the official releases here:

Mikoto will automatically use the bundled version, but replacing it with another official release is supported as long as the Slang directory structure remains unchanged.

Goals

The primary goal of Mikoto Engine is to serve as a learning platform for exploring modern graphics programming techniques. Features are implemented progressively as new concepts and ideas are explored.


Special Thanks

The development of Mikoto has been inspired by the work of the following:


Future Development

Mikoto Engine is still in its early stages, and additional features and optimizations will be added over time. Feedback is always welcome!


License

This project is licensed under the Apache License 2.0.

You are free to use, modify, and distribute this software under the terms of the Apache License 2.0. A copy of the license is included in the repository.

For the full license text, see the LICENSE file in the repository.

About

Mikoto is a cross-platform game engine built on top of the Vulkan API and written using modern C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors