![]() |
VOOZH | about |
dotnet add package Brine2D.UI --version 0.8.0-beta
NuGet\Install-Package Brine2D.UI -Version 0.8.0-beta
<PackageReference Include="Brine2D.UI" Version="0.8.0-beta" />
<PackageVersion Include="Brine2D.UI" Version="0.8.0-beta" />Directory.Packages.props
<PackageReference Include="Brine2D.UI" />Project file
paket add Brine2D.UI --version 0.8.0-beta
#r "nuget: Brine2D.UI, 0.8.0-beta"
#:package Brine2D.UI@0.8.0-beta
#addin nuget:?package=Brine2D.UI&version=0.8.0-beta&prereleaseInstall as a Cake Addin
#tool nuget:?package=Brine2D.UI&version=0.8.0-beta&prereleaseInstall as a Cake Tool
The ASP.NET of game engines - A modern .NET 10 game engine built on SDL3 for creating 2D games with C#.
Brine2D brings the familiar patterns and developer experience of ASP.NET to game development. If you've built web apps with ASP.NET, you'll feel right at home building games with Brine2D.
ArrayPool<T> and custom object pools// Looks familiar? That's the point!
var builder = GameApplication.CreateBuilder(args);
// Configure services just like ASP.NET
builder.Services.AddSDL3Input();
builder.Services.AddSDL3Audio();
builder.Services.AddSDL3Rendering(options =>
{
options.WindowTitle = "My Game";
options.WindowWidth = 1280;
options.WindowHeight = 720;
// Choose your backend
options.Backend = GraphicsBackend.GPU; // Modern SDL3 GPU API (recommended)
// options.Backend = GraphicsBackend.LegacyRenderer; // SDL_Renderer API (fallback)
options.PreferredGPUDriver = "vulkan"; // or "d3d12", "metal"
options.VSync = true;
});
// Configure ECS systems like middleware
builder.Services.ConfigureSystemPipelines(pipelines =>
{
pipelines.AddSystem<PlayerControllerSystem>();
pipelines.AddSystem<AISystem>();
pipelines.AddSystem<VelocitySystem>();
pipelines.AddSystem<PhysicsSystem>();
pipelines.AddSystem<SpriteRenderingSystem>();
});
// Register your scenes like controllers
builder.Services.AddScene<GameScene>();
var game = builder.Build();
await game.RunAsync<GameScene>();
| ASP.NET | Brine2D |
|---|---|
WebApplicationBuilder |
GameApplicationBuilder |
| Controllers | Scenes |
| Middleware | ECS System Pipelines |
app.UseAuthentication() |
pipelines.AddSystem<T>() |
| Automatic execution | Lifecycle hooks |
appsettings.json |
gamesettings.json |
| Dependency Injection | Dependency Injection |
ILogger<T> |
ILogger<T> |
| Configuration binding | Configuration binding |
Using NuGet (Recommended)
Create a new .NET 10 console project and add Brine2D:
dotnet new console -n MyGame
cd MyGame
dotnet add package Brine2D.Desktop
That's it! Brine2D.Desktop includes everything you need to start building games.
For most users, install the meta-package:
dotnet add package Brine2D.Desktop
Advanced: Install only what you need:
# Core abstractions
dotnet add package Brine2D.Core
dotnet add package Brine2D.Engine
dotnet add package Brine2D.ECS
# Choose your implementations
dotnet add package Brine2D.Rendering.SDL
dotnet add package Brine2D.Input.SDL
dotnet add package Brine2D.Audio.SDL
# ECS bridges (optional)
dotnet add package Brine2D.Rendering.ECS
dotnet add package Brine2D.Input.ECS
dotnet add package Brine2D.Audio.ECS
Create Program.cs:
using Brine2D.Core;
using Brine2D.Hosting;
using Brine2D.Input;
using Brine2D.Input.SDL;
using Brine2D.Rendering;
using Brine2D.Rendering.SDL;
using Microsoft.Extensions.Logging;
// Create the game application builder
var builder = GameApplication.CreateBuilder(args);
// Configure SDL3 rendering
builder.Services.AddSDL3Rendering(options =>
{
options.WindowTitle = "My First Brine2D Game";
options.WindowWidth = 1280;
options.WindowHeight = 720;
options.VSync = true;
});
// Add SDL3 input
builder.Services.AddSDL3Input();
// Register your scene
builder.Services.AddScene<GameScene>();
// Build and run
var game = builder.Build();
await game.RunAsync<GameScene>();
// Define your game scene
public class GameScene : Scene
{
private readonly IRenderer _renderer;
private readonly IInputService _input;
private readonly IGameContext _gameContext;
public GameScene(
IRenderer renderer,
IInputService input,
IGameContext gameContext,
ILogger<GameScene> logger) : base(logger)
{
_renderer = renderer;
_input = input;
_gameContext = gameContext;
}
protected override void OnRender(GameTime gameTime)
{
// Systems and rendering happen automatically!
_renderer.DrawText("Hello, Brine2D!", 100, 100, Color.White);
}
protected override void OnUpdate(GameTime gameTime)
{
// Systems run automatically via lifecycle hooks!
if (_input.IsKeyPressed(Keys.Escape))
{
_gameContext.RequestExit();
}
}
}
Run your game:
dotnet run
⚠️ This is a beta release (0.8.0-beta)
What works:
What's coming next:
Expect breaking changes before 1.0!
Full guides and API reference available at brine2d.com
Check out the samples/ directory for complete working examples:
Interactive demo menu showcasing all major features:
Run the demos:
cd samples/FeatureDemos
dotnet run
Performance hotkeys (in any demo scene):
F3 - Toggle performance overlayF4 - Toggle frame time graphF5 - Toggle memory statisticsBrine2D follows a modular architecture with clear separation of concerns:
| Platform | Status | Notes |
|---|---|---|
| Windows | ✅ Supported | Tested on Windows 10/11 |
| Linux | ⚠️ Untested | Should work via SDL3 |
| macOS | ⚠️ Untested | Should work via SDL3 |
SDL3 provides cross-platform support, but we've only tested on Windows so far. Community testing on other platforms is welcome!
0.8.0-beta (Current Release)
0.9.0-beta (Next Release)
1.0.0 (Stable Release)
See the full roadmap.
We welcome contributions! Please see for guidelines.
MIT License - see LICENSE file for details
Built with:
Made with ❤️ by CrazyPickle Studios
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Brine2D.UI:
| Package | Downloads |
|---|---|
|
Brine2D.Desktop
Modern .NET 10 game engine with ASP.NET-style API - Desktop meta-package. Includes all default implementations for building 2D games. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.8.0-beta | 83 | 1/18/2026 |
| 0.7.0-beta | 79 | 1/14/2026 |
| 0.6.0-beta | 82 | 1/9/2026 |
| 0.5.0-beta | 84 | 1/7/2026 |
| 0.4.0-alpha | 86 | 1/5/2026 |
| 0.3.8-alpha | 81 | 1/3/2026 |
| 0.3.7-alpha | 75 | 1/3/2026 |
| 0.3.6-alpha | 88 | 1/3/2026 |
| 0.3.5-alpha | 82 | 1/3/2026 |
| 0.3.4-alpha | 88 | 1/2/2026 |
| 0.3.3-alpha | 77 | 1/2/2026 |
| 0.3.2-alpha | 72 | 1/2/2026 |
| 0.3.1-alpha | 75 | 1/2/2026 |
| 0.3.0-alpha | 87 | 1/2/2026 |