Backdash.Gns.Steamworks.Posix32 0.1.0-alpha.2

This is a prerelease version of Backdash.Gns.Steamworks.Posix32.
dotnet add package Backdash.Gns.Steamworks.Posix32 --version 0.1.0-alpha.2
                    
NuGet\Install-Package Backdash.Gns.Steamworks.Posix32 -Version 0.1.0-alpha.2
                    
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="Backdash.Gns.Steamworks.Posix32" Version="0.1.0-alpha.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Backdash.Gns.Steamworks.Posix32" Version="0.1.0-alpha.2" />
                    
Directory.Packages.props
<PackageReference Include="Backdash.Gns.Steamworks.Posix32" />
                    
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 Backdash.Gns.Steamworks.Posix32 --version 0.1.0-alpha.2
                    
#r "nuget: Backdash.Gns.Steamworks.Posix32, 0.1.0-alpha.2"
                    
#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.
#addin nuget:?package=Backdash.Gns.Steamworks.Posix32&version=0.1.0-alpha.2&prerelease
                    
Install Backdash.Gns.Steamworks.Posix32 as a Cake Addin
#tool nuget:?package=Backdash.Gns.Steamworks.Posix32&version=0.1.0-alpha.2&prerelease
                    
Install Backdash.Gns.Steamworks.Posix32 as a Cake Tool

Backdash.Gns

Backdash.Gns adds GnsSharp extension to Backdash.

With this integration, you can use Backdash with Steam Networking Messages.

State of integration

Currently, only the Steamworks SDK integration is supported.

Open-source standalone GameNetworkingSockets is not supported yet, because of some upstream issues.
See Issue #1 for details.

Nuget package

There are 4 different nuget packages available for different backends & platforms.

dotnet add package Backdash.Gns.Steamworks.Win64 --prerelease    # Steamworks SDK for Windows 64-bit
dotnet add package Backdash.Gns.Steamworks.Win32 --prerelease    # Steamworks SDK for Windows 32-bit
dotnet add package Backdash.Gns.Steamworks.Posix64 --prerelease  # Steamworks SDK for POSIX 64-bit
dotnet add package Backdash.Gns.Steamworks.Posix32 --prerelease  # Steamworks SDK for POSIX 32-bit

Usage

You first need to initialize GnsSharp and call RunCallbacks() periodically in somewhere.
See GnsSharp repo for more info about this.

After that, you can build the GameNetworkingSockets session something like this:

// Port number is used as a "Channel" number for `ISteamNetworkingMessages`.
// The smaller the better, but Backdash doesn't allow port `0`, so we're using `1` here.
int channel = 1;

// Set the peer identity  (assuming we're using Steamworks SDK for this example)
SteamNetworkingIdentity peerIdentity = default;
peerIdentity.ParseString("steamid:76561198951047696");

// one local player + one `SteamEndPoint` remote player
int playerCount = 2;
var players = new NetcodePlayer[playerCount];
players[0] = NetcodePlayer.CreateLocal()
players[1] = NetcodePlayer.CreateRemote(new SteamEndPoint(peerIdentity, channel));

NetcodeSessionBuilder<MyGameInput> builder = RollbackNetcode
    .WithInputType<MyGameInput>()
    .UseGameNetworkingSockets()    // Use GnsSharp integration (extension method)
    .WithPort(channel)             // Set the "Channel" number for `ISteamNetworkingMessages`
    .WithPlayerCount(playerCount)
    .WithPlayers(players)
    .ForRemote();

INetcodeSession<MyGameInput> session = builder.Build();

The rest should be the same as the regular Backdash usage.

License

This integration itself is licensed under the 0BSD, so you can use this freely without including an additional license file.

However, you still need to follow the licenses of the underlying projects:

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. 
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.1.0-alpha.2 57 4/30/2025
0.1.0-alpha.1 70 4/29/2025