Overview
Crowded Kingdoms provides APIs that individuals and studios can use to create online games with unlimited player density (UPD). There are two: one GraphQL API, and the replication (UDP) protocol. Your game's server code runs on ck-exec, which players call through a WebSocket gateway that the GraphQL API hands them.
The GraphQL API has two surfaces — management (identity, orgs, billing, app registry) and game (world data and realtime) — but they are one service at one endpoint, documented separately here because they are read at different times. What separates them is the token, not the host: sign-in yields an identity session token, and gameplay needs an app-scoped token minted from it.
Customer apps run on a shared platform scoped by appId. An app lives in one datacenter, so the API tells your client which endpoint to use for that app rather than expecting you to know. Dedicated per-org environments were retired without replacement.
SDKs wrap these APIs in a more user-friendly interface and paradigm.
Support
Join the Crowded Kingdoms Discord for community support, questions, and product updates.
APIs
Management surface
- On the GraphQL API at
https://ck.prod.crowdedkingdoms.com/graphql - Manage user and org accounts
- Configure marketplace settings for apps (games)
- Create apps on the shared platform; manage billing and wallet
Game surface
- The same GraphQL API, for world data and realtime
- Call it at the app's own endpoint —
mintAppTokenandgameClientBootstrapreturngameApiUrl/gameApiWsUrl, andplatformConfig/app.gameApiUrlalso carry it - Used to get assigned a replication server
- Authenticated with an app-scoped token (minted per app from your identity session token — see Portals & app-scoped tokens), not the login session token
- Provides functionality to manage game state, permissions, settings, teams, channels, chunks, and more
Replication
- Our UDP replication servers are nicknamed "Buddy"
- Buddy servers run alongside the Game API on the shared platform
- Use the game API to get assigned one or more Buddies
- You communicate directly to the IP address given by the game API via unencrypted UDP
- You'll use Buddy to send spatially routed messages from one client to some or all nearby clients
- The revolution that now makes true single shard games with unlimited player density possible is that Buddy servers work together to spatially route an unlimited number of messages per second. If you build your game on top of this kind of replication layer, you'll be able to deliver the necessary information to each client to render a virtually unlimited number of objects in your player's field of view.
ck-exec
- Runs your game's server code: hubs that hold state and spokes that scale out, written in Rust and built to WebAssembly on the platform
- Players connect with
execConnect, which returns a gateway and a short-lived connect token, then call your code over a WebSocket; the SDKs do both - Players run their own code on grids they own as mods
- See ck-exec
SDKs
Unreal
Javascript
- CrowdyJS — TypeScript SDK for browser and Node clients (
@crowdedkingdoms/crowdyjs). MIT license. - NPM: https://www.npmjs.com/package/@crowdedkingdoms/crowdyjs
- GitHub: https://github.com/CrowdedKingdoms/CrowdyJS
C++
- CrowdyCPP — portable C++ SDK with a native UDP replication client (docs).
- GitHub: https://github.com/CrowdedKingdoms/CrowdyCPP
Python
- CrowdyPy — Python SDK over CrowdyCPP's native core (
pip install crowdypy, docs). - GitHub: https://github.com/CrowdedKingdoms/CrowdyPy
Godot (Planned)
Where to go next
- Brand guidelines — colors, typography, wordmark, and UI tokens for Crowded Kingdoms surfaces.
- Client Workflow — how the APIs and SDK fit together.
- Best practices — authority on ck-exec, tokens, and errors.
- Before you ship — the hosts and SDK defaults a shipped client needs.
- Connecting game clients — production hosts, tokens and a smoke checklist for your first client.
- Create your first app — register on the shared platform.
- Management API — authenticate, manage orgs, apps, billing, and shared environment.
- Game API — chunks, voxels, actors, avatars, studio grids, and the GraphQL UDP proxy.
- Replication API — wire protocol for native UDP clients.
- ck-exec — your game's server code, and players' mods.
- CrowdyJS — install, configure endpoints, and run a game loop.
- CrowdyCPP and CrowdyPy — the native C++ and Python SDKs.
- Management UI — portal workflows including apps on the shared platform.
Docs Project
- https://github.com/CrowdedKingdoms/cks-docs
- Pull requests are welcome!!
- We're all in the same shard now:)