games.cavu.subscribeSession

chris.pardy.family

Documentation

Bidirectional game session. Server->client messages are below; client->server frames are games.cavu.clientFrame.

main subscription

Bidirectional game session. Server->client messages are below; client->server frames are games.cavu.clientFrame.

Message Types

Open union

Errors

UnknownGame
InvalidJoin
RoomInitFailed
ReduceFailed
InvalidFrame
UnknownFrame
View raw schema
{
  "description": "Bidirectional game session. Server->client messages are below; client->server frames are games.cavu.clientFrame.",
  "errors": [
    {
      "name": "UnknownGame"
    },
    {
      "name": "InvalidJoin"
    },
    {
      "name": "RoomInitFailed"
    },
    {
      "name": "ReduceFailed"
    },
    {
      "name": "InvalidFrame"
    },
    {
      "name": "UnknownFrame"
    }
  ],
  "message": {
    "schema": {
      "refs": [
        "#snapshot"
      ],
      "type": "union"
    }
  },
  "parameters": {
    "properties": {},
    "type": "params"
  },
  "type": "subscription"
}
snapshot object

This viewer's projection of the room state: project(state, viewer). Sent on join and whenever it changes. Never contains other players' secrets.

Properties

ack integer Required

Highest intent seq from this viewer that the state reflects.

minimum: 0
view unknown Required

Typed by the game: games.cavu.<game>.defs#view.

View raw schema
{
  "description": "This viewer's projection of the room state: project(state, viewer). Sent on join and whenever it changes. Never contains other players' secrets.",
  "properties": {
    "ack": {
      "description": "Highest intent seq from this viewer that the state reflects.",
      "minimum": 0,
      "type": "integer"
    },
    "view": {
      "description": "Typed by the game: games.cavu.<game>.defs#view.",
      "type": "unknown"
    }
  },
  "required": [
    "ack",
    "view"
  ],
  "type": "object"
}

Lexicon Garden

@