# ShapeEngine: a C# 2D game engine that draws shapes instead of loading textures

> ShapeEngine is a custom engine built on the Raylib framework whose central bet is that game visuals can be generated at runtime with draw calls rather than sampled from image files. It ships as a NuGet package, a set of DLLs, and an examples project, and its author says it was designed for one developer's needs first.

**DaveGreen-Games/ShapeEngine** — My custom made engine based on the great Raylib Framework. Main focus is being performant and only using draw functions instead of textures.

- Repository: https://github.com/DaveGreen-Games/ShapeEngine
- Stars: 627 · Forks: 26
- Language: C#
- License: MIT
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/davegreen-games-shapeengine

## The core bet is procedural drawing over texture sampling

ShapeEngine is built on the Raylib framework and its stated main focus is being performant while using only draw functions instead of textures. That is an unusual default for a 2D engine, where most projects begin from sprite atlases and PNG assets. The idea is that the visual is computed rather than stored: polygons are filled, strokes are generated, text is shaped and emphasised, and paths are projected, fractured, or drawn with gaps and stripes. The demo gallery in the README is a list of animated demonstrations of exactly those operations, including pathfinding, shape projection, fracture, gapped drawing, striped fill, word emphasis, input handling, and a screen texture effect. The audience is a developer building a 2D game or tool with a distinctive look, particularly one who works in C# and wants the Raylib programming model with a higher level structure on top.

## Everything from Raylib stays available alongside the engine

An engine that hides its foundation tends to make porting expensive, so ShapeEngine keeps the base library in reach. The README states that when using Shape Engine everything from Raylib is available as well, and it points to the Raylib examples and the Raylib cheatsheet as references. In practice that means you can drop down to the raw drawing and input calls when the higher level API does not cover something, and you can read Raylib documentation to understand what the engine is sitting on. The engine layer sits above `Raylib-Cs` and adds the pieces a game needs anyway: a game loop with settings objects for the window, framerate, input, and stretch mode, a draw callback, and a static instance accessor so subsystems can reach the running game. The engine is a C# library first and an editor tool later, if at all, which is the shape of thing most solo developers end up building.

## Installing from NuGet is the recommended path

The README lists four ways in, and the first one is the recommended one: create a new solution and project, then take the package from the NuGet manager.

```bash
dotnet add package DaveGreen.ShapeEngine
```

That single command pulls in the engine and its dependency graph for your target framework. The other routes exist for people who need to change the engine itself. You can clone or fork the repository and add new projects to the solution, then reference the Shape Engine project directly, which the README notes means changes to the engine update automatically in your own project. You can also build the solution to produce the DLLs, create a local NuGet package from them, and point a new Package source in the NuGet manager at a folder holding that package. The last route is manual: add the Shape Engine Core DLL by reference, then supply the right versions of the Raylib-Cs and Clipper2 packages, since the GitHub releases state which versions were used.

## The manual DLL route has one placement rule that is easy to miss

If you copy DLLs yourself rather than using NuGet, the README is specific about what goes where. You need Clipper2Lib, Raylib-Cs, Microsoft.Toolkit.HighPerformance, Shape Engine Core, and Raylib. All of them can sit anywhere in the project folder hierarchy except Raylib, which must be on the root level of the project, and you have to select the Raylib build matching your operating system. On macOS the same applies with the `.dylib` file instead of the Raylib DLL, and you need to set the property Copy if Newer to true on that file so it is refreshed. Everything else is a normal project reference. The reason the Raylib binary is special is that it is the native library underneath the managed bindings, and its location is what the loader resolves against at run time. That is the kind of detail that costs an afternoon when it is wrong and nothing when it is right.

## A minimal game is a settings object, a game class, and a draw callback

The README gives a minimal project, and it is short enough to read as the shape of the API. The program creates a game class with four settings objects and runs it:

```csharp
using System.Drawing;
using ShapeEngine.Color;
using ShapeEngine.Core;
using ShapeEngine.Core.Structs;
using ShapeEngine.Geometry;
using ShapeEngine.Geometry.RectDef;
```

```csharp
namespace ShapeEngineProject;

public static class Program
{
    public static void Main(string[] args)
    {
	    var game = new MyGameClass
		(
			GameSettings.StretchMode("Shape Engine Game"),
			WindowSettings.Default,
			FramerateSettings.Default,
			InputSettings.Default
		);
	    game.Run();
    }
}
```

The game class itself derives from `Game` and passes its settings to the base constructor. The static instance property is set in the constructor through `GetInstanceAs<MyGameClass>()`, and the README comment notes that the base class already prevents a second instance being created, so the pattern is safe:

