createGameWorld
createGameWorld(
game,options?):World
Makes the simulation a game runs in, Unreal’s game world, and no place
players come back to, which createWorld asks the platform for. One
world per game, and one per test case: a room process runs one per
room. Its entities dispose what they tracked on the way out. Koota
fires onRemove before it drops the trait’s data, so the list is still
there to read. The step runs what the game’s plugins composed around
the core, as defineGame composed them once, and its physics scene
steps with the game’s settings. Its random stream starts seeded with
defaultRandomSeed, so a checkpoint taken before its first draw still
carries it. Its saves resolve here as the session will resolve them,
on the game’s own host. unixSeconds stamps its Unix clock at tick 0, before a
scene mounts or a save restores: the room’s wall, or the page’s, and
defaultUnixSeconds where left out, as in a test. It steps at
tickRate, a room’s resolved rate where its start named another, and
otherwise its game’s, GameDescriptor.tickRate: 30 for a game with a
room that names none, 60 for a game played alone that names none; a
reset keeps it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
game |
GameDescriptor |
options |
{ tickRate?: 30 | 60; unixSeconds?: number; } |
options.tickRate? |
30 | 60 |
options.unixSeconds? |
number |
Returns
Section titled “Returns”World