Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Game Config
Phaser 4.1.0
Phaser 4 examples
Game Config
19
examples
Examples
19
Clear Before Render
Demonstrates how to disable canvas clearing between frames using the clearBeforeRender and preserveDrawingBuffer configuration settings to create persistent motion trails.
Custom Canvas
Demonstrates how to provide an existing HTML5 Canvas element to the Phaser game configuration instead of allowing Phaser to create its own.
Custom Console Banner Colors
Demonstrates how to customize the text and background colors of the Phaser startup banner shown in the browser console, as well as how to hide the Phaser version info.
Custom WebGL Canvas
Demonstrates how to provide a pre-existing canvas element and a manually created WebGL context to the Phaser Game configuration.
Custom WebGL2 Canvas and Context
Demonstrates how to provide Phaser with a pre-existing HTML canvas and a manually created WebGL2 context using specific configuration attributes.
Game Background Transparency
Demonstrates how to configure the game canvas with transparency using the backgroundColor and transparent properties, allowing HTML elements behind the game to show through.
Game Destroy
Demonstrates how to programmatically shut down and destroy a Phaser game instance, including removing the canvas, and then re-instantiate the game.
Game Destroy With Multi Scenes
Demonstrates how to destroy a running game instance containing multiple active scenes and then re-initialize it upon user interaction.
Game RNG Seed
Demonstrates how to use a fixed seed in the Game Configuration to produce deterministic, repeatable results across various random number generation methods.
Game Title Configuration
Shows how to define a custom game title in the global configuration and access it via the game config property.
Game URL and Title Configuration
Demonstrates how to define a title and URL in the game configuration and access those values from within a scene.
Game Version and Title
Demonstrates how to define a title and version number in the game configuration and access them through the game config object.
Headless Renderer
Configure the game to use the Phaser.HEADLESS renderer type, allowing the game loop and logic to run without rendering any visual output to the screen.
Hide Console Banner
Demonstrates how to disable the Phaser version and renderer information banner that typically appears in the browser console when the game starts.
Hide Phaser From Console Banner
Learn how to use the game configuration to remove the Phaser library name and version number from the browser console startup banner.
Multiple Game Instances
Demonstrates how to run two completely independent Phaser game instances simultaneously on the same web page, each with its own configuration and Scenes.
Pixel Art Mode
Demonstrates how to enable pixel art mode in the game configuration to disable texture smoothing, keeping scaled images, tilemaps, and text crisp and sharp.
Round Pixels
Demonstrates how the roundPixels configuration setting ensures Game Objects are rendered at whole integer pixel coordinates, preventing sub-pixel blur even when positions use decimal values.
Transparent Game Canvas
Configure a Phaser game to have a transparent canvas, allowing the underlying HTML page or CSS background to show through the scene.