Jump to content

The Phaser Book of Games


Recommended Posts

Hi all,


Hope you're having a great 2015. Feels kinda like 2014 so far, but hey :)


This post is part announcement, part question / survey. If you're reading this as a link from my tweet and don't have a forum account then feel free to send me comments on twitter.


For a while I've been working on a project that aimed to recreate the coding books of the 80s but for Phaser. In the "olden days" (as my kids like to call it) you'd get a book stuffed full of type-in listings, each one creating a different mini game or example. For example:




This book contained loads of games (of varying quality!) such as this:




(here's a huge list of similar books if you're interested)


I'm not suggesting that books full of code are the way to go any more. It's pointless making you all copy and paste code from a PDF :) But I do think there is still some merit in this approach. So I've been working on the Phaser Book of Games. Here is the 'features list' so far:


  • Full source code to the complete games
  • Professional game graphics and audio
  • The book covers in detail the approach taken when building the game - a guide to the source, how things work and how to expand it yourself
  • Code is broken down into sensible classes and States (no 'single file colossus')
  • Games include boot, loader, menu system and win states
  • Most games will work fine on mobile as well as desktop
  • Includes grunt build scripts
  • Uses latest version of Phaser
  • Code is license free (artwork however is not)


This is where I'd love your feedback please:


How many games would you like to see per book? (and any other comments!)


  1. Maybe 4 games per book and we release new books on a regular basis, each one with 4 different games.
  2. Would you prefer a much smaller approach? I.e. each book contains just 1 single game (or maybe 2?)
  3. Would you prefer more? Maybe 10 games per book and a much bigger book as a result?
  4. Maybe you don't care about the book part explaining the code, and just want more games and less details?


I see these books/games serving 2 purposes: 1) As a teaching aid primarily, but also 2) as blue prints you can use for your own games. Maybe for client projects or your own site. You can't use the graphics we provide, but you can certainly re-skin them easily as needed. There will be no restrictions on that.


If you've any other comments then I'd love to hear them :)


Link to comment
Share on other sites

  • One game per book (why bundle them? I see no downside to single game books if they are digital only)
  • Those games could be bundled later for a bigger, print-worthy book.
  • Detailed explanations why something was done the way it is - maybe even hints on how features could've been implemented differently
  • Maybe book 1 for beginners, 2 for intermediate, 3 for beginners again and so on (no expert books since those probably don't need 'em?).


Also happy new year to you, too! Awesome job you're doing!

Link to comment
Share on other sites

I'm for the one game per book.


Since that's far more easy for release, and use and far more flexible.


Only want to mark that some code is going to be almost identical to all games... and that's a stuff i don't want repeated in every book...

but still if i buy/get one of them maybe it'll be a repetition for good since i don't have to buy/get the first one in order to achieve result.


Beside that, I really like the retro approach.

Link to comment
Share on other sites

The thinking behind bundling multiple games into a single book was to cut down on repetition and increase value (more code for your money?!) - but I guess it won't matter all that much. I can keep it to a minimum.


I like the thought of rating them on complexity too, will definitely do that.


My worry with doing single game books is that with the multi approach you'd get to experience games you may otherwise ignore :) I guess I could do bundle packs of books though, that'd work too.


I'm also tempted to do "Micro Games" - which would be single file complete but minimal games. With those I could easily put a whole load of them into a single book.

Link to comment
Share on other sites

First let me just say, "hell yes", this is a great idea.  So many people, myself included, could have used or could still use more "hand holding" as they explore how to user Phaser.


As for as games per book - one game per book would work out fine, but I think there are two scenarios in which the inclusion of multiple games would be beneficial:


1. Genres of similar games, using multiple games to either show progression of complexity or else explore different but related aspects of creating games for the genre.

2. A "sampler pack" kind of book, were a spectrum of simple games are included, each one representing some basic type of game.

Link to comment
Share on other sites

It's probably worth me detailing some of the games done already:


  • Bomber (arcade, beginner, drop bombs to clear a landing strip)
  • Atoms (puzzle, intermediate, 2 player or vs. AI chain reaction puzzle game)
  • Missile Command (arcade, intermediate, remake of the classic arcade game)
  • Ice Smasher (arcade, intermediate, modern update of arcade game Pengo)
  • Tanx (arcade, beginner, Worms / Gorillas style 2 player game)
  • Fruit Snake (arcade, beginner, like Snake but fully rotation)
  • Sokoban (arcade, beginner, classic puzzle action game)

