<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Phaser 4 Encyclopedia</title><description>A practical reference for building 2D games with Phaser 4 — for web developers.</description><link>https://cadmus.page/</link><language>en</language><item><title>What is Phaser 4?</title><link>https://cadmus.page/en/phaser/01-start/what-is-phaser-4/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/01-start/what-is-phaser-4/</guid><description>An orientation to Phaser 4 — what it is, what it isn&apos;t, and how it differs from Phaser 3.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Phaser 4 is a 2D game framework for the web. It renders to WebGL (with a Canvas fallback), runs in every modern browser, and ships as a TypeScript-first library.&lt;/p&gt;&lt;p&gt;A scene-based architecture for organizing game state and rendering.
A retained-mode display list of game objects (sprites, text, shapes, containers).
An asset loader with a typed cache.
Pluggable physics (Arcade for fast AABB, Matter for full rigid-body).
Input across keyboard, pointer (mouse + touch), and gamepad.
A tilemap system, particle system, animation manager, audio pipeline, and a tween engine for property interpolation.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Installation</title><link>https://cadmus.page/en/phaser/01-start/installation/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/01-start/installation/</guid><description>Install Phaser 4 via npm or a CDN, and verify the install with a one-line scene.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Phaser 4 ships its own TypeScript types — no needed.&lt;/p&gt;&lt;p&gt;For quick experiments or single-file demos:&lt;/p&gt;&lt;p&gt;tracks the latest 4.x release. Pin to an exact version (e.g. ) in production so a new release can&apos;t shift your behavior. See the changelog for current releases.&lt;/p&gt;&lt;p&gt;Verifying the install&lt;/p&gt;&lt;p&gt;The smallest possible Phaser 4 program — a black canvas, ready to receive game objects:&lt;/p&gt;&lt;p&gt;If you see the text on a black background, you&apos;re set up. Continue to Your First Scene.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Your First Scene</title><link>https://cadmus.page/en/phaser/01-start/first-scene/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/01-start/first-scene/</guid><description>Build and run your first Phaser 4 scene — a bouncing logo — in a sandboxed playground.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A Phaser 4 program is, at minimum, a configured with at least one . A scene has three lifecycle hooks you&apos;ll use constantly:&lt;/p&gt;&lt;p&gt;— load assets into the cache.
— build the initial scene graph.
— run per-frame logic.&lt;/p&gt;&lt;p&gt;Here is the smallest interesting program: a sprite that bounces around its bounds. Edit the source in your own project and the same code will run identically.&lt;/p&gt;&lt;p&gt;**** asks Phaser to pick the best renderer (WebGL where available, Canvas otherwise).
The config enables Arcade physics with no gravity, so the sprite moves in a straight line until something deflects it.
queues an asset; the l…&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Project Setup</title><link>https://cadmus.page/en/phaser/01-start/project-setup/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/01-start/project-setup/</guid><description>Recommended project layout, build tooling, and TypeScript settings for non-trivial Phaser 4 projects.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;For a sketch or single-file demo, the installation snippet is enough. For a real project, a few decisions will save you weeks.&lt;/p&gt;&lt;p&gt;Vite is the recommended starting point — Phaser 4 ships ESM, and Vite handles asset URLs and HMR with no config.&lt;/p&gt;&lt;p&gt;A layout that scales from a jam game to a shipped project:&lt;/p&gt;&lt;p&gt;Keep import-free of Phaser where you can — pure logic is easier to test.&lt;/p&gt;&lt;p&gt;Phaser 4 ships strict types. Use them:&lt;/p&gt;&lt;p&gt;Vite HMR works for everything outside a running scene. To pick up changes inside a scene, restart the scene with or use a dev-only key binding to do so.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Core Concepts</title><link>https://cadmus.page/en/phaser/02-concepts/00-overview/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/02-concepts/00-overview/</guid><description>The mental model behind Phaser 4 — what each subsystem is for, and how they fit together.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The pages in this section explain why Phaser is shaped the way it is. They are not recipes — see Guides for those — but the vocabulary on this page reappears across the rest of the encyclopedia.&lt;/p&gt;&lt;p&gt;The Game Loop — how and are scheduled, and what actually means.
Scenes — Phaser&apos;s unit of &quot;screen&quot; or &quot;mode,&quot; and how multiple scenes coexist.
Game Objects — the retained display list, transforms, and the difference between an and a .
Cameras — viewports, scroll, zoom, and effects.
Input — keyboard, pointer, and gamepad, and how Phaser routes events to objects.
Loader &amp;amp; Assets — the loading pipeline a…&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>The Game Loop</title><link>https://cadmus.page/en/phaser/02-concepts/game-loop/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/02-concepts/game-loop/</guid><description>How Phaser 4 schedules update and render, what delta means, and how to write frame-rate-independent code.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Every frame, Phaser does roughly this:&lt;/p&gt;&lt;p&gt;Drain the input queue (pointer, keyboard, gamepad events received since the last frame).
Call each active scene&apos;s .
Step the physics world.
Render the display list to the canvas.&lt;/p&gt;&lt;p&gt;is a monotonic millisecond timestamp; is the milliseconds elapsed since the previous frame.&lt;/p&gt;&lt;p&gt;Frame-rate independence&lt;/p&gt;&lt;p&gt;The single most important rule:&lt;/p&gt;&lt;p&gt;&amp;gt; Multiply movement and rates by , not by a constant.&lt;/p&gt;&lt;p&gt;This applies to physics velocities you set manually, animation timers, particle emission rates, and anything else expressed as &quot;per second.&quot;&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Scenes</title><link>https://cadmus.page/en/phaser/02-concepts/scenes/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/02-concepts/scenes/</guid><description>Phaser&apos;s unit of &quot;screen&quot; or &quot;mode&quot; — lifecycle, parallel scenes, and data passing.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A Scene is a self-contained world: it owns a display list, a camera, an input handler, and (optionally) a physics world. A runs one or more scenes; each has its own update loop.&lt;/p&gt;&lt;p&gt;A scene that&apos;s stopped and later started again sees / / fire afresh — pair every with the it cleans up after.&lt;/p&gt;&lt;p&gt;Multiple scenes at once&lt;/p&gt;&lt;p&gt;Scenes are not mutually exclusive. Common patterns:&lt;/p&gt;&lt;p&gt;A persistent HUD scene runs in parallel with the gameplay scene.
A pause menu scene sits on top; the gameplay scene is paused but not stopped.
A long-lived audio or save scene exists purely for cross-cutting state.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Game Objects</title><link>https://cadmus.page/en/phaser/02-concepts/game-objects/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/02-concepts/game-objects/</guid><description>The retained-mode display list — what game objects are, how the transform hierarchy works, and when to use which built-in type.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A Game Object is anything that lives in the scene graph and can be rendered, transformed, or hit-tested. Phaser uses retained-mode rendering: you create objects once, mutate their properties, and the renderer draws whatever currently exists. There is no per-frame &quot;draw a sprite at (x, y)&quot; call.&lt;/p&gt;&lt;p&gt;Rule of thumb: reach for first; promote to only when you need animations.&lt;/p&gt;&lt;p&gt;The transform hierarchy&lt;/p&gt;&lt;p&gt;Containers form a tree. Each child&apos;s world transform is its local transform composed with its parent&apos;s. This is how you build composite objects:&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Cameras</title><link>https://cadmus.page/en/phaser/02-concepts/cameras/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/02-concepts/cameras/</guid><description>Viewports, scroll, zoom, follow, and effects — how Phaser decides what to draw and where.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A Camera is a viewport onto the scene&apos;s world space. Every scene has at least one (); you can add more for splits, minimaps, and picture-in-picture.&lt;/p&gt;&lt;p&gt;World vs. screen coordinates&lt;/p&gt;&lt;p&gt;World coordinates are where game objects live. They do not change when the camera moves.
Screen coordinates are where pixels land on the canvas.&lt;/p&gt;&lt;p&gt;The camera maps one to the other via , , and . When you need a screen-space overlay (HUD), put it in a separate scene whose camera does not scroll.&lt;/p&gt;&lt;p&gt;The lerp factors smooth the follow — is instant, never moves.&lt;/p&gt;&lt;p&gt;Built-in transitions:&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Input</title><link>https://cadmus.page/en/phaser/02-concepts/input/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/02-concepts/input/</guid><description>Keyboard, pointer (mouse + touch), and gamepad — and how Phaser routes events to game objects.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Phaser unifies keyboard, pointer (mouse + touch), and gamepad behind a single input manager exposed as .&lt;/p&gt;&lt;p&gt;Polling fits continuous actions (movement); events fit discrete actions (jump, fire, menu select).&lt;/p&gt;&lt;p&gt;The pointer always reports screen coordinates. Use to translate.&lt;/p&gt;&lt;p&gt;Per-object interactivity&lt;/p&gt;&lt;p&gt;For &quot;click this sprite&quot; semantics, opt the object in:&lt;/p&gt;&lt;p&gt;Phaser tests the object&apos;s bounds (rectangle by default; pixel-perfect if requested) and only fires events when the pointer actually intersects.&lt;/p&gt;&lt;p&gt;Gamepad support is off by default — enable it in the game config:&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Loader &amp; Assets</title><link>https://cadmus.page/en/phaser/02-concepts/loader/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/02-concepts/loader/</guid><description>How the asset pipeline works — queueing in preload, the typed cache, and patterns for large games.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Each scene has a Loader () that queues asset requests during . When returns, the loader runs to completion before is called.&lt;/p&gt;&lt;p&gt;Each entry registers under a string key. The corresponding cache exposes typed accessors — , , etc.&lt;/p&gt;&lt;p&gt;To show a progress bar, listen on the loader during :&lt;/p&gt;&lt;p&gt;A common pattern is a tiny Boot scene that loads the loading bar&apos;s own assets, then transitions to a Preload scene that loads everything else.&lt;/p&gt;&lt;p&gt;You can call after , but you must explicitly start the loader:&lt;/p&gt;&lt;p&gt;Useful for streaming-in level data, but prefer eager loading where you can — the runtime cost of a mid-game st…&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Guides</title><link>https://cadmus.page/en/phaser/03-guides/00-overview/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/00-overview/</guid><description>Task-oriented recipes for the systems you&apos;ll actually use — physics, tilemaps, animation, audio, particles, shaders, and plugins.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Guides are how-to documents. Each one walks through a single task end to end, with working code. If you want the why, see Core Concepts; if you want the what, see the API Reference.&lt;/p&gt;&lt;p&gt;Physics
 - Arcade physics — fast AABB collisions for platformers, shmups, and most arcade-style games.
 - Matter physics — full rigid-body simulation with joints and stacking.
