Skip to content

Av3boy/SharpEngine

SharpEngine

NuGet Version

About

SharpEngine is a game engine written in purely in C# using Silk.NET as a wrapper for the graphics rendering pipeline. SharpEngine aims to enable developers to create basic applications using simple instructions or advanced applications by exposing every component.

SharpEngine tries not to do "Magic Behind the Scenes 🧙‍♂️✨". Developers create their applications using traditional .NET solutions. The engine components use dotnet commands to:

  • Create projects
  • Launch projects
  • More in the future? ..

Getting started

All you need is the Core!

Using SharpEngine, you can create your applications using a Standalone approach, where all you need is a reference to the SharpEngine Core. You can use a local project reference from the repo or add a NuGet package reference using dotnet add package SharpEngine.Core.NET.

After you have installed the NuGet package you initialize the Game implementation, Scene and Window:

public static void Main(string[] args)
{
    var game = new Minimal(new DefaultSettings());
    var scene = new Scene();

    using var window = new SharpEngine.Core.Window(game.Camera, scene, game.Camera.Settings);
    window.Run();
}
public class Minimal : Game
{
    public Minimal(ISettings settings)
    {
        CoreSettings = settings;
    }
}

Maybe you want more?!

Developing multiple projects is easy with SharpEngine's Launcher and Editor components.

I'm not a UI developer, I will make these prettier later I promise :)

Editor

The Editor supports dockable windows that can easily be customized using the ImGui.NET library. You can easily create new windows by implementing the ImGuiWindowBase class and letting the Editor handle the rest.

Currently the Editor contains 5 different windows:

  • Actions Menu: Saves, loads and starts the game being edited.
  • Assets window: Contains all the files (even in subdirectories) in the project directory.
  • Context menu: Contains often used actions. Opened when you right-click anywhere in the Editor.
  • Properties window: Contains the properies of the active element.
  • Scene window: Contains a tree view of all the nodes within the active scene.

editor

Launcher

launcher

Examples

Roadmap and plans

The engine is still in it's infant phase where we are just barely hitting all required components working so that we can say the MVP version is done. The current plan is just to use the issues board and execute on that using the "waterfall" method where stuff is just thrown into the engine.

The long-term plan is to all the crucial functionalities we are still missing like:

  • #3 & #2 Loading meshes from files
  • #40 UI
  • #17 Audio
  • #15 Text renderer
  • #13 Ray tracing
  • #12 Particle system

This is just a few among many known issues / missing features from the engine and these will be implemented whenever time permits and we apologize for any inconvenience for now :'D

For more information about the future of the engine, see A Sharp Plan.

Contribution & other miscellaneous stuff

If you are interested in contributing to the project, see Contribution.

Icon created using the work of these lovely people:
Engine icon: Freepik, Shine icon: kornkun