```csharp
public class MyGameClass : Game
{
    //Gives you static access to the instance of MyGameClass - If you do not need/want this, you can remove it.
    public new static MyGameClass Instance  => myInstance?? throw new NullReferenceException("Instance is not initialized! You need to create a MyGameClass instance before accessing this property!");
    private static MyGameClass? myInstance;
```

The drawing happens in an override, where the screen area and the mouse position are drawn with different primitives:

```csharp
    protected override void DrawGame(ScreenInfo game)
    {
        game.Area.Draw(new ColorRgba(Color.DarkOliveGreen));
        game.Area.DrawLines(12f, new ColorRgba(Color.AntiqueWhite));
        game.MousePos.Draw(24f, new ColorRgba(Color.Lime), 36);
    }
}
```

Three calls, three primitives: a filled area, a set of lines, and a marker at a size with an offset.

## The examples project is the real documentation

The README states that the repository includes an Examples Project to demonstrate the capabilities and to help you get started, and the examples are described as simple scenes that focus on one specific area or feature. The repository layout backs that up: under `Examples` there are `Colors.cs`, `FontIDs.cs`, `GameloopExamples.cs`, `Program.cs`, and directories for `PayloadSystem`, `Resources`, `Scenes`, and `UIElements`, plus macOS app bundling files and an Info.plist. A separate `ShapeEngineDemos` repository holds the larger examples, which the README says will include a small asteroids game. The published documentation lives at a separate site with its own repository, and the README asks that documentation issues be opened there rather than in the engine repository. For a project this personal, reading the examples tells you more about the intended usage than the README does.

## This is one developer's engine, and the README admits it

The most important line in the README is also the most revealing: you are free to use Shape Engine or any part of it for your own projects, but it was designed to help the author with his specific game development needs. That sentence sets expectations for the whole project. The development process is followed on Reddit, Twitter, Instagram, YouTube, and GitHub Discussions, with a roadmap linked from a discussion thread, and the main branch holds the current development stage. Release trailers exist for versions 1.0, 2.0, 3.0, and 5.0, and the release history shows 5.2.0 in June 2026, 5.3.0 in July, and 5.4.0 in September, with the last push on 2026-10-09. So the engine moves fast, the version numbers are climbing, and the licence is MIT, which permits commercial use without obligation. The tradeoff is that you are adopting one person's architecture and the API will keep moving under you.

## Conclusion

ShapeEngine fits a developer who wants runtime-generated visuals, a distinctive look that no artist produced as a PNG, or the specific tools its author built such as pathfinding, projection, fracture, gapped drawing, and striped fills. It does not fit a team that needs a general purpose engine with an editor, a console, and a community, because this is one author's engine and the README says plainly it was designed around his own game development needs. Before adopting it, read the documentation site and the examples project rather than the README, because the README is a description of what exists while the examples are how you would actually use it, and check which Raylib-Cs and Clipper2 versions the release you pin expects before you wire the DLLs in by hand.

## FAQ

### How do I install ShapeEngine in a C# project?

The recommended route is to create a new solution and project and add the package from NuGet with `dotnet add package DaveGreen.ShapeEngine`. You can also clone or fork the repository and reference the project directly, build a local NuGet package, or copy the DLLs manually.

### Which DLLs does ShapeEngine need if I copy them manually?

You need Clipper2Lib, Raylib-Cs, Microsoft.Toolkit.HighPerformance, Shape Engine Core, and Raylib. All of them can live anywhere in the project folder hierarchy, but the Raylib DLL must sit on the root level of the project, and on macOS you use the `.dylib` with the Copy if Newer property set to true.

### What does ShapeEngine need to run a minimal game?

The README's minimal project creates a class deriving from `Game`, passes in `GameSettings`, `WindowSettings`, `FramerateSettings` and `InputSettings`, and overrides `DrawGame(ScreenInfo game)` to draw. The static instance is assigned in the constructor with `GetInstanceAs<MyGameClass>()`.

### Is ShapeEngine based on Raylib?

Yes. The README describes it as a custom made engine based on the Raylib framework, and states that everything from Raylib is available when using Shape Engine, with links to the Raylib examples and cheatsheet.

### What licence is ShapeEngine released under?

The repository ships an MIT licence with a NOTICE.txt file alongside it. The README also asks that examples on Itch be supported, and points to a separate ShapeEngineDemos repository and a documentation site for larger examples and reference material.

## Sources

- [DaveGreen-Games/ShapeEngine on GitHub](https://github.com/DaveGreen-Games/ShapeEngine)
- [Issues](https://github.com/DaveGreen-Games/ShapeEngine/issues)
- [License: MIT](https://github.com/DaveGreen-Games/ShapeEngine/blob/main/LICENSE)
- [README](https://github.com/DaveGreen-Games/ShapeEngine/blob/main/README.md)
- [Releases](https://github.com/DaveGreen-Games/ShapeEngine/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/davegreen-games-shapeengine
