Lakona.Game.Client 0.4.14

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

Lakona.Game.Client

Lakona.Game.Client contains reusable engine-neutral Game client primitives. Generated game projects use a project-specific Client.Generated.LakonaGameClient as the public entry point. The fixed package type is LakonaGameClientCore, which owns framework handshake state, reliable push state, heartbeat state, and session snapshots.

The library does not depend on Unity, Godot, or any transport package. Game clients remain responsible for choosing their transport, dispatching callbacks onto the engine main thread, and applying business-specific payloads.

Generated Client Entry Point

Generated game projects should use their generated wrapper as the single connection entry point:

using System;
using Client.Generated;
using Lakona.Game.Client;
using Shared.Contracts.Game;

var options = new LakonaGameClientOptions(transport, serializer)
{
};

await using var gameClient = new LakonaGameClient(options, callbackReceiver);
await gameClient.ConnectAsync(cancellationToken);

var game = gameClient.Api.Shared.Game;
var reply = await game.LoginAsync(new LoginRequest { PlayerName = name });
if (!reply.Success)
    throw new InvalidOperationException(reply.Error);

var world = reply.World;

ConnectAsync owns the framework handshake and heartbeat startup. Normal generated clients learn the active framework Session through the server's acknowledged establishment notification; reliable push replay and acknowledgements remain framework protocol details. A successful business call that establishes a Session does not return until the generated client has applied and acknowledged that framework state. Business contracts do not expose Session ids, and application code does not call StartSessionAsync after login. Business RPC services are exposed through gameClient.Api.

Logging

Set LakonaGameClientOptions.LoggerFactory to one application-owned factory. The generated recoverable client reuses it across connection generations; the application disposes it only during application shutdown. Console, Serilog, NLog, Unity, and custom-provider setup is covered by Logging.

Core Client Primitive

Use LakonaGameClientCore directly only when you are building a custom client wrapper instead of using generated Client.Generated.LakonaGameClient.

The core primitive owns framework handshake state, heartbeat state, reliable push client state, opaque resume tickets, and connection snapshots. Platform, game version, build id, runtime, and capability metadata remain application concerns. Generated wrappers expose business services through gameClient.Api.

A custom wrapper must register the reserved Session-establishment notification, pass its GameSessionEstablished payload to ApplyGameSessionEstablishedAsync, and send the reserved acknowledgement. Calling StartSessionAsync alone is not a substitute: it does not apply the opaque resume ticket or acknowledge establishment to the server.

Construct LakonaGameClientOptions with Func<ITransport> for automatic recovery. The wrapper creates a fresh transport per connection generation while application-held API/service proxies remain stable. Business code does not save session ids or call login again during a transient disconnect.

Normal clients should not call reliable-push ack RPCs. The generated wrapper uses the framework protocol negotiated by handshake. If the server disables reliable push, the wrapper keeps the same public callback path and treats notifications as immediate best-effort delivery.

Engine-neutral session state

ClientSessionController is a pure state helper. Unity, Godot, and plain .NET clients can render their own UI from the snapshot without the framework touching engine APIs or dispatchers.

using Lakona.Game.Client.Sessions;

var controller = new ClientSessionController();
controller.StartSession(sessionId);
controller.MarkReconnecting();

if (controller.Snapshot.Phase == ClientSessionPhase.Reconnecting)
{
    // Render reconnecting UI until the generated client wrapper reports ready again.
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.4.15 54 8/17/2026
0.4.14 91 8/11/2026
0.4.13 95 8/10/2026
0.4.12 84 8/6/2026
0.4.11 107 8/4/2026
0.4.10 97 8/3/2026
0.4.8 107 8/2/2026
Loading failed