{"id":15060001,"url":"https://github.com/cantalat-yakan/3dengine","last_synced_at":"2025-03-17T16:13:25.999Z","repository":{"id":63378829,"uuid":"550101917","full_name":"CanTalat-Yakan/3DEngine","owner":"CanTalat-Yakan","description":"3D Game Engine - .NET 8.0 - C# 12 - WinAppSDK Editor","archived":false,"fork":false,"pushed_at":"2024-10-30T14:45:48.000Z","size":298250,"stargazers_count":59,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T16:13:14.373Z","etag":null,"topics":["csharp","csharp12","direct3d11","directx","dotnet","dotnet8","ecs","editor","engine","entity","game-engine","gamedev","gameengine","nuget","vortice","winappsdk","winui3"],"latest_commit_sha":null,"homepage":"https://discord.gg/c3UtTVNbRb","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CanTalat-Yakan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-12T07:55:28.000Z","updated_at":"2025-03-09T17:18:27.000Z","dependencies_parsed_at":"2023-10-13T08:42:31.100Z","dependency_job_id":"1f0faf68-85d3-4c89-9117-2008587a0d13","html_url":"https://github.com/CanTalat-Yakan/3DEngine","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CanTalat-Yakan%2F3DEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CanTalat-Yakan%2F3DEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CanTalat-Yakan%2F3DEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CanTalat-Yakan%2F3DEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CanTalat-Yakan","download_url":"https://codeload.github.com/CanTalat-Yakan/3DEngine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244066189,"owners_count":20392406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","csharp12","direct3d11","directx","dotnet","dotnet8","ecs","editor","engine","entity","game-engine","gamedev","gameengine","nuget","vortice","winappsdk","winui3"],"created_at":"2024-09-24T22:51:02.413Z","updated_at":"2025-03-17T16:13:25.925Z","avatar_url":"https://github.com/CanTalat-Yakan.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/3DEngine_Logo_BG.png)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/CanTalat-Yakan/3DEngine/blob/main/LICENSE) \n\n# 3D Engine\n\n[Get it on the Microsoft Store](https://www.microsoft.com/store/apps/9NFSX6JPV0PS)  \n[Documentation](https://engine3d.gitbook.io/wiki/)  \n[Discord](https://discord.gg/c3UtTVNbRb)\n\n## Overview\n\nThe 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. \nHowever, 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.\nAs 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. \nWith your support, we can create a powerful and user-friendly engine, complete with an editor, that meets the demands of modern game development.\n\n## Key Technologies\n\n### Windows App SDK\n\n- **Use the [WinAppSDK](https://github.com/microsoft/WindowsAppSDK) to create beautiful, modern apps for Windows 11.**\n\n### Vortice.Windows\n\n- **[Vortice.Windows](https://github.com/amerkoleci/Vortice.Windows)** provides bindings for key Windows libraries including:\n  - DXGI, WIC, DirectWrite, Direct2D, Direct3D9, Direct3D11, Direct3D12, XInput, XAudio2, X3DAudio, DirectInput, DirectStorage, DirectML, UIAnimation, and DirectSound.\n  \n### Entity Component System (ECS)\n\n- **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.\n\n### Universal Scene Description (OpenUSD / USD.NET)\n\n- **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.\n\n## Sample Projects\n\n### [Voxel Sandbox](https://github.com/CanTalat-Yakan/Voxel-Sandbox)\n\nA 3D Engine sample project demonstrating the capabilities of the 3D Engine. **Voxel Sandbox** implements the following features:\n\n- **Chunk Generation**: Procedurally generates voxel-based chunks for an expansive world.\n- **Noise Sampling**: Utilizes noise algorithms to create realistic terrain variations.\n- **Mesh Generation**: Dynamically generates meshes based on voxel data for efficient rendering.\n- **Character Controller**: Implements a responsive character controller for player movement and interaction.\n- **Optimized Shader**: Features custom shaders optimized for performance and and targeted for voxels and low memory usage.\n\nAll components are written in C#, showcasing how to leverage the 3D Engine's functionalities to build a fully-featured application.\n\n## NuGet Package\n\n### **[3DEngine NuGet Package](https://www.nuget.org/packages/3DEngine/)**: \n\nInstall the package via NuGet Package Manager for integration into your project.\n\n```bash\ndotnet new console -n Project\ncd Project\ndotnet add package 3DEngine\ndotnet add package Costura.Fody\n./Project.csproj\n```\n\n### Setup project:\n\n```xml\n\u003cProject Sdk=\"Microsoft.NET.Sdk\"\u003e\n    \u003cPropertyGroup\u003e\n        \u003cOutputType\u003eWinExe\u003c/OutputType\u003e\n        \u003cTargetFramework\u003enet8.0-windows10.0.22621.0\u003c/TargetFramework\u003e\n        \u003cImplicitUsings\u003eenable\u003c/ImplicitUsings\u003e\n        \u003cSatelliteResourceLanguages\u003een\u003c/SatelliteResourceLanguages\u003e\n        \u003cPlatformTarget\u003ex64\u003c/PlatformTarget\u003e\n        \u003cPublishAot\u003etrue\u003c/PublishAot\u003e\n    \u003c/PropertyGroup\u003e\n\n    \u003cItemGroup\u003e\n      \u003cNone Remove=\"FodyWeavers.xml\" /\u003e\n    \u003c/ItemGroup\u003e\n\n    \u003cItemGroup\u003e\n        \u003cPackageReference Include=\"3DEngine\" Version=\"3.1.0\" /\u003e\n        \u003cPackageReference Include=\"Costura.Fody\" Version=\"5.7.0\"\u003e\n          \u003cPrivateAssets\u003eall\u003c/PrivateAssets\u003e\n        \u003c/PackageReference\u003e\n    \u003c/ItemGroup\u003e\n\n    \u003cItemGroup\u003e\n        \u003cContent Update=\"$(NuGetPackageRoot)\\3dengine\\3.1.0\\contentFiles\\any\\net8.0-windows10.0.22621\\Assets\\Resources\\**\\*\"\u003e\n            \u003cCopyToOutputDirectory\u003ePreserveNewest\u003c/CopyToOutputDirectory\u003e\n        \u003c/Content\u003e\n    \u003c/ItemGroup\u003e\n\n    \u003cItemGroup\u003e\n      \u003cNone Update=\"Assets\\Generators\\FileNamesEnumGenerator.tt\"\u003e\n        \u003cGenerator\u003eTextTemplatingFileGenerator\u003c/Generator\u003e\n        \u003cLastGenOutput\u003eFileNamesEnumGenerator.cs\u003c/LastGenOutput\u003e\n      \u003c/None\u003e\n    \u003c/ItemGroup\u003e\n    \n    \u003cItemGroup\u003e\n      \u003cService Include=\"{508349b6-6b84-4df5-91f0-309beebad82d}\" /\u003e\n    \u003c/ItemGroup\u003e\n    \n    \u003cItemGroup\u003e\n      \u003cCompile Update=\"Assets\\Generators\\FileNamesEnumGenerator.cs\"\u003e\n        \u003cDesignTime\u003eTrue\u003c/DesignTime\u003e\n        \u003cAutoGen\u003eTrue\u003c/AutoGen\u003e\n        \u003cDependentUpon\u003eFileNamesEnumGenerator.tt\u003c/DependentUpon\u003e\n      \u003c/Compile\u003e\n    \u003c/ItemGroup\u003e\n\u003c/Project\u003e\n```\n\nEnsure \"PreserveNewest\" is set for files in the Assets folder in Visual Studio. Replace the Path to the NuGet Package 3DEngine\\3.1.0\n\n### Setup program:\n\n```csharp\nclass Program\n{\n    [STAThread]\n    private static void Main() =\u003e\n        new Engine.Program().Run(\n            config: Engine.Config.GetDefault(\n              windowCommand: Engine.WindowCommand.Show,\n              presentInterval: Engine.PresentInterval.Immediate,\n              multiSample: Engine.MultiSample.x4,\n              resolutionScale: 1,\n              title: \"3D Engine\",\n              width: 2560, height: 1440,\n              renderGUI: true, defaultBoot: true),\n            initialization: () =\u003e \n              Engine.Kernel.Instance.SystemManager.MainEntityManager.CreateEntity().AddComponent\u003cGameManager\u003e(),\n            frame: () =\u003e { });\n}\n```\n\n### Example script:\n\n```csharp\nusing System;\nusing System.Collections;\nusing System.Numerics;\n\nusing Engine;\nusing Engine.Buffer;\nusing Engine.Components;\nusing Engine.DataStructures;\nusing Engine.ECS;\nusing Engine.Editor;\nusing Engine.Framework;\nusing Engine.Graphics;\nusing Engine.GUI;\nusing Engine.Helper;\nusing Engine.Runtime;\nusing Engine.Utilities;\n\npublic class Example : Component\n{\n    [ToolTip(\"This is a ToolTip\")]\n    [Show]\n    private string _visibleString = \"This field is private\";\n    [Hide]\n    public string HiddenString = \"This field is public\";\n    [ShowOnly]\n    public string ShowOnlyString = \"This string is not editable\";\n    public int Int;\n    public float Float;\n    public Vector2 Vector2;\n    public Vector3 Vector3;\n    public Vector4 Vector4;\n    [Slider(1, 100)]\n    public float Slider;\n    public bool Bool;\n    [If(\"Bool\", \"True\")]\n    [ShowOnly]\n    public string IfField = \"This field is only visible if the bool is true\";\n    [IfNot(\"Bool\", \"True\")]\n    [ShowOnly]\n    public string IfNotField = \"This field is only visible if the bool is not true\";\n    [Color]\n    public Vector4 Color;\n    public Entity? _Entity;\n    [Space]\n    [Header(\"Header\")]\n    public event Action? Event;\n\n    // This is the base function of OnRegister.\n    public override void OnRegister() =\u003e\n        ScriptSystem.Register(this);\n      \n    public override void OnAwake() { }\n    public override void OnStart() { }\n    public override void OnUpdate() { }\n    public override void OnLateUpdate() { }\n    public override void OnFixedUpdate() { }\n    public override void OnRender() { }\n    public override void OnGUI() { }\n    public override void OnDestroy() { }\n}\n```\n\n### Example usage:\n\n```csharp\nEngine.Loader.ModelLoader.LoadFile(Engine.ModelFiles.Model);\nEngine.Loader.ModelLoader.LoadFile(Engine.Utilities.AssetPaths.MESHES + \"Model.obj\");\n\nEngine.Loader.ImageLoader.LoadFile(Engine.TextureFiles.TextureAtlas);\nEngine.Loader.ImageLoader.LoadFile(Engine.Utilities.AssetPaths.TEXTURES + \"Texture.png\");\n\nEngine.Kernel.Instance.Context.CreateShader(Engine.Utilities.AssetPaths.SHADERS + \"Shader\");\nEngine.Kernel.Instance.Context.CreateComputeShader(Engine.Utilities.AssetPaths.COMPUTESHADERS + \"ComputeShader\");\n\nEntity.AddComponent\u003cExample\u003e();\n\nEntity.Manager.CreateEntity(name: \"Controller\").AddComponent\u003cPlayerController\u003e().Initialize(this);\nEntity.Manager.CreateEntity(name: \"Sky\").AddComponent\u003cDefaultSky\u003e().Initialize();\n\nvar mesh = Entity.Manager.CreateEntity().AddComponent\u003cMesh\u003e();\n\nmesh.SetMeshData(ModelFiles.Model);\nmesh.SetMeshData(Assets.Meshes[\"Model.obj\"]);\nmesh.SetMeshData(vertices, indices, positions, new InputLayoutHelper().AddPosition3D().AddUV());\n\nmesh.SetRootSignature();\nmesh.SetRootSignature(new RootSignatureHelper().AddConstantBufferView(2).AddShaderResourceViewTable());\n\nmesh.SetMaterialTextures(TextureFiles.Texture);\nmesh.SetMaterialTextures(textureEntries: [new(\"Texture.png\", 0)]);\n\nmesh.SetMaterialPipeline(ShaderFiles.Shader);\nmesh.SetMaterialPipeline(\"Shader\");\n\nEngine.Utilities.Output.Log(Entity.Transform.Position);\n\nif (Input.GetKey(Key.Escape, InputState.Down))\n{\n    PAUSED = !PAUSED;\n\n    if (PAUSED)\n        Input.SetMouseLockState(MouseLockState.Unlocked);\n    else\n        Input.SetMouseLockState(MouseLockState.LockedInvisible, 0.5, 0.5);\n}\n\nif (!PAUSED)\n    Input.SetCursorIcon(SystemCursor.IDC_CROSS);\n```\n\n## Solution Structure\n\nThe 3D Engine repository includes:\n- **3DEngine (Package)**\n- **Editor**\n- **Engine**\n\nYou can build the 3DEngine (Package) for both the Editor and Engine as a MSIX Application or the Engine as a portable Win32 Application.\n\n## Upcoming Features and Development Roadmap\n\n- USD Integration\n- Materials\n- Render Textures\n- Compute Shaders\n- Post Processing\n- Gizmos\n- Asynchronous Reprojection\n- Radiance Cascade (Alexander Sannikov)\n- Virtualized Geometry (Nano Tech, Chris K)\n- Networking\n- Spatial Audio\n- PhysX 5\n- Export Build to the Xbox Platform\n\n## Build Instructions\n\nTo compile the 3D Engine, ensure you have [Visual Studio 2022](https://visualstudio.microsoft.com/vs) with the following components:\n\n- [Windows App SDK](https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads)\n- [Visual Studio Installer](https://visualstudio.microsoft.com/vs) with:\n  - [.NET 8.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)\n  - [Windows 11 SDK (10.0.22621.0)](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk)\n\n## Screenshots\n\n![3D Engine Layout](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Layout.png)\n![1](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_1.png)\n![2](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_2.png)\n![3](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_3.png)\n![4](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_4.png)\n![5](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_5.png)\n![6](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_6.png)\n![7](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_7.png)\n![8](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_8.png)\n![9](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_9.png)\n![10](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_10.png)\n![13](https://raw.githubusercontent.com/CanTalat-Yakan/3DEngine/main/Images/Screenshot_Folder.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcantalat-yakan%2F3dengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcantalat-yakan%2F3dengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcantalat-yakan%2F3dengine/lists"}