VOOZH about

URL: https://www.nuget.org/packages/Lakona.Game.Client/

⇱ NuGet Gallery | Lakona.Game.Client 0.1.7




Lakona.Game.Client 0.1.7

dotnet add package Lakona.Game.Client --version 0.1.7
 
 
NuGet\Install-Package Lakona.Game.Client -Version 0.1.7
 
 
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.1.7" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lakona.Game.Client" Version="0.1.7" />
 
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.1.7
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lakona.Game.Client, 0.1.7"
 
 
#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.1.7
 
 
#: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.1.7
 
Install as a Cake Addin
#tool nuget:?package=Lakona.Game.Client&version=0.1.7
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Lakona.Game.Client

Lakona.Game.Client contains engine-neutral client helpers for game clients built on top of Lakona.Rpc.

The package focuses on one recommended main entry point, LakonaGameClient, plus lower-level reliable server push and reconnect-aware state helpers:

  • track the latest applied reliable push sequence
  • detect duplicate reliable push messages
  • decide whether an incoming push should be applied and acknowledged
  • reset sequence state when the client starts a new logical session
  • expose an engine-neutral session phase snapshot for reconnect, refresh, and state-lost flows

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.

Main Client API

using Lakona.Game.Abstractions;
using Lakona.Game.Client;
using Lakona.Game.Client.ReliablePush;
using Lakona.Game.Client.Sessions;

var client = new LakonaGameClient();
client.StartSession(sessionId, lastReliableSequence: 0);

await client.ProcessReliablePushAsync(
 ReliablePushSequence.From(update.ReliableSequence),
 update,
 applyAsync: static (payload, ct) =>
 {
 // Apply the business payload on the application's chosen thread.
 return ValueTask.CompletedTask;
 },
 acknowledgeAsync: async (ack, ct) =>
 {
 // Send ack.Sequence.Value through the game's RPC API. Use your own client-facing
 // session token or stream id if the server requires one for acknowledgement.
 await playerService.AckReliablePushAsync(sessionId, ack.Sequence.Value, ct);
 return ReliablePushAckOutcome.Accepted();
 },
 cancellationToken);

if (client.Snapshot.Phase == ClientSessionPhase.RefreshRequired)
{
 // Clear transient view state and fetch an authoritative game snapshot.
}

if (client.Snapshot.Phase == ClientSessionPhase.StateLost)
{
 // Start a new login/session flow. StateLost remains terminal until StartSession is called again.
}

Lower-level reliable push inbox

Use ReliablePushInbox directly only when you want to manage session phase separately. The session id is an opaque client-side key chosen by your game protocol, not Lakona.Game.Server.Sessions.GameSessionKey.

using Lakona.Game.Abstractions;
using Lakona.Game.Client.ReliablePush;

var inbox = new ReliablePushInbox();
inbox.StartSession(sessionId, lastAppliedSequence);

await inbox.ProcessAsync(
 ReliablePushSequence.From(update.ReliableSequence),
 update,
 applyAsync: static (payload, ct) =>
 {
 // Apply the business payload on the application's chosen thread.
 return ValueTask.CompletedTask;
 },
 acknowledgeAsync: async (ack, ct) =>
 {
 // Send ack.SessionId and ack.Sequence.Value through the game's RPC API.
 await playerService.AckReliablePushAsync(ack.SessionId, ack.Sequence.Value, ct);
 return ReliablePushAckOutcome.Accepted();
 },
 cancellationToken);

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.Abstractions;
using Lakona.Game.Client.ReliablePush;
using Lakona.Game.Client.Sessions;

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

controller.ApplyAckOutcome(ReliablePushAckOutcome.StateRefreshRequired());

if (controller.Snapshot.Phase == ClientSessionPhase.RefreshRequired)
{
 // Clear transient view state and fetch an authoritative game snapshot.
}

controller.ApplyAckOutcome(ReliablePushAckOutcome.StateLost());

if (controller.Snapshot.Phase == ClientSessionPhase.StateLost)
{
 // Start a new login/session flow. StateLost remains terminal until StartSession is called again.
}
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  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. 
.NET Core netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 netstandard2.1 is compatible. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.1.7 90 6/15/2026
0.1.6 100 6/7/2026