Start
How Ansekai works
Games and keys
Everything in Ansekai belongs to a game. A game has its own players, saves, files, code and rooms, nothing reaches another game. Every game has a game key, it is on the SDK page of the panel. The key only says which game a client means, it is not a secret: it ships inside the game. What a client may do comes from the player that is signed in and from the rules of each module.
Modules
A game is made of modules, each one is a page in the panel:
| Module | Keeps or runs | Read more |
|---|---|---|
| Authentication | Players, sessions and tokens | Authentication |
| Player Data | Values of each player | Player Data |
| Realtime Database | Values the whole game shares, live | Realtime Database |
| Files | Uploads in folders | Files |
| Cache | Fast values that may go away | Cache |
| Plugins | Luau that clients call, hooks and timers | Plugins |
| Loops | Luau at a tick rate | Loops |
| Rooms | Matches and worlds that players join | Rooms |
Every module has its own settings: the connection it wants, its rate limits and who may reach it from a client. The panel and server code always reach everything.
Client and server
A client is your game, built with an SDK. It signs a player in and calls modules for that player. Anything a client must not decide, like gold, prices or who won, belongs on the server:
- Rules say what a client may read and write, key by key and path by path.
- Plugins are functions in Luau that clients call, they run on the server with the rules of the server.
- Loops and rooms keep running on the server and own their state.
// The client asks, the plugin decides
const { gold } = await ansekai.plugins.call("buy", { item: "torch" });ansekai.rpc("buy", function(ctx, params)
local gold = ansekai.data.get(ctx.player, "gold") or 0
if gold < 10 then
ansekai.fail("not_enough_gold")
end
ansekai.data.set(ctx.player, "gold", gold - 10)
return { gold = gold - 10 }
end)Servers and regions
One server can run everything. A bigger install is a network of servers in regions. A game lives on one server of the region it picked for good, the SDK finds that server by itself. Rooms can run in more regions than their game, see Rooms.
Cloud saves
Player Data, the Realtime Database, files and the cache on disk share one limit for the whole account, the cloud saves of its plan. See Plans and billing.
Updated November 21, 2026