3DEngine 3.0.80
See the version list below for details.
dotnet add package 3DEngine --version 3.0.80
NuGet\Install-Package 3DEngine -Version 3.0.80
<PackageReference Include="3DEngine" Version="3.0.80" />
paket add 3DEngine --version 3.0.80
#r "nuget: 3DEngine, 3.0.80"
// Install 3DEngine as a Cake Addin #addin nuget:?package=3DEngine&version=3.0.80 // Install 3DEngine as a Cake Tool #tool nuget:?package=3DEngine&version=3.0.80
3D Engine
Get it on the Microsoft Store
Documentation
Discord
Overview
The 3D Engine is currently in an early stage of development and is not yet equipped with the essential features required for a production-ready game engine. However, a clear and forward-looking development roadmap has been established, with active work being done to implement advanced systems such as virtualized geometry and radiance cascades for fully dynamic global illumination. As development progresses, I plan to foster a community starting next year, with the aim of building a C# game engine that integrates seamlessly with Unity workflows. With your support, we can create a powerful and user-friendly engine, complete with an editor, that meets the demands of modern game development.
Key Technologies
Windows App SDK
- Use the WinAppSDK to create beautiful, modern apps for Windows 11.
Vortice.Windows
- Vortice.Windows provides bindings for key Windows libraries including:
- DXGI, WIC, DirectWrite, Direct2D, Direct3D9, Direct3D11, Direct3D12, XInput, XAudio2, X3DAudio, DirectInput, DirectStorage, DirectML, UIAnimation, and DirectSound.
Entity Component System (ECS)
- ECS is a design pattern for high-performance and flexible game development. It emphasizes separation of data from behavior and supports the "composition over inheritance" principle, improving performance and code reusability.
Universal Scene Description (OpenUSD / USD.NET)
- OpenUSD is a framework for interchange of 3D computer graphics data. The framework focuses on collaboration, non-destructive editing, and enabling multiple views and opinions about graphics data.
Sample Projects
Voxel Sandbox
A 3D Engine sample project demonstrating the capabilities of the 3D Engine. Voxel Sandbox implements the following features:
- Chunk Generation: Procedurally generates voxel-based chunks for an expansive world.
- Noise Sampling: Utilizes noise algorithms to create realistic terrain variations.
- Mesh Generation: Dynamically generates meshes based on voxel data for efficient rendering.
- Character Controller: Implements a responsive character controller for player movement and interaction.
- Optimized Shader: Features custom shaders optimized for performance and and targeted for voxels and low memory usage.
All components are written in C#, showcasing how to leverage the 3D Engine's functionalities to build a fully-featured application.
NuGet Package
3DEngine NuGet Package:
Install the package via NuGet Package Manager for integration into your project.
dotnet new console -n Project
cd Project
dotnet add package 3DEngine
dotnet add package Costura.Fody
./Project.csproj
Setup project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<PlatformTarget>x64</PlatformTarget>
<PublishAot>true</PublishAot>
</PropertyGroup>
<ItemGroup>
<None Remove="FodyWeavers.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="3DEngine" Version="3.0.80" />
<PackageReference Include="Costura.Fody" Version="5.7.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Update="$(NuGetPackageRoot)\3dengine\3.0.80\contentFiles\any\net8.0-windows10.0.22621\Assets\Resources\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
Ensure "PreserveNewest" is set for files in the Assets folder in Visual Studio. Replace the Path to the NuGet Package 3DEngine\3.0.80
Setup program:
class Program
{
[STAThread]
private static void Main() =>
new Engine.Program().Run(
config: Engine.Config.GetDefault(
windowCommand: Engine.WindowCommand.Show,
presentInterval: Engine.PresentInterval.Immediate,
multiSample: Engine.MultiSample.x4,
resolutionScale: 1,
title: "3D Engine",
width: 2560, height: 1440,
renderGUI: true, defaultBoot: true),
initialization: () =>
Engine.Kernel.Instance.SystemManager.MainEntityManager.CreateEntity().AddComponent<GameManager>(),
frame: () => { });
}
Example script:
using System;
using System.Collections;
using System.Numerics;
using Engine;
using Engine.Buffer;
using Engine.Components;
using Engine.DataStructures;
using Engine.ECS;
using Engine.Editor;
using Engine.Framework;
using Engine.Graphics;
using Engine.GUI;
using Engine.Helper;
using Engine.Runtime;
using Engine.Utilities;
public class Example : Component
{
[ToolTip("This is a ToolTip")]
[Show]
private string _visibleString = "This field is private";
[Hide]
public string HiddenString = "This field is public";
[ShowOnly]
public string ShowOnlyString = "This string is not editable";
public int Int;
public float Float;
public Vector2 Vector2;
public Vector3 Vector3;
public Vector4 Vector4;
[Slider(1, 100)]
public float Slider;
public bool Bool;
[If("Bool", "True")]
[ShowOnly]
public string IfField = "This field is only visible if the bool is true";
[IfNot("Bool", "True")]
[ShowOnly]
public string IfNotField = "This field is only visible if the bool is not true";
[Color]
public Vector4 Color;
public Entity? _Entity;
[Space]
[Header("Header")]
public event Action? Event;
// This is the base function of OnRegister.
public override void OnRegister() =>
ScriptSystem.Register(this);
public override void OnAwake() { }
public override void OnStart() { }
public override void OnUpdate() { }
public override void OnLateUpdate() { }
public override void OnFixedUpdate() { }
public override void OnRender() { }
public override void OnGUI() { }
public override void OnDestroy() { }
}
Example usage:
Engine.Loader.ModelLoader.LoadFile(Engine.Utilities.AssetPaths.ASSETS + "Meshes\\Model.obj");
Engine.Loader.ImageLoader.LoadFile(Engine.Utilities.AssetPaths.ASSETS + "Textures\\TextureAtlas.png");
Engine.Kernel.Instance.Context.CreateShader(Engine.Utilities.AssetPaths.ASSETS + "Shaders\\VoxelShader");
Entity.Manager.CreateEntity(name: "Controller").AddComponent<PlayerController>().Initialize(this);
Entity.Manager.CreateEntity(name: "Sky").AddComponent<DefaultSky>().Initialize();
var mesh = Entity.Manager.CreateEntity().AddComponent<Mesh>();
mesh.SetMeshData(Assets.Meshes["Model.obj"]);
mesh.SetMeshData(vertices, indices, positions, InputLayoutHelper.AddPosition3D().AddUV());
mesh.SetRootSignature(new RootSignatureHelper().AddConstantBufferView(2).AddShaderResourceViewTable());
mesh.SetMaterialTextures([new("TextureAtlas.png", 0)]);
mesh.SetMaterialPipeline("VoxelShader");
Engine.Utilities.Output.Log(Entity.Transform.Position);
if (Input.GetKey(Key.Escape, InputState.Down))
{
PAUSED = !PAUSED;
if (PAUSED)
Input.SetMouseLockState(MouseLockState.Unlocked);
else
Input.SetMouseLockState(MouseLockState.LockedInvisible, 0.5, 0.5);
}
if (!PAUSED)
Input.SetCursorIcon(SystemCursor.IDC_CROSS);
Solution Structure
The 3D Engine repository includes:
- 3DEngine (Package)
- Editor
- Engine
You can build the 3DEngine (Package) for both the Editor and Engine as a MSIX Application or the Engine as a portable Win32 Application.
Upcoming Features and Development Roadmap
- USD Integration
- Materials
- Render Textures
- Compute Shaders
- Post Processing
- Gizmos
- Asynchronous Reprojection
- Radiance Cascade (Alexander Sannikov)
- Virtualized Geometry (Nano Tech, Chris K)
- Networking
- Spatial Audio
- PhysX 5
- Export Build to the Xbox Platform
Build Instructions
To compile the 3D Engine, ensure you have Visual Studio 2022 with the following components:
Screenshots
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows10.0.22621 is compatible. |
-
net8.0-windows10.0.22621
- AssimpNet (>= 4.1.0)
- FftSharp (>= 2.1.0)
- MagicPhysX (>= 1.0.0)
- Microsoft.CodeAnalysis (>= 4.11.0)
- Microsoft.CodeAnalysis.CSharp.Scripting (>= 4.11.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Net.Http (>= 4.3.4)
- System.Numerics.Vectors (>= 4.5.0)
- System.Text.RegularExpressions (>= 4.3.1)
- Twizzle.ImGui.NET (>= 1.89.4)
- Twizzle.ImGuizmo.NET (>= 1.89.4.1)
- Twizzle.ImNodes.NET (>= 1.89.4)
- Twizzle.ImPlot.NET (>= 1.89.4)
- UniversalSceneDescription (>= 6.0.0)
- Vortice.Direct2D1 (>= 3.6.2)
- Vortice.Direct3D12 (>= 3.6.2)
- Vortice.DirectInput (>= 3.6.2)
- Vortice.DirectX (>= 3.6.2)
- Vortice.Dxc (>= 3.6.2)
- Vortice.DXGI (>= 3.6.2)
- Vortice.Mathematics (>= 1.9.2)
- Vortice.Win32 (>= 2.2.6)
- Vortice.XInput (>= 3.6.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.1.0 | 131 | 10/30/2024 |
3.0.99 | 132 | 10/30/2024 |
3.0.98 | 145 | 10/30/2024 |
3.0.97 | 141 | 10/29/2024 |
3.0.96 | 130 | 10/29/2024 |
3.0.95 | 112 | 10/29/2024 |
3.0.94 | 119 | 10/29/2024 |
3.0.93 | 108 | 10/29/2024 |
3.0.92 | 113 | 10/29/2024 |
3.0.91 | 106 | 10/29/2024 |
3.0.90 | 127 | 10/29/2024 |
3.0.89 | 147 | 10/29/2024 |
3.0.88 | 127 | 10/29/2024 |
3.0.87 | 115 | 10/29/2024 |
3.0.86 | 121 | 10/29/2024 |
3.0.85 | 109 | 10/29/2024 |
3.0.84 | 113 | 10/29/2024 |
3.0.83 | 128 | 10/29/2024 |
3.0.82 | 134 | 10/27/2024 |
3.0.81 | 115 | 10/26/2024 |
3.0.80 | 131 | 10/26/2024 |
3.0.79 | 113 | 10/25/2024 |
3.0.78 | 129 | 10/24/2024 |
3.0.77 | 112 | 10/24/2024 |
3.0.76 | 105 | 10/24/2024 |
3.0.75 | 138 | 10/24/2024 |
3.0.74 | 133 | 10/23/2024 |
3.0.73 | 137 | 10/23/2024 |
3.0.72 | 152 | 10/23/2024 |
3.0.71 | 123 | 10/23/2024 |
3.0.70 | 109 | 10/21/2024 |
3.0.69 | 129 | 10/21/2024 |
3.0.68 | 136 | 10/21/2024 |
3.0.67 | 121 | 10/21/2024 |
3.0.66 | 105 | 10/21/2024 |
3.0.65 | 114 | 10/21/2024 |
3.0.64 | 111 | 10/21/2024 |
3.0.63 | 130 | 10/21/2024 |
3.0.62 | 127 | 10/21/2024 |
3.0.61 | 116 | 10/21/2024 |
3.0.60 | 128 | 10/21/2024 |
3.0.59 | 118 | 10/21/2024 |
3.0.58 | 103 | 10/21/2024 |
3.0.57 | 115 | 10/21/2024 |
3.0.56 | 132 | 10/21/2024 |
3.0.55 | 131 | 10/21/2024 |
3.0.54 | 154 | 10/19/2024 |
3.0.53 | 140 | 10/19/2024 |
3.0.52 | 198 | 10/19/2024 |
3.0.51 | 175 | 10/19/2024 |
3.0.50 | 197 | 10/18/2024 |
3.0.49 | 128 | 10/18/2024 |
3.0.48 | 158 | 10/17/2024 |
3.0.47 | 130 | 10/17/2024 |
3.0.46 | 118 | 10/17/2024 |
3.0.45 | 146 | 10/17/2024 |
3.0.44 | 153 | 10/17/2024 |
3.0.43 | 138 | 10/17/2024 |
3.0.42 | 134 | 10/17/2024 |
3.0.41 | 143 | 10/17/2024 |
3.0.40 | 134 | 10/17/2024 |
3.0.39 | 139 | 10/9/2024 |
3.0.38 | 140 | 10/9/2024 |
3.0.37 | 112 | 10/7/2024 |
3.0.36 | 102 | 10/7/2024 |
3.0.35 | 104 | 10/7/2024 |
3.0.34 | 117 | 10/3/2024 |
3.0.33 | 139 | 10/1/2024 |
3.0.32 | 147 | 10/1/2024 |
3.0.31 | 149 | 9/30/2024 |
3.0.30 | 112 | 9/30/2024 |
3.0.29 | 115 | 9/30/2024 |
3.0.28 | 123 | 9/28/2024 |
3.0.27 | 143 | 9/27/2024 |
3.0.26 | 142 | 9/26/2024 |
3.0.25 | 132 | 9/25/2024 |
3.0.24 | 115 | 9/25/2024 |
3.0.23 | 128 | 9/22/2024 |
3.0.21 | 125 | 9/19/2024 |
3.0.19 | 135 | 9/19/2024 |
3.0.18 | 130 | 9/18/2024 |
3.0.17 | 127 | 9/18/2024 |
3.0.16 | 132 | 9/18/2024 |
3.0.15 | 180 | 9/17/2024 |
3.0.14 | 128 | 9/17/2024 |
3.0.13 | 129 | 9/17/2024 |
3.0.12 | 195 | 9/15/2024 |
3.0.11 | 165 | 9/15/2024 |
3.0.10 | 149 | 9/15/2024 |
3.0.9 | 144 | 9/15/2024 |
3.0.8 | 145 | 9/15/2024 |
3.0.7 | 151 | 9/15/2024 |
3.0.6 | 137 | 9/15/2024 |
3.0.5 | 146 | 9/15/2024 |
3.0.4 | 142 | 9/15/2024 |
3.0.3 | 159 | 9/15/2024 |
3.0.2 | 163 | 9/11/2024 |
3.0.1 | 173 | 9/11/2024 |
3.0.0 | 163 | 9/8/2024 |
2.2.2 | 153 | 8/11/2024 |
2.0.2 | 330 | 3/7/2024 |
2.0.1 | 267 | 2/25/2024 |
2.0.0 | 291 | 2/25/2024 |
1.0.7 | 744 | 10/20/2023 |
1.0.6 | 248 | 10/20/2023 |
1.0.5 | 308 | 10/19/2023 |
1.0.4 | 293 | 10/18/2023 |
1.0.3 | 336 | 10/18/2023 |
1.0.2 | 292 | 10/18/2023 |
1.0.1 | 363 | 10/18/2023 |
1.0.0 | 333 | 10/13/2023 |