Lakona

Build realtime C# game servers

A C# full-stack game server framework with shared contracts, typed RPC, actor-owned state, reliable push, live logic updates, runtime diagnostics, and no database lockโ€‘in.

The four ideas behind Lakona

๐Ÿ–ฅ๏ธ

Start with a complete workspace

Hub or Tool creates the shared contracts, server host, hotfix project, and Unity or Godot client together.

๐Ÿงฉ

Share C# contracts

Client and server compile the same RPC interfaces, DTOs, callbacks, and protocol types.

๐Ÿ”ฅ

Reload behavior, keep state

Rebuild replaceable C# game behavior while long-lived player, room, and match state stays alive.

๐ŸŽญ

Let actors own gameplay state

Rooms, players, lobbies, and matches process messages sequentially instead of fighting shared locks.

Reload rules. Keep state alive.

RoomBehavior.cs
// Server.Hotfix: reload behavior while RoomActor state stays alive
[HotfixBehaviorOf(typeof(RoomActor))]
public sealed partial class RoomBehavior
{
    public ValueTask<JoinRoomReply> JoinAsync(
        RoomActor room,
        JoinRoomRequest request,
        CancellationToken cancellationToken = default)
    {
        room.JoinedPlayers.Add(request.PlayerId);
        return new ValueTask<JoinRoomReply>(
            new JoinRoomReply { PlayerCount = room.JoinedPlayers.Count });
    }
}