A C# game engine built on .NET 10 with an integrated ImGui editor — no separate editor/runtime split. The executable is the editor, like Unity.
Built with Silk.NET for windowing, OpenGL, and input. Editor UI powered by Dear ImGui via ImGui.NET.
- Integrated editor — windowed editor with dockable panels; switch to full-screen play mode instantly
- Entity Component System (ECS) — lightweight entity/component architecture with typed and untyped APIs
- ImGui editor panels
- Hierarchy — list, select, create, duplicate, delete entities
- Inspector — edit component values (position, rotation, scale, tag); add/remove components via dropdown
- Viewport — game renders into an OpenGL framebuffer displayed as an ImGui image; pan with middle-mouse, zoom with scroll wheel, click to select entities
- Assets — recursive browser of the
Assets/folder - Console — color-coded log with Info / Warning / Error filters and auto-scroll
- Editor & play modes — editor mode pauses game logic; play mode hides panels and runs the full game loop; Escape returns to editor
- Scene serialization — save and load scenes as
.ngsJSON files - Static Logger —
Logger.Info/Warn/Errorfeeds the console panel from anywhere in the engine
- .NET 10 SDK
- A GPU with OpenGL 3.3+ support
git clone https://github.com/L-N-X-1/NextGenEngine.git
cd NextGenEngine
dotnet runThe editor window opens immediately. No project setup required.
| Package | Version |
|---|---|
Silk.NET.Windowing |
2.23.0 |
Silk.NET.OpenGL |
2.23.0 |
Silk.NET.OpenGL.Extensions.ImGui |
2.23.0 |
Silk.NET.Input |
2.23.0 |
Silk.NET.Maths |
2.23.0 |
ImGui.NET is a transitive dependency of Silk.NET.OpenGL.Extensions.ImGui.
NextGenEngine/
├── Core/
│ ├── Engine.cs # Main loop, mode switching, owns all subsystems
│ └── Logger.cs # Static logger; feeds the Console panel
├── Rendering/
│ ├── Renderer.cs # OpenGL wrapper, clear color
│ └── Framebuffer.cs # FBO + color texture + depth RBO; used for viewport
├── Input/
│ └── InputManager.cs # Keyboard/mouse state; exposes IInputContext for ImGui
├── ECS/
│ ├── ECS.cs # Entity struct, IComponent, ComponentStore
│ ├── EntityManager.cs # Create/destroy entities; CreateEntityWithId for deserialization
│ └── Components.cs # TransformComponent, TagComponent
├── Scenes/
│ ├── SceneManager.cs # Holds active scene; forwards Update/Render
│ ├── MainScene.cs # Default scene — WASD player movement
│ └── SceneSerializer.cs # Save/load scenes as .ngs JSON
├── Assets/
│ └── AssetManager.cs # String-keyed asset cache
└── Editor/
├── EditorManager.cs # Orchestrates panels, dockspace, menu bar
├── EditorCamera.cs # Viewport pan/zoom
└── Panels/
├── HierarchyPanel.cs
├── InspectorPanel.cs
├── ViewportPanel.cs
├── AssetsPanel.cs
└── ConsolePanel.cs
| Action | Input |
|---|---|
| Pan viewport | Middle-mouse drag |
| Zoom viewport | Scroll wheel |
| Select entity | Left-click in Viewport |
| Create entity | Right-click in Hierarchy → Create Empty Entity |
| Delete entity | Right-click entity in Hierarchy → Delete |
| Add component | Inspector → Add Component button |
| Remove component | Right-click component header in Inspector |
| Save scene | File → Save Scene (saves to scene.ngs) |
| Load scene | File → Open Scene (loads from scene.ngs) |
| Enter play mode | Play button in menu bar |
| Exit play mode | Escape key |
Scenes are saved as .ngs JSON files (NextGenScene). Each entity and its components are fully serialized.
{
"SceneName": "MainScene",
"Entities": [
{
"Id": 0,
"Components": [
{
"TypeName": "NextGenEngine.ECS.TransformComponent, NextGenEngine",
"Data": { "Position": { "X": 400, "Y": 300 }, "Scale": { "X": 1, "Y": 1 }, "Rotation": 0 }
},
{
"TypeName": "NextGenEngine.ECS.TagComponent, NextGenEngine",
"Data": { "Tag": "Player" }
}
]
}
]
}- Create a class in
ECS/Components.csimplementingIComponentwith public settable properties and a parameterless constructor. - Register it in
InspectorPanel._addableto make it available in the editor dropdown.
public class MyScene : Scene
{
public override void Load() { /* create entities */ }
public override void Update(double dt) { /* game logic */ }
public override void Render(double dt) { /* draw calls */ }
}
// Load it:
Engine.Instance.SceneManager.LoadScene(new MyScene());Logger.Info("Something happened.");
Logger.Warn("Watch out.");
Logger.Error("Something broke.");- Sprite rendering (textured quads)
- Physics component (Box2D or custom)
- Audio system
- Prefab system
- Undo/redo in editor
- File dialog for scene open/save
- Multiple viewport cameras
- Asset hot-reloading
MIT