Tilemaps — loading Tiled maps, layers, and collision.
Animation — frame animations and the animation manager.
Tweens — interpolating any numeric property over time.
Audio — Web Audio integration, music, and spatial sound.
Particles — the par…&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Arcade Physics</title><link>https://cadmus.page/en/phaser/03-guides/physics-arcade/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/physics-arcade/</guid><description>Fast AABB physics for platformers, shmups, and most arcade-style games — bodies, collisions, groups, and the pitfalls that trip new users.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Arcade is Phaser 4&apos;s fast physics system. It models everything as axis-aligned bounding boxes (AABBs) or circles — no rotation, no rigid-body stacking, no joints. In exchange you get a system fast enough to step hundreds of bodies per frame on a phone.&lt;/p&gt;&lt;p&gt;Use Arcade when all of these are true:&lt;/p&gt;&lt;p&gt;You don&apos;t need rotational physics (&quot;a tilted box rests on a slope&quot;).
You don&apos;t need stacking (&quot;boxes pile up correctly&quot;).
You don&apos;t need joints, constraints, or compound bodies.&lt;/p&gt;&lt;p&gt;Most platformers, top-down adventures, shmups, brick-breakers, and casual puzzle games fit. If you find yourself fighting Arcad…&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Matter Physics</title><link>https://cadmus.page/en/phaser/03-guides/physics-matter/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/physics-matter/</guid><description>Full rigid-body simulation for stacking, joints, compound bodies, and anything Arcade can&apos;t model.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Matter is the heavyweight physics option. It models true rigid bodies — with rotation, friction, restitution, joints, constraints, and arbitrary polygon shapes — at the cost of more CPU per body and a more complex API surface.&lt;/p&gt;&lt;p&gt;Choose Matter the moment you need any of:&lt;/p&gt;&lt;p&gt;Rotation. A tilted box that comes to rest on a slope at the correct angle.
Stacking. A pile of boxes that settles realistically.
Joints / constraints. Ropes, chains, hinges, springs, motorized wheels.
Compound bodies. A vehicle with a chassis plus separate wheels.
Polygon collision. A non-rectangular hitbox.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Tilemaps</title><link>https://cadmus.page/en/phaser/03-guides/tilemaps/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/tilemaps/</guid><description>Loading Tiled JSON maps, rendering layers, building collision, and mutating tiles at runtime.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Phaser 4&apos;s tilemap system reads Tiled JSON exports. You author the map externally and let Phaser handle rendering, collision, and runtime mutation.&lt;/p&gt;&lt;p&gt;Two files are involved: the map JSON and the tileset image referenced by it.&lt;/p&gt;&lt;p&gt;Then assemble the map and its layers:&lt;/p&gt;&lt;p&gt;The third and fourth args are world coordinates of the layer&apos;s top-left corner — usually .&lt;/p&gt;&lt;p&gt;Three idiomatic ways to mark which tiles collide:&lt;/p&gt;&lt;p&gt;For one-way platforms, slopes, and other angle-aware collision, see the API reference — methods and the Arcade-specific cover most cases.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Animation</title><link>https://cadmus.page/en/phaser/03-guides/animation/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/animation/</guid><description>Frame animations from spritesheets and atlases — defining, playing, chaining, and reacting to animation events.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Phaser 4&apos;s animation system plays sequences of texture frames on a . Animations are defined once at the scene level (or globally) and then played on any number of sprites — the definition and the playback are separate.&lt;/p&gt;&lt;p&gt;Where animations live&lt;/p&gt;&lt;p&gt;* — the scene-level animation manager. Animations live here by default.
(rare) — a global manager you can use to share definitions across scenes.&lt;/p&gt;&lt;p&gt;Almost always use the scene-level manager. Cross-scene sharing tends to leak state.&lt;/p&gt;&lt;p&gt;Defining an animation&lt;/p&gt;&lt;p&gt;You need a source — a spritesheet (uniform frames) or an atlas (named frames, irregular):&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Tweens</title><link>https://cadmus.page/en/phaser/03-guides/tweens/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/tweens/</guid><description>Phaser 4&apos;s tween system — interpolating any numeric property over time. Targets, easing, chaining, value tweens, and the pitfalls.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A tween interpolates a value over time. You point a tween at one or more objects and tell it what properties to change, how, and over what duration — Phaser handles the per-frame math.&lt;/p&gt;&lt;p&gt;Tweens are the single most-used utility in Phaser code: fades, eased camera moves, UI bounce, dialog reveals, value animations driving custom logic.&lt;/p&gt;&lt;p&gt;Reads as: &quot;move to 400 over 1000ms, using the default easing.&quot; Phaser captures the current value of at the moment the tween starts and interpolates from there.&lt;/p&gt;&lt;p&gt;A tween can drive any number of objects at once:&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Audio</title><link>https://cadmus.page/en/phaser/03-guides/audio/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/audio/</guid><description>Phaser 4&apos;s Web Audio integration — music vs. SFX, the user-gesture unlock, mixing, and spatial sound.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Phaser 4 wraps the browser&apos;s Web Audio API behind . You load audio through the standard loader and play it through a typed sound manager.&lt;/p&gt;&lt;p&gt;Always ship at least two formats. OGG covers Firefox and Chrome; MP3 or M4A is needed for Safari.&lt;/p&gt;&lt;p&gt;returns the sound but doesn&apos;t keep a reference — use + whenever you need to control the sound after starting it (pause, fade, change volume).&lt;/p&gt;&lt;p&gt;The user-gesture unlock&lt;/p&gt;&lt;p&gt;Browsers refuse to start audio until the page has received a user gesture (click, key press, touch). Phaser detects this and unlocks the audio context on the first input — but any sound you try…&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Particles</title><link>https://cadmus.page/en/phaser/03-guides/particles/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/particles/</guid><description>The particle emitter — common effects, configuration anatomy, and the performance tradeoffs that actually matter.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A particle emitter spawns many short-lived sprites with randomized properties and (optionally) interpolated lifetimes. Phaser 4 ships a single emitter class that covers everything from a smoke trail to a screen-shaking explosion.&lt;/p&gt;&lt;p&gt;The shape of an emitter&lt;/p&gt;&lt;p&gt;Per-particle randomness via range objects. randomizes the initial value; interpolates from start to end over the particle&apos;s lifetime.
Per-emitter rate via + . Together they set &quot;particles per second.&quot; switches to explosion mode — emit particles at once when is called.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Shaders</title><link>https://cadmus.page/en/phaser/03-guides/shaders/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/shaders/</guid><description>Custom WebGL effects in Phaser 4 — the built-in Filter library, custom GLSL via the Shader game object, and where RenderNodes fit in.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Phaser 3&apos;s system is gone in Phaser 4. Three replacements cover almost every use case:&lt;/p&gt;&lt;p&gt;Pipelines, , , and no longer exist. If you&apos;re porting from v3, see Migrating from Phaser 3 for the mechanical swaps.&lt;/p&gt;&lt;p&gt;Filters: the built-in catalogue&lt;/p&gt;&lt;p&gt;Every game object and every camera exposes a property with and filter lists. Internal filters affect the object itself; external filters affect the rendering context (typically full screen).&lt;/p&gt;&lt;p&gt;The full set ships with v4: , , , , , , , , , , , , , , , , , , , , , , , . Each call returns a Controller you can tweak or remove later:&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Plugins</title><link>https://cadmus.page/en/phaser/03-guides/plugins/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/plugins/</guid><description>Authoring and consuming Phaser 4 plugins — the three plugin shapes (global, scene, game-object), and a worked save-system example.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A plugin is a self-contained module that hooks into Phaser&apos;s lifecycle. Phaser 4 supports three shapes, each with different scope and lifecycle:&lt;/p&gt;&lt;p&gt;Pick the smallest scope that fits. A global plugin that only one scene uses is just a leak.&lt;/p&gt;&lt;p&gt;A class extending . It&apos;s instantiated once when the game starts and exposed via from anywhere.&lt;/p&gt;&lt;p&gt;Register it in the game config:&lt;/p&gt;&lt;p&gt;instantiates immediately; exposes it as on every scene. Without , you reach for it via .&lt;/p&gt;&lt;p&gt;A class extending . Each scene gets its own instance, and the plugin can hook into the scene&apos;s lifecycle events:&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Scene transitions</title><link>https://cadmus.page/en/phaser/03-guides/scene-transitions/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/03-guides/scene-transitions/</guid><description>The `scene.transition()` API — animated handoff between scenes with both scenes running during the overlap.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;swaps scenes hard — the outgoing scene&apos;s fires before the incoming scene&apos;s . gives you an overlap window where both scenes run together, perfect for crossfades, slide-ins, and &quot;wipe one scene off the screen while the next slides on&quot; effects.&lt;/p&gt;&lt;p&gt;Reads as: &quot;start running alongside me; for the next 600ms call with progress; when it ends, do X to me (sleep / shutdown / remove).&quot;&lt;/p&gt;&lt;p&gt;The target scene&apos;s and fire immediately. Its runs every frame from frame zero of the transition. The outgoing scene keeps updating too (unless you stop it from the ).&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Examples</title><link>https://cadmus.page/en/phaser/04-examples/00-overview/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/04-examples/00-overview/</guid><description>Runnable Phaser 4 examples — each one is a sandboxed playground you can read, fork, and modify.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Every example here runs in a sandboxed iframe with a pinned Phaser 4 build. The source on the page is the exact source being executed — there&apos;s no hidden setup.&lt;/p&gt;&lt;p&gt;Basic sprite — load a texture and draw it.
Keyboard movement — WASD / arrows moving a sprite, polling style with delta-time velocity.
Scene transition — fade between two scenes using the camera fade API.
Tween chain — chain a sequence of tween effects on a single target.
Collision response — click to drop physics balls that collide with each other and the world bounds.
Particle burst — click anywhere to fire a one-shot explosion using…&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Basic sprite</title><link>https://cadmus.page/en/phaser/04-examples/basic-sprite/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/04-examples/basic-sprite/</guid><description>The smallest possible Phaser 4 example — load a texture and draw it once.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;picks WebGL where supported, else Canvas.
mounts onto the provided by the playground iframe.
The image is loaded over the network — the playground will show a brief blank canvas while it resolves.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Keyboard movement</title><link>https://cadmus.page/en/phaser/04-examples/keyboard-movement/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/04-examples/keyboard-movement/</guid><description>Move a sprite with WASD or arrow keys, polling input each frame with delta-time velocity.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Click the playground first so the iframe receives keyboard focus.
gives you ready to poll.
lets you offer WASD parity with a one-liner.
Movement is — pixels per second, framerate-independent. See The Game Loop.
Polling style fits continuous movement; events fit discrete actions (jump, fire). See Input.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Scene transition</title><link>https://cadmus.page/en/phaser/04-examples/scene-transition/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/04-examples/scene-transition/</guid><description>Fade between two scenes using the camera fade-out / fade-in API.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The array registers multiple scenes; the first runs by default.
darkens the camera; is the inverse.
The completion is signalled by the event — perfect place to swap scenes.
replaces the current scene (vs. which runs in parallel — useful for HUDs and pause menus).
See Scenes for the rest of the lifecycle.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Tween chain</title><link>https://cadmus.page/en/phaser/04-examples/tween-chain/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/04-examples/tween-chain/</guid><description>Chain a sequence of tween effects on a single target — move, spin, fade, reset, loop.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Each item in is a full tween config — its own , , , callbacks.
The chain runs them sequentially, capturing the current value of each property as it starts.
The outer re-arms the chain — the &quot;perpetual loop&quot; pattern. (You could also use on a regular tween for simpler loops.)
See the Tweens guide for chain, value tweens, and the rest of the API.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Collision response</title><link>https://cadmus.page/en/phaser/04-examples/collision-response/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/04-examples/collision-response/</guid><description>Click anywhere to drop a physics ball — they collide with each other and the world bounds.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A physics group with keeps every member inside the canvas.
makes group members collide with each other — the second pass over the group is what gives you ball-on-ball bouncing.
switches the body from the default rectangular AABB to a circle. Phaser&apos;s Arcade defaults to rectangles even for round sprites.
Pointer events fire on the iframe — / are already in canvas coordinates.
See Arcade Physics for groups, colliders, overlaps, and the rest.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Particle burst</title><link>https://cadmus.page/en/phaser/04-examples/particle-burst/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/04-examples/particle-burst/</guid><description>Click anywhere to fire a one-shot explosion via the particle emitter&apos;s explode mode.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;* stops the emitter from spawning particles continuously, freeing you to fire bursts on demand.
spawns particles immediately at the given world position.
* gives the bright &quot;glow&quot; look — switch to if you want crisper, less hot-looking particles.
The emitter itself lives at — particle positions are absolute since we override with . For a follow-the-player trail, position the emitter and use the default emit-from-center behavior.
See the Particles guide for emitter zones, common recipes (smoke / explosion / trail), and performance.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Physics overlap (pickups)</title><link>https://cadmus.page/en/phaser/04-examples/physics-overlap/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/04-examples/physics-overlap/</guid><description>Walk into stars to collect them — the canonical &quot;overlap as trigger&quot; pattern with score tracking.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Click the playground to give it keyboard focus first.
vs. : overlap fires a callback when bounding boxes intersect without separating them — perfect for pickups, triggers, hitboxes. separates the bodies and stops them interpenetrating — for walls, floors, enemies.
Group convenience: a single covers every coin in the group. No per-coin wiring.
**** removes the coin from the scene and the group; subsequent overlap checks skip it automatically.
See Arcade Physics for groups, dynamic vs. static bodies, tunneling pitfalls, and debug rendering.&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Shader filter (Glow)</title><link>https://cadmus.page/en/phaser/04-examples/shader-filter/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/04-examples/shader-filter/</guid><description>Apply the built-in Glow filter to a sprite and animate its strength with a tween.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;* is one of Phaser 4&apos;s built-in filters. The full set: , , , , , , , , , , , , , , , , , , , , , , , .
vs. lists: internal filters affect just the object; external filters affect the object in its rendering context (typically full screen). Glow usually wants since the light spreads beyond the source pixels.
The returned Controller is a normal object — properties like , , and are tween-friendly, which makes it trivial to animate the effect.
Note: Bloom isn&apos;t a single filter.* v3 had a FX; in v4 it&apos;s composed via , which sets up multiple filters internally via . The Glow filter above is the si…&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item><item><title>Glossary — Phaser terms for web developers</title><link>https://cadmus.page/en/phaser/05-glossary/01-terms/</link><guid isPermaLink="true">https://cadmus.page/en/phaser/05-glossary/01-terms/</guid><description>Short definitions of the key Phaser 4 concepts, with analogies from the web and other engines.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A consolidated list of the Phaser 4 terms used throughout this encyclopedia. Phaser runs right in
the browser on JavaScript/TypeScript, so the web analogies here are especially close.&lt;/p&gt;&lt;p&gt;Game — the root object (): it creates the canvas, starts the game loop,
and wires up the render, input, audio, and scene managers. Analogy: the application root
() mounted into the DOM once.&lt;/p&gt;&lt;p&gt;Scene — a self-contained &quot;screen&quot; or mode: it owns its display list, a camera, an input handler,
and (optionally) a physics world. Analogy: a route in an SPA. Scenes aren&apos;t mutually exclusive —
several can run in parallel (…&lt;/p&gt;</content:encoded><author>Konstantin Ryzhov</author></item></channel></rss>