A collection of concrete examples for various game mechanics, algorithms, and effects. The examples are all implemented in JavaScript using the Phaser game framework, but the concepts and methods are general and can be adapted to any engine. Think of it as pseudocode. Each section contains several different examples that progress in sequence from a very basic implementation to a more advanced implementation. Every example is interactive and responds to keyboard or mouse input (or touch). More...

Follow @yafd on Twitter or John Watson on Google+ for updates.

Questions, corrections, want to hire me? Contact me on Google+ or Twitter or email.

Copyright © 2015 John Watson

The example source code is licensed under the terms of the MIT License. Art assets in the examples are licensed under the Creative Commons Attribution license (CC BY 3.0).

Download all assets

Many more demos are planned. Follow me on Google+ or Twitter for updates.


This site requires a modern web browser that supports HTML5. I recommend Chrome and Firefox.