[title: "ErrorScreen Class"] ← Back to index

Error display screen shown when game crashes

[heading: "Description"]

The ErrorScreen state is shown when the game crashes, displaying the crash message on a full-screen splash. Pressing any key restarts the game into the configured recovery state, while clicking the screen opens the bug report page before recovering.

[heading: "Key Features"] [list] * Displays crash message on a full-screen splash * Any key recovers to a configured state * Clicking opens the bug report page before recovering [/list] [heading: "Constructor"] [table header] [ Parameter | Type | Description ] [ message | string | Crash message shown to the player. ] [ recoverStateKey | string | State to restart into when the player recovers. ] [/table] [heading: "Properties"] [table header] [ Property | Type | Description ] [ message | string | Crash message displayed to the player. ] [ recoverStateKey | string | State key to restart into on recovery. ] [ background | Phaser.Graphics | Full-screen error background fill ] [/table] [heading: "Methods"] [table header] [ Method | Parameters | Description ] [ init | (message, recoverStateKey) | Stores the crash message and the state used to recover from the error. ] [ create | () | Renders the error splash and wires the recovery input handlers. ] [/table] [heading: "Example Usage (Modding)"] [codeblock javascript] // Modding usage example game.state.start("ErrorScreen"); // Provide a custom message and recovery state game.state.start("ErrorScreen", true, false, "Audio device failed", "MainMenu"); [/codeblock] [footer: "© Retora 2026"]