Skip to main content
High-level overview of integrating game clients with Cardinal using the client SDKs. For the full SDK reference documentation, see:

Initializing the Client

Create a client with a configuration object that specifies the auth URL and region configs. For local development, use dev auth to bypass the normal authentication flow.

Authentication

Sign in to authenticate the user. You can retrieve the current user’s information and persona after signing in.
Sign out when the user logs out of your game.

Connecting to a Shard

A shard is a single instance of your game world running on the server. The shard client is your connection to that instance, allowing you to query entities, send commands, and subscribe to events. To connect, specify the shard’s address (region, organization, project, and shard ID) and call connect to get a shard client.
Disconnect from the shard when you no longer need it.

Querying Entities

To query entities, define client-side classes with field mappings that correspond to component field names on the server. Build queries to specify which components to find and how to match them. See Queries for more details.

Sending Commands

Build a command payload and send it to the shard. See Commands for more details.

Subscribing to Events

Subscribe to events with handler callbacks. See Events for more details.
Unsubscribe when you no longer need to receive events.