HTML5 Knightfall game engine powered by Phaser

Knightfall is a Flash game made in 2009 mixing SameGame game design with the ability of rotate the game field as seen in the post HTML5 Bejeweled engine + Phaser array utilities = rotating bejeweled.

We are going to create the same engine starting from the HTML5 Endless SameGame engine with object pooling made with Phaser.

This is what we are going to do:

The game field reacts with the same rules as seen in SameGame engine, while the buttons below will make the game field rotate.

I commented each line of the source code, which has absolutely nothing new and if you are a long term reader you will find the code familiar.

I am using a mask to prevent falling blocks to be seen outside the game field. Such mask is then temporarily removed when it’s time to rotate the game field.

Have a look at the source code:

And you can also download the source code of the entire project. Have fun with it.