Demo game for phaser.js tutorial
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


The commits in this repo go step by step through the process of building a polished space shooter game with the Phaser.js HTML5 game framework.


You can follow through a written tutorial of this game with more commentary at on my blog.


Very brief introduction to game dev concepts

Games are all about interactivity. A game is an experience that unfolds over time through a collaboration between the game creator(s) and the player.

3 facets to game design

  1. Production values - graphics, sounds, special effects, polish
  2. Content - story, theme, concept, characters, artwork
  3. Gameplay - mechanics, challenge, pacing, fun, controls, "feel"

4 basic parts of game dev

  1. Game loop - means to change and display state over time (usually for animation (at 60fps) but could be turn based)
  2. Input - get input from the player (otherwise it is a simulation, not a game)
  3. Update - change the game state based on internal logic and values and responding to player input
  4. Render - redraw the visual representation of the game state at that time



Game assets:

Additional topics not covered

  • Best practices for more maintainable code and smaller files
    • Modular development (commonJS, etc)
    • Custom classes inheriting from phaser classes
    • Build tools (browserify, gulp, etc)
    • yoaman for scaffolding
  • Scaling modes
  • Optimization / profiling / debugging / testing
  • Mobile
  • Wrapping for native (CocoonJS, Cordova/PhoneGap)
  • Communicating with server / multiplayer
  • Tilemaps and other game types
  • Marketing / distribution / monetization / 3rd party APIs