scale-and-responsive

Manage display scaling, fullscreen, and responsive layouts in Phaser 4 games.

3|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/Autinhorse/levelcraft --skill scale-and-responsive-autinhorse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scale-and-responsive
Source: https://github.com/Autinhorse/levelcraft/tree/main/games/docs/phaser-skills/scale-and-responsive
Command: npx skills add https://github.com/Autinhorse/levelcraft --skill scale-and-responsive-autinhorse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It enables developers to easily implement display scaling, responsive layouts, and fullscreen management in Phaser 4, ensuring games look great across all devices and screen sizes.

Core Features & Use Cases

  • Scaling Modes: Supports FIT, RESIZE, ENVELOP, and other scale modes for flexible display adaptation.
  • Responsive Design: Handles browser resize, device orientation changes, and fullscreen toggling seamlessly.
  • Use Case: Develop a mobile-ready game that maintains aspect ratio and centers correctly on any device with minimal configuration.

Quick Start

Use the ScaleManager to set up a game that adjusts to window resizing and centers content by configuring the scale property with mode Phaser.Scale.FIT and auto-centering options.

Frequently Asked Questions about scale-and-responsive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a Phaser 4 game responsive across different screen sizes?

To make a Phaser 4 game responsive, configure the ScaleManager with modes like FIT or RESIZE to handle browser resizing and device orientation changes. This ensures the display adapts seamlessly while maintaining aspect ratio and centering content.

What's the best way to handle device orientation changes in Phaser 4?

Device orientation changes in Phaser 4 are handled seamlessly by configuring the scale property to listen for screen rotations. This automatically recalculates adaptive layouts and repositions user interfaces to maintain correct display proportions.

Does Phaser 4 support fullscreen toggling for mobile web games?

Yes, Phaser 4 supports fullscreen toggling for mobile web games. The scaling tools facilitate seamless transitions into fullscreen mode while preserving the aspect ratio and ensuring user interfaces scale correctly across various devices.

How do I preserve aspect ratio when resizing a Phaser game canvas?

Preserving aspect ratio when resizing a Phaser game canvas is achieved by setting the scale mode to Phaser.Scale.FIT. This scales the game proportionally to fit available screen space without stretching, while auto-centering options keep it aligned.

Why does my Phaser 4 UI misalign after a browser resize?

A Phaser 4 UI misaligns after a browser resize if responsive scaling is not configured. Implementing the ScaleManager with RESIZE or FIT modes and enabling auto-centering ensures adaptive layouts dynamically reposition interface elements.