In development / on the drawing board:

  • Dungeon Crawl (RPG, advanced, Dungeon Master / Eye of Beholder style game)
  • Pipe Mania (action puzzle, intermediate, update of the classic game Pipe Panic)
  • Kids Pack (Matching Pairs, Art Tool, Sliding Puzzle, Jigsaw)
  • Battleships (puzzle, beginner, classic game with enhancements)


I'm also working on "Micro Games" which are single-file, small bite-sized games.


If you've any games you want to see covered then let me know!

Link to comment
Share on other sites

I was about to suggest the Micro Games - i think it could be great to have a larger game and a micro game bundled into one book - or perhaps it would be better to think of it as a sort of magazine? it could include stuff like one-pagers on particular game mechanics or design/art/sound topics too (very short though, otherwise you could just start gamasutra 2 :))

Link to comment
Share on other sites


I'm also tempted to do "Micro Games" - which would be single file complete but minimal games. With those I could easily put a whole load of them into a single book.

Yes, do 20 of them, keep them really, really simple with no dependencies (like grunt).

If they're accessible to a motivated 10-year-old, I think you'd have a winner.


We need contemporary games equivalent the classics in this book:




Most of those games are less than 30 lines of code - and they're the reason why I make games today.

Link to comment
Share on other sites

This is a great idea. I think 4-5 games to a book, all in different genres, would be my suggestion. For games of similar genre or design, I would also suggest perhaps showing different ways of doing similar things (such as one game on a tilemap showing tile-constrained movement and another showing unconstrained movement).


I'm torn on #4, though. While normally I might say the explanations are extremely important to learning how something new works, I know I've learned a lot simply by seeing lots of examples even without explanations. Particularly for the more advanced tutorials, someone might be able to look at the code and learn more by reading the code than by explanations. One extra game might be worth more than than all of the explanations in a book. Probably wiser to just focus on explaining everything for these books, though, even in the advanced ones.

Link to comment
Share on other sites

Other than the quantity of games per book, I think it's important that any book with a collection of games shows progress in methodology from one game to the next. For single game books, it's important that equally as much variety of features is shown as in a book with many games.


So I think two approaches would be good:


"multi book"

many smaller games, each with some key aspect that is unique to it in the scope of the book. each must still play as a game and have a win message.


1) how to loop through all coins to test for collision, and display win when all coins are collected.

2) arcade physics, such as a game of billiards.

3) how to manage position of sprites yourself using object properties without using any Phaser built in methods.

yet another might show detailed use of sprite sheet for different animation states.


"single book"

one game with a fair bit to it with lots of different aspects, and a fair bit of depth, that can be learnt from. 


1) boot, loader, intro, menu, gameplay, logic, collectables, power-ups, enemies, lives, collision detection, level progression, score, win state, game over state.

2) boot, loader, menu, p2 physics, apply forces, collision, add/remove bodies, transition levels, score, lives, apply graphics, debug mode, win state, game over state.


Which... kind of sounds like what you've arrived at anyway?


In particular I'd pay to see a fully-featured Phaser game that uses p2.js


For beginners, the whole grunt workflow is definitely a hurdle that many will give up at.




Link to comment
Share on other sites

I will be really interested by this kind of book. 
I'm a phaser beginner and want to use phaser for the next GlobalGameJam (http://globalgamejam.org/) in end of January.

For me moment I've look at all the exemples on http://examples.phaser.io/ and look for some phaser game with open source code but it's hard to find game with last phaser library, using state, using object and not in "s ingle file colossus" as you say.


When is planned the first release ? 

Link to comment
Share on other sites

I think I'd appreciate 2 or 3 small games, and one bigger game (maybe even stretched over more than one book? I'm not sure if it fits the idea of game books), so I can learn new stuff, get some ideas (from smaller games) but also have this one bigger game explained in more detail, maybe get some glimpses into development process and planning.


To be honest, I'm a beginner and anything Phaser will make me happy :)

Link to comment
Share on other sites

  • 3 weeks later...

I think the most important part is well written/organised code (refactored, commented, ...)

As when I see the examples, I usually see the whole game process propped into one Game.js file, which is fine when it's a small game.


But Javascript is set to be an OOP language. So do keep that in mind and seperate your classes (like Player, World, ...).


Maybe you would be able to add a multiplayer game? using node/socket.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...