Courses / Specialisations & media / JavaScript Game Development with Phaser

₹399Self-paced

JavaScript Game Development with Phaser

Build a playable Phaser browser game with deterministic game logic, responsive scaling and tests.

  • Who it's for. JavaScript programmers who can write modules and simple tests and want to make 2D browser games.
  • Before you start. Prerequisite courses: JavaScript Programming, Mathematics for Programmers: Discrete and Applied Foundations.
  • 28 to 48 hours of study with practice
  • 8 modules, 48 lessons
  • 3 guided projects and a final project

What you'll learn

  • Boot a Phaser game, control scene order, restarts and cleanup, and move objects independent of frame rate
  • Turn keyboard, pointer, touch and gamepad input into tested movement actions
  • Keep rules in plain tested modules with state flow, pooling and safe persistence
  • Add audio under autoplay rules, HUD, accessible buttons and a pause overlay
  • Test, build, budget and observe the game for leaks

Skills you'll gain

  • Scene lifecycle
  • Sprites
  • assets
  • Input
  • movement
  • Physics
  • State
  • scoring
  • Audio
  • Responsive scaling
  • Game tests
  • build

Tools you'll use

  • Phaser (proposed 4.2.1)
  • JavaScript
  • Vite
  • Node.js
  • node:test
  • Headless Chromium

Details to know

  • Certificate on completionIssued after your final project is reviewed
  • 8 module checkpointsA quiz and a practical task close each module
  • Self-pacedStudy any time; your progress is saved

How every lesson works

Each lesson follows the same four steps, so you always know what comes next.

  1. 01

    Watch & Learn

    A short animated video explains one idea at a time.

  2. 02

    Guided Practice

    Work through an example step by step and check the result.

  3. 03

    Quiz & Challenge

    Short questions check the idea has landed before you move on.

  4. 04

    Mini Project

    Build something useful from a project brief.

Learn at your own pace

This is a self-paced course. There are no live classes and no fixed timetable.

  • Start any timeStudy when it suits you. Lessons are short, so they fit around work or college.
  • Pick up where you left offYour progress is saved to your account.
  • Ask when you're stuckUse Ask Mentor inside the learning platform.

Your path in 3 phases

Each phase ends with something you have built and checked.

  1. 01

    Modules 1 to 3

    Scene lifecycle to Input and movement

    Boot a Phaser game from a config object and control what runs when: init, preload, create, update, scene start/stop/pause/sleep and cleanup.

    You build: Guided project “Controllable character across two scenes”: A scene logging its lifecycle order with delta-based movement and a tested moveBy function.

  2. 02

    Modules 4 to 5

    Physics to State and scoring

    Use Arcade Physics bodies, gravity, colliders and overlaps, hitboxes, bounce and world bounds, and step the physics world deterministically for checks.

    You build: Guided project “Physics level with scoring and persistence”: A level with gravity, scaled static platforms refreshed to match their art.

  3. 03

    Modules 6 to 8

    Audio and UI to Game tests and build

    Play sound under browser autoplay rules, control volume and mute, build a readable HUD and accessible buttons, and layer a pause menu over the game.

    You build: Guided project “Responsive, tested and shippable build”: Audio that starts after the first input and persists mute and volume.

Full curriculum

8 modules and 48 lessons, 28 to 48 hours of study

01Scene lifecycle6 lessons, 3 to 4 hours

Lessons

  • Boot a game from a config object
  • Follow init, preload and create in order
  • Move by delta time in update
  • Start and restart scenes with data
  • Pause, sleep and launch scenes in parallel
  • Clean up listeners and timers on shutdown

After this module you can

  • Create a Phaser.Game from a config with type, width, height and a scenes array, and read the resulting canvas size and active scene key.
  • Predict and verify the order in which init, preload, create and the first update calls run, and which data each receives.
  • Register a scene event with once or off, remove it on the shutdown event, and show a restart does not stack duplicate handlers.
02Sprites and assets6 lessons, 3 to 4 hours

Lessons

  • Load an image and use its texture key
  • Slice a spritesheet by frame size
  • Use a texture atlas with named frames
  • Define and play a frame animation
  • Position with origin, scale, flip and depth
  • Show loading progress and survive missing files

After this module you can

  • Queue an image with this.load.image, create it in create with this.add.image, and explain what happens when the key is misspelled.
  • Load a spritesheet with frameWidth and frameHeight, show a specific frame by index, and compute the frame count from the image dimensions.
  • Display a progress bar from the loader's progress event, handle loaderror for a missing file, and move on only when load completes.
03Input and movement6 lessons, 3 to 4 hours

Lessons

  • Poll cursor keys and normalise diagonal speed
  • React once to a key press with events
  • Respond to pointer clicks and taps
  • Build touch controls and handle multi-touch
  • Tune acceleration, drag and maximum speed
  • Map inputs to actions behind one interface

After this module you can

  • Read createCursorKeys in update, build a velocity vector, and normalise it so diagonal movement is not faster than straight movement.
  • Use keydown events (for example keydown-SPACE) to trigger a one-shot action and contrast it with polling isDown that repeats every frame.
  • Collapse keyboard, touch and gamepad inputs into a single action object {moveX, moveY, jump} that game logic reads, and unit test the mapping.
04Physics6 lessons, 3 to 4 hours

Lessons

  • Add an Arcade body with gravity and velocity
  • Make static platforms with refreshBody
  • Separate collide from overlap and write callbacks
  • Shape hitboxes with setSize and setOffset
  • Bounce off world bounds and walls
  • Step the physics world deterministically

