Lakona.Game.Client
0.4.12
See the version list below for details.
dotnet add package Lakona.Game.Client --version 0.4.12
NuGet\Install-Package Lakona.Game.Client -Version 0.4.12
<PackageReference Include="Lakona.Game.Client" Version="0.4.12" />
<PackageVersion Include="Lakona.Game.Client" Version="0.4.12" />
<PackageReference Include="Lakona.Game.Client" />
paket add Lakona.Game.Client --version 0.4.12
#r "nuget: Lakona.Game.Client, 0.4.12"
#:package Lakona.Game.Client@0.4.12
#addin nuget:?package=Lakona.Game.Client&version=0.4.12
#tool nuget:?package=Lakona.Game.Client&version=0.4.12
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.
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 | Versions 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. |
-
.NETStandard 2.1
- Lakona.Game.Abstractions (>= 0.3.0)
- Lakona.Rpc.Client (>= 0.12.16)
- Lakona.Rpc.Core (>= 0.13.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.