Interface GameConfigOptions

The game configuration interface. Some options are not used internally, but you can access them by using game.config. See gameDefaultConfig for the default configuration.

interface GameConfigOptions {
    initIntervalBasedManagers?: boolean;
    localStorage: undefined | Storage;
    mode?: "production" | "development";
    name: {
        id: string;
        title?: string;
        version?: string;
    };
    settings?: {
        framerate?: number;
    };
}

Properties

initIntervalBasedManagers?: boolean

Whether or not to automatically initialize the interval-based managers. Warning: If you set this to false, you will need to manually call keyManager.init() and eventManager.init() to initialize them.

localStorage: undefined | Storage

The storage to use for the game. If you want to use a different storage, you can specify it here.

window.localStorage
mode?: "production" | "development"

The mode to run the game in. Not used internally.

name: {
    id: string;
    title?: string;
    version?: string;
}

The name of the game. Not used internally.

Type declaration

  • id: string

    The ID of the game. Used for naming saves.

  • Optionaltitle?: string

    The title of the game.

  • Optionalversion?: string

    The version of the game. Not used internally.

settings?: {
    framerate?: number;
}

The settings for the game.

Type declaration

  • Optionalframerate?: number

    The framerate to use for the game and various managers. Defaults to 30