Skip to content
Tutorials Center
My learning

Topics

Phaser Tutorial

Learn Phaser step by step: 36 lessons in 9 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is Phaser? A Tour of the HTML5 Game Framework Learn what the Phaser game framework is, what it gives you, how a game is organized into scenes and game objects, and run your first live Phaser example.
  2. 2 Your First Phaser Game: Setup, Scene and Click Target Build your first complete Phaser game: the HTML page, loading Phaser from a CDN, a scene class, a score, a timer and a click target. Runs live in the browser.
  3. 3 The Phaser Game Configuration Explained Understand every important Phaser game config option: renderer type, size, parent, background, scale modes, pixel art, FPS, physics and scenes, with live examples.
  4. 4 Phaser with Vite and npm: A Real Project Setup Set up a professional Phaser project with npm and Vite: folder layout, ES modules, scene files, the dev server, TypeScript option and a production build.

Game Loop and Scenes

  1. 5 Phaser Scenes and the Scene Lifecycle Learn how a Phaser scene starts and ends: init, preload, create and update, the scene keys, scene events, shutdown cleanup and how to restart a scene safely.
  2. 6 The Phaser Game Loop and Delta Time Understand the Phaser game loop, update(time, delta), frame-rate independent movement, FPS display, slow motion with time scale and fixed timesteps, with live demos.
  3. 7 Loading Assets in Phaser: Images, Audio, JSON and Textures Learn the Phaser Loader: preload, texture keys, load.image, spritesheet, audio, JSON and atlas, a progress bar, loading errors and drawing textures in code.
  4. 8 Working with Multiple Scenes in Phaser Split a Phaser game into menu, play, HUD and pause scenes. Learn scene.start, launch, pause, resume, stop, passing data, the registry and scene-to-scene events.

Sprites and Animation

  1. 9 Phaser Shapes, Text and Graphics Objects Draw with Phaser game objects: rectangles, circles, stars, lines, the Graphics API, styled and wrapped text, plus the shared properties every game object has.
  2. 10 Phaser Images and Sprites: Origin, Flip, Tint and Depth Learn the difference between Phaser images and sprites and how to position, scale, rotate, flip, tint, crop and layer them, with live examples you can edit.
  3. 11 Phaser Spritesheets and Frame Animation Animate Phaser sprites: spritesheets and atlases, frames, anims.create, generateFrameNumbers, frame rate, repeat, yoyo, animation events and chaining, with live demos.
  4. 12 Phaser Tweens: Easing, Chains, Stagger and Counters Animate any property smoothly with Phaser tweens: duration, easing, delay, yoyo, repeat, callbacks, tweens.chain, stagger and counters, with runnable examples.
  5. 13 Phaser Containers, Groups and Particle Emitters Organize many game objects in Phaser: move them together with containers, manage collections with groups and object pools, and make effects with particle emitters.

Input and Physics

  1. 14 Phaser Keyboard Input: Cursors, WASD, Key Events Handle the keyboard in Phaser: cursor keys, WASD, addKey and addKeys, isDown, JustDown, key events, combos, cooldown shooting and focus tips, with live examples.
  2. 15 Phaser Pointer Input: Mouse, Touch, Drag and Drop Handle mouse and touch in Phaser: pointer events, setInteractive and hit areas, hover, dragging, drop zones, multi-touch, swipes and a drawing demo with live code.
  3. 16 Phaser Arcade Physics Basics: Gravity, Velocity and Bodies Learn Arcade Physics in Phaser: enabling it, bodies, gravity, velocity, acceleration, drag, bounce, world bounds, body size and offset, static bodies and the debug view.
  4. 17 Phaser Collisions, Overlaps and Physics Groups Detect and respond to hits in Phaser Arcade Physics: colliders versus overlaps, callbacks, physics groups, static groups, process callbacks, one-way platforms and pickups.
  5. 18 Phaser Platformer Movement: Running, Jumping, Coyote Time Build responsive platformer movement in Phaser: gravity, running, onFloor jumps, variable jump height, coyote time, jump buffering, one-way platforms and animation states.

Tilemaps and Cameras

  1. 19 Tilemap Basics Build tile-based worlds in Phaser with tilemaps, tilesets and layers. Create a map from an array, read and change tiles, and paint tiles with the mouse.
  2. 20 Maps from the Tiled Editor Design levels in Tiled and load them into Phaser. Learn the Tiled JSON format, tile properties, multiple layers and object layers for spawn points.
  3. 21 Tile Collision and Interactions Make tilemap layers solid in Phaser Arcade Physics. Use setCollision, collision by property, tile callbacks for hazards and pickups, and debug drawing.
  4. 22 Camera Basics Learn how Phaser cameras work. Scroll a large world, follow a player with smoothing and a deadzone, set bounds, zoom, and build parallax and fixed HUD layers.
  5. 23 Camera Effects and Multiple Cameras Add fade, flash, shake, pan and zoom camera effects in Phaser, then use extra cameras for a minimap, a fixed UI layer and split-screen views.

Audio and UI

  1. 24 Audio Basics Play sound effects and music in Phaser. Learn the sound manager, pitch and volume control, audio sprites, mute and the browser autoplay lock.
  2. 25 Text and Buttons Style text in Phaser with fonts, strokes, shadows and word wrap, then build reusable buttons, toggles and sliders with interactive containers.
  3. 26 HUDs, Menus and Pause Screens Build a HUD and menus in Phaser using separate UI scenes: score and health bar, a title menu, pause and resume, and data passing between scenes.

Game Architecture

  1. 27 Scene Architecture Structure a Phaser game with boot, preloader, menu, gameplay and game over scenes. Learn the scene lifecycle, loading bars, cleanup and scene data.
  2. 28 Custom Game Objects and Object Pools Organize Phaser code with custom classes that extend Sprite, give objects their own update logic and states, and reuse bullets with object pools.
  3. 29 Events, Registry and Saving Decouple Phaser code with events, share state across scenes with the registry and data manager, and save progress safely with localStorage.

Packaging and Publishing

  1. 30 Scale Manager and Mobile Make Phaser games fit any screen with the Scale Manager. Compare FIT, ENVELOP and RESIZE modes, handle fullscreen and orientation, and add touch controls.
  2. 31 Vite, TypeScript and Project Structure Set up a real Phaser project with Vite and TypeScript: folder layout, typed scenes and events, a production build and testing game logic.
  3. 32 Optimizing and Publishing Your Game Measure and improve Phaser performance with atlases, batching and pooling, then publish your game to itch.io, static hosts, portals, mobile and desktop.

Projects and Practice

  1. 33 Project: A Platformer Game Build a complete Phaser platformer: a tile level from text, good jump feel, coins, patrolling enemies, spikes, lives, a goal flag and a following camera.
  2. 34 Project: A Space Shooter Build a vertical space shooter in Phaser with bullet pools, enemy waves, particle explosions, power-ups, a starfield, a HUD scene and rising difficulty.
  3. 35 Project: A Memory Match Game Build a memory card game in Phaser with a size menu, grid layout, flip animations, input locking, a timer, a star rating and best scores.
  4. 36 Phaser Practice Challenges Ten Phaser practice challenges with hints and acceptance checks, plus runnable solutions for whack-a-mole and a tilemap treasure explorer.