Gas2D 0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Gas2D --version 0.2.1
                    
NuGet\Install-Package Gas2D -Version 0.2.1
                    
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="Gas2D" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Gas2D" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Gas2D" />
                    
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 Gas2D --version 0.2.1
                    
#r "nuget: Gas2D, 0.2.1"
                    
#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 Gas2D@0.2.1
                    
#: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=Gas2D&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Gas2D&version=0.2.1
                    
Install as a Cake Tool

gas2d

A small game layer on top of yak2d: screens, canvases and layers, render passes, entities with components, and Box2D physics.

demo

Director.Run(new MyRootScreen(), new GameSettings { Title = "My Game" });

public class MyRootScreen : Screen
{
    private static readonly Layer World = new Layer(0);
    private readonly Canvas canvas;

    public MyRootScreen()
    {
        canvas = Own(new Canvas(Own(new Camera(960, 540))));
        Passes.Add(Pass.DrawCanvas(canvas));
    }

    protected override void OnDraw(Painter paint)
    {
        paint.Rect(canvas, World, Vector2.Zero, new Vector2(100, 100), Colour.Orange);
    }
}
  • src/Gas2d: the library
  • src/Gas2d.Demo: a small game using every part (dotnet run --project src/Gas2d.Demo)
  • src/Gas2d.Tests: unit tests (dotnet test in src/)
  • docs/screen-tree-design.md: how it fits together and why

Using the Gas2D package

Gas2D is published on nuget.org:

dotnet add package Gas2D

Publishing

  1. Bump <Version> in src/Gas2d/Gas2d.csproj: patch for fixes, minor for new API, major for breaking changes.
  2. Push to main. CI (.github/workflows/publish.yml) tests, packs, pushes the package to nuget.org and waits until the new version is live.

A version is never re-published: if <Version> is already on nuget.org, CI skips the push. The nuget.org API key is the NUGET_API_KEY repository secret; nuget.org keys must expire in 30 days or less, so renew it before it lapses (an expired key fails the publish job).

Local feed (optional)

To try unreleased changes in an isolated build (no sibling source, no network), pack to a local folder feed. Use a pre-release version such as 0.2.2-local.1, so it never clashes with a published one.

  1. One-off: register the feed, e.g. dotnet nuget add source ~/nuget-local -n local.
  2. Set <Version> to the pre-release version and pack: dotnet pack src/Gas2d/Gas2d.csproj -c Release -o ~/nuget-local. Never re-pack a version that was already packed: NuGet caches packages by version and would keep serving the old one.
  3. Update the Gas2D package version in the consuming repo and restore it once, so the package lands in your NuGet cache (~/.nuget/packages), which is where offline builds find it.
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 11 11/16/2026
0.2.1 53 11/15/2026