Skip to content

Repository files navigation

W.I.P Cross-platform 3D Game Engine with C++20 and C# gameplay scripting

Getting Started | Features | Dependencies | RoadMap

Preview

For more examples, please see Samples. Sample2

Features

List is W.I.P (There are lots of features not written here)

Engine
- Custom Entity Component System (using entt as back-bone while providing systems that manages components)
- Multi-Threaded tasks execution (Job-system)
Assets
- All assets are loaded/imported asynchronously.
- Uses Assimp to import 40+ 3D model formats.
- Uses Freeimage to import 30+ image formats.
- Uses libsndfile to import 20+ sound files formats.
- All imported assets are exported into a unified formats for faster loading.
- All imported assets have a meta file that describes further loading.
- Every asset is identified with a unique UUID given on its creation.
- Section W.I.P
Graphics
- Dynamic light Component (Directional & Point & Spot)
- Flexable Material System (using different pipelines/shaders/textures for every material)
- Shadow Mapping for all light sources.
- PBR With Image Based Lighting shaders.
- Section W.I.P
Audio
- Uses OpenAL or XAudio2 as a low-level backends
- Section W.I.P
Physics
- PhysX 4.1 integration
- Section W.I.P
Scripting
- Reflected C++20 behaviors compiled as generation-specific native packages
- C# scripting hosted on CoreCLR (.NET 8)
- Ordered C++ and C# behaviors can coexist on an entity
- State-preserving reload with field rename aliases and rollback on load failure
- See [C++ and C# scripting](Docs/Scripting.md)

Building

Follow the instructions below to compile and run the engine from source. If you wish to build with another compiler/platform, please note that:

  • The engine requires a C++20 compiler and currently only supports x64 platforms (support for x32 is planned)
  • The engine doesn't contain platform-specific code and is written with cross-platform portability in mind, so porting to other platforms should be easy.

Modular runtime

The repository contains normal Visual Studio projects for every kernel library, engine module, host, tool, and test. Open Nuclear Engine.sln, select Debug|x64 or Release|x64, and build the solution. From a Developer PowerShell, the equivalent command is:

msbuild "Nuclear Engine.sln" /p:Configuration=Debug /p:Platform=x64
msbuild Tests/Nuclear.Tests.proj /t:Test /p:Configuration=Debug /p:Platform=x64

Runtime output is written under Build/Binaries/<configuration>:

Binaries/Debug/
  Nuclear.GameHost.exe
  Nuclear.EditorHost.exe
  Nuclear.ServerHost.exe
  Nuclear.Foundation.dll
  Nuclear.Platform.dll
  Nuclear.Core.dll
  Config/Profiles/*.toml
  Modules/*.dll
  Modules/*.module.toml

Foundation, Platform, and Core form the non-optional kernel. Profiles then declare modules that are required, optional, or excluded for Game, Editor, and Server hosts. Required modules cannot be disabled. Optional modules are selected before startup with a project configuration:

profile = "Game"

[modules]
Nuclear.Audio = true
Nuclear.Physics.PhysX = true
Nuclear.Scripting.Native = true
Nuclear.Scripting.DotNet = true

Run a host with --project-config=<path>. The module manager validates the ABI/build ID, resolves dependencies deterministically, rejects cycles and invalid phase dependencies, and performs reverse-order rollback and shutdown. Runtime selection means process-start selection; unloading arbitrary C++ modules while engine objects are alive is intentionally unsupported.

New modules belong in Nuclear.Engine/Source/Runtime/Modules/<Name> with Public API headers, Private implementation sources, and their .vcxproj in that same directory. Import ../Nuclear.Module.props and ../Nuclear.Module.targets, then declare runtime dependencies in the project’s manifest properties. Module DLLs communicate through registered service interfaces instead of linking to one another.

Windows

  • Visual Studio 2026 with the Desktop development with C++ workload and .NET 8 SDK is required
  • Clone repo & submodules
  • Open Nuclear Engine.sln and set your solution configuration and platform
  • Build the solution

Other Platforms

  • Planned platforms:
    • Desktop: Linux - MacOS
    • Mobile: Android - IOS

Consoles are planned but not a priority now...

Dependencies

Dependencies Type Buildling
Assimp Submodule Upstream source
DiligentCore Submodule Upstream source
OpenAL-soft Submodule Upstream source
PhysX 4.1 submodule Built with their provided build-tools
Freeimage submodule Built with their provided build-tools
Freetype submodule Built with their provided build-tools
msdf-atlas-gen submodule Built with their provided build-tools
.NET native hosting headers Vendored Official MIT-licensed hostfxr.h and coreclr_delegates.h
.NET 8 System runtime Install the .NET 8 runtime or set DOTNET_ROOT
SDL2 External Put headers in External/SDL/include
libsndfile External Put the .lib in your Build Output directory
spdlog included Built with the engine
IMGUI included Built with the engine
stb_truetype included Built with the engine
entt included Built with the engine
zpp::bits included Built with the engine

Download external dependencies through their sites. Put all their .lib in the bin folder.

RoadMap

  • V0.01 Alpha:
    • Complete RenderSystem (50%)
    • Complete AudioSystem Implementation. (75%)
      • Fix AudioSource/Listener Velocity change callbacks
      • Add Support for streaming AudioClips
      • Add AudioCapture support (Microphones)
    • Basic Implementaion of PhysX.
    • Complete Samples & their documentation.

Current To-dos

  • W.I.P:

    • CPU & GPU Queries & Memory/Performance Profilers
    • Add non-Windows project generation when Linux/macOS support begins.
    • New Rendering Effects (Fog - SSAO - SSR - Motion Blur)
    • PostProcessing effects should be processed per camera not only in the main camera.
    • Start implementing 2D sprite rendering (+ start implementing GUI/Text Rendering)
  • On-Hold:

    • Text rendering (text tile-set creation finished)
    • Basic Editor support (Nuclear Editor).
    • Finish reflecting the C++ api to the C# scripting assembly (prob provide a build-time solution that builds a binding lib?)
    • Serializing the scene & assets.
  • TODO:

    • CSM
    • FIX BRDF generation in IBL Pipeline
    • Clean and document Samples.
    • GUI (basic widgets)

Contributing

  • Contributions are welcome, just open a pull request or an issue. You can also join us in GitHub Discussions.

About

A W.I.P Modern C++20 Cross-Platform Game Engine with C# Scripting.

Topics

Resources

Stars

91 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages