KappaDuck.Quack 0.5.0-alpha.20260211124240

This is a prerelease version of KappaDuck.Quack.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package KappaDuck.Quack --version 0.5.0-alpha.20260211124240
                    
NuGet\Install-Package KappaDuck.Quack -Version 0.5.0-alpha.20260211124240
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KappaDuck.Quack" Version="0.5.0-alpha.20260211124240" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KappaDuck.Quack" Version="0.5.0-alpha.20260211124240" />
                    
Directory.Packages.props
<PackageReference Include="KappaDuck.Quack" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add KappaDuck.Quack --version 0.5.0-alpha.20260211124240
                    
#r "nuget: KappaDuck.Quack, 0.5.0-alpha.20260211124240"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package KappaDuck.Quack@0.5.0-alpha.20260211124240
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=KappaDuck.Quack&version=0.5.0-alpha.20260211124240&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=KappaDuck.Quack&version=0.5.0-alpha.20260211124240&prerelease
                    
Install as a Cake Tool

Quack! 🦆 Static Badge NuGet Version

A modern .NET game framework built on SDL

Overview

Quack! is a modern, lightweight and fast game framework built on top of SDL and its extensions (image, mixer, ttf). It targets .NET 9+ desktop apps and games, providing a clean and flexible API that hides the complexity of SDL.

Features

  • 2D/3D rendering using the GPU rendering API
  • Cross-platform support (Windows, Linux)
  • Window and display management
  • Input handling (keyboard, mouse, gamepads, etc...)
  • Audio management
  • Event system
  • System utilities (power management, clipboard, etc...)
  • Native UI integration (Context menus, dialogs, etc...)

Installation

You can install Quack! via NuGet

dotnet add package KappaDuck.Quack -v 0.5.0

or via the .csproj file:

<PackageReference Include="KappaDuck.Quack" Version="0.5.0" />

You can also install via the NuGet Package Manager in Visual Studio or JetBrains Rider.

Usage

using KappaDuck.Quack.Events;
using KappaDuck.Quack.Windows;

using Window window = new Window("Quack!", 1080, 720);

while (window.IsOpen)
{
    while (window.Poll(out Event e))
    {
        if (e.RequestQuit())
        {
            window.Close();
            return;
        }
    }
}

More examples can be found in the examples directory.

Cross-Platform Support

Quack! currently supports Windows and Linux platforms thanks to SDL's abstraction layer, making porting to other platforms easier in the future.

The framework may have platform-specific implementations or limitations depending on the underlying SDL support. Using theses platform-specific features will have a warning in the editors saying that the code may not be portable.

ℹ️ Other platforms such as Android or WebAssembly may be supported in the future, but there are no immediate plans.

SDL compatibility

Quack! is shipped with precompiled SDL binaries for Windows and Linux which are built from quack.runtimes.

Below is a compatibility table for the SDL libraries used in each Quack! release.

Quack! version SDL version SDL_image version SDL_ttf version SDL_mixer version
source 3.4.0 3.2.6 3.2.2 N/A
0.4.0 3.4.0 3.2.6 3.2.2 N/A
0.3.0 3.2.30 3.2.6 3.2.2 N/A
0.2.0 3.2.28 3.2.4 3.2.2 N/A
0.1.0 3.2.18 N/A N/A N/A

⚠️ During active development, SDL dependencies may be updated frequently.

Development & Sandbox

You can build Quack! from source and running quick experiments by creating C# file as sandbox or examples provided in the repository.

Prerequisites

The SDK includes everything needed to build and run .NET applications.

Setup

  1. Clone the repository
git clone https://github.com/KappaDuck/quack.git
cd quack
  1. Install SDL and its extensions
Windows
dotnet ./SDL3/deps.cs
Linux
chmod +x ./SDL3/deps.cs
./SDL3/deps.cs

The file deps.cs installs SDL and all required extensions. On linux, you only need to make it executable once.

Build & Run

Open the solution in your preferred IDE (e.g., Visual Studio, Rider, VS Code).

⚠️ Most IDEs do not support running single-file scripts directly, so you'll need to run the sandbox file from the command line.

VS Code provides intellisense but cannot run the file directly.

Sandbox file (quack.sandbox.cs)

The sandbox allows you to experiment with windows, input, rendering, and more without modifying the main source code.

Create a file named quack.sandbox.cs at the root of the repository with the following content:

This file is ignored by git, so it's safe to use for your experiments.

#!/usr/bin/env dotnet

#:property TargetFramework=net10.0
#:property IncludeBinaries=true
#:property NoWarn=IDE0073
#:project KappaDuck.Quack

using KappaDuck.Quack.Events;
using KappaDuck.Quack.Windows;

using Window window = new Window("Quack!", 1080, 720);

while (window.IsOpen)
{
    while (window.Poll(out Event e))
    {
        if (e.RequestQuit())
        {
            window.Close();
            return;
        }
    }
}

Run the sandbox

Windows
dotnet ./quack.sandbox.cs
Linux
chmod +x ./quack.sandbox.cs # only needed once
./quack.sandbox.cs

🙌 Credits

Built with inspiration from

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NETPlatform dotnet is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

GitHub repositories

This package is not used by any popular GitHub repositories.