Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

createHeadlessGame

createHeadlessGame(headlessGameOptions): Promise<HeadlessGame>

A world with the ground from the seeded map and the scene’s entities, ready to step: the physics wasm and the scatter shapes are loaded before it returns, and on a dev world the prediction checks, so they run from its first step. From @spawnite/engine/core: const game = await createHeadlessGame({ scene: spawnCoins, plugins }), then stepSeconds(game, 1), then game.world.destroy(), as Headless tests shows.

Parameter Type
headlessGameOptions HeadlessGameOptions

Promise<HeadlessGame>