Skip to content

GameKindListing beta ​

Interface of @v12-engine/engine

ts
export interface GameKindListing

A kind of game a server lets players make a room of, as its list says it (GET /games's kinds): what to ask POST /games for ({ kind: id, settings }), what it is called, and the settings it offers (a map, among them)

Members ​

id ​

ts
id: string;

The kind's id, which POST /games is asked for as kind

name ​

ts
name: string;

What the kind is called for players

needed ​

ts
needed?: number;

How many players it takes to make a room of this kind

queue ​

ts
queue?: string;

Where to wait to be matched with others for it (ws://host:port/<queue>), and how many wait now, of how many it takes. None without matchmaking

settings ​

ts
settings: Record<string, {
        label: string;
        options: string[];
        default: string;
    }>;

The settings the kind offers by name, each with its label, its options and its default

waiting ​

ts
waiting?: number;

How many players wait in the queue for this kind now