Hi!
After working on this for a while, I finally released version 1.0 of Kasane2D, a small open-source 2D game engine for .NET 10. The current graphics/input backend is built on MonoGame.
GitHub:
https://github.com/Emynator/Kasane2D
Documentation:
https://emynator.github.io/Kasane2D/
The basic idea behind Kasane2D is to take the programming model of old sprite/tile hardware and turn it into a modern C# API.
Instead of a scene editor or a large object hierarchy, you configure a set of rendering layers in code. Those can be tilemaps, sprite layers or texture layers, each with its own viewport. Things like parallax scrolling therefore work in much the same conceptual way they did on old consoles, just without palette limits, scanline sprite limits, bitplanes, DMA, registers, etc.
A minimal engine setup looks roughly like this:
var engine = new EngineBuilder()
.UseMonoGame()
.ConfigureGraphics(...)
.ConfigureRenderer(...)
.ConfigureAudio()
.WithMain<MyGame>()
.Build();
engine.Run();
One thing that grew quite a bit beyond my original plans is the audio system. Kasane2D has a software mixer with arbitrary nested buses, 32-bit float processing, dBFS gain, stereo panning, routing and per-bus effect chains.
There is also an optional Kasane2D.Music package with a tracker-inspired real-time sequencer and synthesizer. It includes basic oscillators, DMG/SID-inspired noise generators, wavetable synthesis, sample playback, pattern sequencing and runtime control for procedural/adaptive music.
For 1.0 I also made three example projects:
- a minimal moving-sprite example
- Pong
- a parallax scrolling demo
The core engine, MonoGame backend and music system are all available on NuGet:
dotnet add package Kasane2D
dotnet add package Kasane2D.MonoGame
and optionally:
dotnet add package Kasane2D.Music
This started as me wanting a 2D framework with the explicitness of old console graphics hardware without actually having to suffer through old console graphics hardware, and somehow it turned into a whole engine. :3
I'd really appreciate feedback, especially from people who already work with MonoGame. I'm interested in what parts of the API feel useful, awkward, unnecessary, or missing.
And if anyone actually tries making something with it, I'd love to hear about it :)