Interface: GameOptions
Options to specify HTML canvas, set game canvas size, and load game assets.
Extends
LocalizationOptions
Properties
additionalTranslation?
optionaladditionalTranslation:Translation
Additional translation for localization. This will typically be provided through setParameters() at runtime. This translation be merged into the existing translation and will overwrite any existing translation with the same key-value pairs. Thus, this can be used to modify an existing translation, either in whole or in part.
Inherited from
LocalizationOptions.additionalTranslation
Defined in
m2c2kit/packages/core/src/LocalizationOptions.ts:17
bodyBackgroundColor?
optionalbodyBackgroundColor:RgbaColor
Color of the html body, if the game does not fill the screen. Useful for showing scene boundaries. Default is the scene background color
Defined in
m2c2kit/packages/core/src/GameOptions.ts:52
canvasId?
optionalcanvasId:string
Id of the HTML canvas that game will be drawn on. If not provided, the first canvas found will be used
Defined in
m2c2kit/packages/core/src/GameOptions.ts:30
dynamicSizing?
optionaldynamicSizing:boolean
Should the game dynamically resize to fit the viewport and respond to DPI changes? Default is true
Defined in
m2c2kit/packages/core/src/GameOptions.ts:68
fallbackLocale?
optionalfallbackLocale:string
Locale to use if requested locale translation is not available, or if "auto" locale was requested and environment cannot provide a locale. Default is en-US.
Inherited from
LocalizationOptions.fallbackLocale
Defined in
m2c2kit/packages/core/src/LocalizationOptions.ts:11
fonts?
optionalfonts:FontAsset[]
Font assets to use. The first element will be the default font
Defined in
m2c2kit/packages/core/src/GameOptions.ts:44
fpsMetricReportThreshold?
optionalfpsMetricReportThreshold:number
The FPS will be logged in game metrics if the FPS is lower than this value. Default is 59, as defined in Constants.FPS_METRIC_REPORT_THRESHOLD
Defined in
m2c2kit/packages/core/src/GameOptions.ts:56
height
height:
number
Height of game canvas
Defined in
m2c2kit/packages/core/src/GameOptions.ts:34
id
id:
string
Short identifier of this game; unique among published games and url-friendly (no spaces, special characters, or slashes).
Defined in
m2c2kit/packages/core/src/GameOptions.ts:18
images?
optionalimages:BrowserImage[]
Array of BrowserImage objects to render and load
Defined in
m2c2kit/packages/core/src/GameOptions.ts:46
locale?
optionallocale:string
Locale to use for localization when running the game, or "auto" to request from the environment.
Inherited from
LocalizationOptions.locale
Defined in
m2c2kit/packages/core/src/LocalizationOptions.ts:9
logWebGl?
optionallogWebGl:boolean
Show logs for WebGl activity?
Defined in
m2c2kit/packages/core/src/GameOptions.ts:64
longDescription?
optionallongDescription:string
Full description of game
Defined in
m2c2kit/packages/core/src/GameOptions.ts:28
maximumRecordedActivityMetrics?
optionalmaximumRecordedActivityMetrics:number
Maximum number of activity metrics to log.
Defined in
m2c2kit/packages/core/src/GameOptions.ts:54
missingLocalizationColor?
optionalmissingLocalizationColor:RgbaColor
Font color for strings or outline color for images when a requested locale's translation or image is missing. This is useful in development to call attention to missing localization assets.
Inherited from
LocalizationOptions.missingLocalizationColor
Defined in
m2c2kit/packages/core/src/LocalizationOptions.ts:13
moduleMetadata?
optionalmoduleMetadata:ModuleMetadata
Internal
Game's module name, version, and dependencies. For m2c2kit library use only
Defined in
m2c2kit/packages/core/src/GameOptions.ts:70
name
name:
string
Human-friendly name of this game
Defined in
m2c2kit/packages/core/src/GameOptions.ts:16
parameters?
optionalparameters:GameParameters
Default game parameters; JSON object where key is the game parameter, value is default value
Defined in
m2c2kit/packages/core/src/GameOptions.ts:42