Connect and bootstrap
Goal
Initialize the game client and open the UDP proxy subscription.
Steps
- Authenticate and mint the app-scoped token (chapter 2)
- Call
client.serverStatus.gameClientBootstrap('1')— version info, UDP status,me - Call
client.udp.connect()— opens proxy session to least-loaded Buddy - Call
client.udp.subscribe({ ... })— receive realtime notifications
Gameplay uses the app-scoped token
Everything from gameClientBootstrap onward is a Game API / realtime call and runs
on the app-scoped token minted in chapter 2,
not the identity session token. client.udp.connect() assigns a Buddy via
serverWithLeastClients under the hood; an identity session token is rejected
(APP_TOKEN_REQUIRED on the realtime subscription, INVALID_APP_ID on the
assignment). See Game API authentication and
Authenticate and assign.
Subscription types
Subscribe to udpNotifications and handle at minimum:
ActorUpdateNotification— remote player positionsVoxelUpdateNotification— painted cellsRealtimeConnectionEvent— connection statusGenericErrorResponse— error codes
Register your actor
Before others receive your updates, send at least one sendActorUpdate so the server knows your chunk.
Exit criteria
- Bootstrap succeeds
- UDP proxy connected
- Event log shows subscription active
Next: Canvas coordinates