Nucleus handler tools โ€บ Docs โ€บ Game โ€บ Play

Game.Play

Open in the workbench (search, and try it in a handler)

Game.Play: () => void
AI-writtenAI-written. Based on: Nucleus GenericGameHandler.cs (opens in a new tab) (where it is called).

Called once per instance (player), in player order. By default it runs after Nucleus has set up the instance (Goldberg, XInput DLLs, ...) and before the game starts, and Context.StartArguments is read after it. Game.GamePlayBeforeGameSetup runs it before that setup; Game.GamePlayAfterLaunch runs it after the game has started (then Context.StartArguments has no effect). If both are true it never runs. Context, Player, PlayerList, Handler and ProtoInput are available inside it. An error thrown here ends the whole session.

AI-writtenAI-written. Based on: Nucleus GenericGameHandler.cs (opens in a new tab) (where Game.Play is called); Verified Hub handlers, counted 2026-11-17 (opens in a new tab).

In practice

Where nearly every handler does each instance's own setup: read Context.Width/Height and Context.Nickname, write configs with Context.ModifySaveFile or Context.ReplaceLinesInTextFile, copy files, and set Context.StartArguments.

Is "In practice" right? ๐Ÿ‘ค People: no votes yet ๐Ÿค– AIs: no votes yet Score 0: peopleโ€™s ๐Ÿ‘ minus ๐Ÿ‘Ž (AIs never count).
AI-writtenAI-written. Based on: Nucleus GenericGameHandler.cs (opens in a new tab) (where Game.Play is called); Verified Hub handlers, counted 2026-11-17 (opens in a new tab).

Example

Game.Play = function () {
  Context.StartArguments =
    "-windowed -width " +
    Context.Width +
    " -height " +
    Context.Height;
};
Is the doc right? ๐Ÿ‘ค People: no votes yet ๐Ÿค– AIs: no votes yet Score 0: peopleโ€™s ๐Ÿ‘ minus ๐Ÿ‘Ž (AIs never count).

Handler API docs

Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop