Lakona.Game.Cluster.Sql

SQL-backed node directory persistence for Lakona.Game cluster membership.


Keywords
cluster, game, lakona-game, node-directory, sql
License
MIT
Install
Install-Package Lakona.Game.Cluster.Sql -Version 0.4.4

Documentation

Lakona

Tests and Publish NuGet License NuGet .NET Unity Godot

Build realtime game servers in C#, share contracts with Unity or Godot, and reload replaceable game logic while runtime-owned state stays in place.

Lakona gives game teams a complete starting workspace: shared C# contracts, stateful server logic, hotfixable behavior, sessions, transports, diagnostics, and a path from one local process to a multi-node deployment. Your gameplay, database, and data model remain yours.

Download Lakona Hub ยท Get started with Lakona Hub ยท See the samples ยท Browse the docs

Start Here ๐Ÿ–ฅ๏ธ

For the easiest desktop workflow, download Lakona Hub. Hub guides project creation, detects compatible .NET SDKs and client editors, imports existing Lakona projects, packages server and Hotfix releases, and opens your development tools. Every generated project remains ordinary files that you can build and use without Hub. See the Hub documentation.

For terminal workflows and CI, use Lakona.Tool; the CLI path is below.

Why Lakona โœจ

  • ๐Ÿงฉ Generate a complete project. One command creates the shared contracts, server host, hotfix project, and Unity or Godot client in one workspace.
  • ๐Ÿ”— Define the contract once. Shared C# interfaces, DTOs, callbacks, and protocol types are compiled for both client and server, reducing protocol drift during development. See RPC architecture.
  • ๐Ÿ”ฅ Keep gameplay state alive while behavior changes. Actors own mutable state, while replaceable C# behavior can be rebuilt and reloaded without moving that state into the hotfix assembly. See Hotfix architecture and the Actor Model.
  • ๐Ÿš€ Start small and grow deliberately. Run a complete game server locally, choose the transports and serializers your game needs, then add sessions, reliable push, routing, and cluster deployment as the product requires them. See Cluster and Packaging and Deployment.

Lakona is infrastructure, not a full game business framework. Your game owns accounts, matchmaking policy, room rules, gameplay simulation, persistence schema, rewards, and UI architecture.

Quick Start โšก

Prerequisites:

Install the project tool and create a Unity starter project:

dotnet tool install -g Lakona.Tool
lakona-tool new --name MyGame --client-engine unity --transport kcp --serializer memorypack

Build the generated server and hotfix project:

cd MyGame
dotnet build "Server/Server.slnx"

Start the server:

dotnet run --project "Server/App/Server.App.csproj" --no-build

In another terminal, check that the generated runtime is ready:

curl http://127.0.0.1:20080/_lakona/health/ready

Then open the generated Client/ project in Unity or Godot. For the complete first-run walkthrough, including the Godot command and client setup, read Create and Run a Lakona Project.

See It In Action ๐ŸŽฎ

Agar in action: From a local Unity game to a nine-node cluster โ€” including deployment and OpenTelemetry observability.

  • Game.Unity.Agar โ€” a small multiplayer game with shared gameplay code, sessions, reliable push, dual transports, and cluster deployment examples.
  • Game.Unity.MMO โ€” a server-authoritative Unity sample using shared contracts and realtime state synchronization.
  • Game.Godot.Chat โ€” a compact Godot .NET sample for the shortest client/server path.

Focused RPC examples for JSON, WebSocket, TCP, KCP, MemoryPack, and mixed transports are available under samples/Rpc.*.

What You Can Add Later ๐Ÿš€

Lakona keeps the first project small while leaving room for production needs:

  • Sessions and reliable push for login, reconnect, matchmaking, and server-initiated notifications. See Session Lifecycle.
  • Actors and timers for rooms, players, matches, lobbies, and other stateful workflows. See Actor Model.
  • Readiness and diagnostics for startup validation, health probes, logs, and opt-in local runtime inspection. See Guardrails and Use Lakona Observability.
  • Multi-node routing and deployment when a single process is no longer enough. See Cluster and Packaging and Deployment.
  • Pluggable transports and serializers so gameplay contracts do not have to change when networking requirements change.

AI-Assisted Development ๐Ÿค–

Lakona ships a public, project-local Agent Skill Pack for coding agents. Generated projects include the compatible skills so agents can inspect the installed framework, follow project conventions, and work from current contracts without a second installation step. See Lakona Project Agent Skills.

Packages ๐Ÿ“ฆ

Most users should start with Lakona Hub. Use Lakona.Tool for terminal workflows and CI. Advanced integrations can use Lakona.Game.Server, Lakona.Game.Client, Lakona.Game.Abstractions, or the Lakona.Rpc.* packages. Package-specific usage is documented in the READMEs under src/.

Supported targets include .NET 10 server projects, .NET Standard 2.1 shared and client packages, Unity 2022 LTS, Godot 4.x .NET, and Windows, Linux, and macOS.

Learn More ๐Ÿ“š

Contributing ๐Ÿค

Contributor rules, package boundaries, testing expectations, and release policy live in CONTRIBUTING.md.