HTML5 Knightfall game engine powered by Phaser – Adding the player and the key to unlock the door

If you liked the rotating SameGame engine that I used to build the HTML5 Knightfall game engine powered by Phaser, you will be happy to see this new step in the series, as we are going to add the knight (the player itself), a locked door, a key to unlock the door and the unlocked door to escape.

Look:

Playing using SameGame rules, removing tiles and rotating the field, you have to collect the key making the knight be right above it. Then the door will unlock, and you’ll have to reach the door in the same way, making the knight be right above it.

The source code starts to be huge for a tutorial, and while it’s still commented, it really needs a better explanation so I think I will make a minibook deeply explaining how to create a complete game like this.

Anyway, the source code is fully commented:

You can also download the source code and play with it.

  • Mikael

    You sure have a lot of nice examples!

    What is the license on the code?

    • Emanuele Feronato

      you can use it as you want, just remember me if you become billionaire thanks to my code.

  • As always … nice tutorial!.
    This week i made a 2 hours presentation about Phaser @ university of salerno.
    Reference to your website is in the resource slide. ;)
    http://www.slideshare.net/lucutus/introduction-to-phaserjs-69652546

    • Emanuele Feronato

      thank you!!!