After this module you can

  • Enable Arcade Physics in the config, create a sprite with a dynamic body, and read its position after a known number of steps under gravity.
  • Create static bodies for ground and platforms, scale or move them, and call refreshBody so the collision box matches the visual.
  • Advance the Arcade world with a fixed step manually and verify body positions after N steps give the same result on every run.
05State and scoring6 lessons, 3 to 4 hours

Lessons

  • Hold game rules in a state module without Phaser
  • Share state across scenes with the registry
  • Run timers and cooldowns by game time
  • Model menu, play, win and lose as a state machine
  • Spawn and recycle objects with a group pool
  • Persist a high score safely

After this module you can

  • Move score, lives and level rules into a plain module with pure functions, and have the scene call them rather than own the numbers.
  • Store score in the game registry, listen for changedata events in a HUD scene, and show the HUD updating from another scene's change.
  • Save and load a high score as versioned JSON in localStorage with try/catch and validation, and fall back to zero when data is missing or corrupt.
06Audio and UI6 lessons, 3 to 4 hours

Lessons

  • Play sound after the browser unlocks audio
  • Choose sound.add or sound.play and avoid overlaps
  • Control volume and mute, and remember the setting
  • Draw a HUD that updates only when values change
  • Build accessible buttons with states
  • Layer a pause menu scene over the game

After this module you can

  • Load audio, check the sound manager's locked state, and start music only after the first user input.
  • Use sound.add for reusable instances you can stop or pause, and sound.play for fire-and-forget effects, and prevent the same effect stacking into noise.
  • Open a pause scene with launch, pause the base, close it with resume and stop, and prove the base state is unchanged across the cycle.
07Responsive scaling6 lessons, 3 to 4 hours

Lessons

  • Compare FIT, ENVELOP and RESIZE scale modes
  • Centre the canvas in a parent with limits
  • Lay out objects from the game size, not from constants
  • Re-layout on the resize event
  • Map pointer coordinates correctly under scaling
  • Handle orientation and fullscreen requests

After this module you can

  • Configure scale.mode and predict the displayed canvas size and any uncovered or cropped area for a given parent size.
  • Set parent, autoCenter, min and max so the canvas sits centred and never grows beyond a given size.
  • Detect portrait vs landscape from the game size, switch layout variants, and request fullscreen from a user gesture.
08Game tests and build6 lessons, 3 to 4 hours

Lessons

  • Unit test pure game rules with node:test
  • Seed randomness for repeatable runs
  • Assert scene state with scripted stepping
  • Check physics outcomes with body positions
  • Build a production bundle with a size budget
  • Observe frame time and memory across restarts

After this module you can

  • Write node:test cases for a rules module covering normal, boundary and invalid inputs, and run them with the node --test command.
  • Replace Math.random in game logic with a seeded generator so spawn sequences repeat for a given seed and differ for a different one.
  • Record frame time and object counts over a fixed run, restart the scene repeatedly, and show object counts return to baseline.

What you'll build

3 guided projects along the way, then a final project.

  • Controllable character across two scenes

    after module 3
  • Physics level with scoring and persistence

    after module 5
  • Responsive, tested and shippable build

    after module 8

Final project

Playable Phaser game with deterministic logic and responsive controls. Choose one option: Top-down collector; Side-view platformer level; Arcade dodger with waves.

What you submit

Source and asset submission with a README listing the pinned Phaser and Node versions and licence notes for every asset.

How it's reviewed

Trainer review against the rubric: Rubric (proposal): rules separated from scenes and tested (25%) deterministic checks present and meaningful (20%) controls and responsive scaling work on keyboard and touch (20%) physics and state flow correct (15%).

Where you'll use it

  • Build a small browser game for a campaign or learning site that scales from phone to desktop.
  • Test scoring and spawn logic with seeded inputs so bugs can be reproduced.

Roles that use these skills

  • Game developer
  • Front-end developer
  • HTML5 game developer

Earn the certificate by building, not watching

  1. Complete the lessons and pass each module checkpoint.
  2. Build your final project and demonstrate it.
  3. OUTLEARN reviews your project and issues your certificate. It is not issued automatically.

Frequently asked questions

What do I need before I start?

Prerequisite courses: JavaScript Programming, Mathematics for Programmers: Discrete and Applied Foundations. Learners should be able to write and run JavaScript with functions, objects, arrays, ES modules and simple tests (JavaScript Programming, or an equivalent: write a function that filters an array of objects, export it from a module and run it with node). Basic vectors, coordinates and the idea of speed = distance / time come from Mathematics for Programmers, or equivalent. Diagnostic check: given a function moveBy(pos, speed, seconds) and a failing test, can the learner read the assertion failure, edit the function and rerun npm test? If not, review the earlier course modules on functions and tests first. No prior game or Phaser experience is assumed.

Do I get a certificate?

We do not issue certificates until you successfully build and demonstrate your live project. Module and final assessments are planned; the module pass rule is proposed, not final. Certificates are issued by OUTLEARN staff; nothing is issued automatically.

Where do the labs run?

Trusted-author workstation: Node.js LTS, Vite, phaser pinned, desktop Chromium; node:test for pure logic; headless Chromium with the HEADLESS renderer type and manual stepping for scene and physics checks. No LMS runner for games exists and none is promised; learner execution inside the LMS needs a separately reviewed sandbox decision.

Be first in when JavaScript Game Development with Phaser opens

Email us and we will tell you as soon as enrolment opens.

Notify me when it opens
₹399Opens soon
Notify me