Interface: GameOptions
Options to specify HTML canvas, set game canvas size, and load game assets.
Extends
LocalizationOptions
Properties
additionalTranslation?
optional
additionalTranslation: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
Source
bodyBackgroundColor?
optional
bodyBackgroundColor: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
Source
canvasId?
optional
canvasId:string
Id of the HTML canvas that game will be drawn on. If not provided, the first canvas found will be used
Source
fallbackLocale?
optional
fallbackLocale: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
Source
fonts?
optional
fonts:FontAsset
[]
Font assets to use. The first element will be the default font
Source
fpsMetricReportThreshold?
optional
fpsMetricReportThreshold: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
Source
height
height:
number
Height of game canvas
Source
id
id:
string
Short identifier of this game; unique among published games and url-friendly (no spaces, special characters, or slashes).
Source
images?
optional
images:BrowserImage
[]
Array of BrowserImage objects to render and load
Source
locale?
optional
locale:string
Locale to use for localization when running the game, or "auto" to request from the environment.
Inherited from
LocalizationOptions.locale
Source
logWebGl?
optional
logWebGl:boolean
Show logs for WebGl activity?
Source
longDescription?
optional
longDescription:string
Full description of game
Source
maximumRecordedActivityMetrics?
optional
maximumRecordedActivityMetrics:number
Maximum number of activity metrics to log.
Source
missingLocalizationColor?
optional
missingLocalizationColor: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
Source
moduleMetadata?
Internal
optional
moduleMetadata:ModuleMetadata
Game's module name, version, and dependencies. For m2c2kit library use only
Source
name
name:
string
Human-friendly name of this game
Source
parameters?
optional
parameters:GameParameters
Default game parameters; JSON object where key is the game parameter, value is default value
Source
publishUuid
publishUuid:
string
Persistent unique identifier (UUID) of this game; unique among published games. The m2c2kit CLI will generate this property automatically, and you should not change it. If not using the CLI, use a website like https://www.uuidgenerator.net/version4 to generate this value.
Source
recordEvents?
optional
recordEvents:boolean
Should the game events be saved to the event store? Default is false
Source
shareAssets?
optional
shareAssets:boolean
Should games within a session share wasm and font assets that have identical filenames, in order to reduce bandwidth? Default is true.
Source
shortDescription?
optional
shortDescription:string
Brief description of game
Source
showEventStoreControls?
optional
showEventStoreControls:boolean
Show controls for replaying and viewing the event store? Default is false
Source
showFps?
optional
showFps:boolean
Show FPS in upper left corner? Default is false
Source
sounds?
optional
sounds:SoundAsset
[]
Array of SoundAsset objects to fetch and decode
Source
stretch?
optional
stretch:boolean
Stretch to fill screen? Default is false
Source
timeStepping?
optional
timeStepping:boolean
Advance through time step-by-step, for development and debugging
Source
translation?
optional
translation:Translation
Translation for localization.
Inherited from
LocalizationOptions.translation
Source
trialSchema?
optional
trialSchema:TrialSchema
Schema of trial data; JSON object where key is variable name, value is data type
Source
uri?
optional
uri:string
Uri (repository, webpage, or other location where full information about the game can be found)
Source
version
version:
string
Version of this game
Source
width
width:
number
Width of game canvas