HTML5 Prototype of the Iromeku game engine made with Phaser

A couple of years ago I showed you an AS3 prototype of the Iromeku game engine.

In the original game you have a game panel of a few colored squares and, using color affecting tiles, your objective is to change your panel to match that of the target.

The whole development theory and process is explained in the original post, so let’s jump straight to the point and see what you are going to do using Phaser framework in less than 50 lines of code:

Dragging tiles you will change tile values, according to this rule: tile value is given by its initial value plus the sum of all tiles above it. Playing with overlaps you can get some interesting cascade sequence of numbers.

Here is the script:

It could be optmized above all in update function since it constantly updates tile values even when there’s no user input. Working on drag events you can update tile values only when a tile is actually moved.

I should have done it but I wanted to keep the code under 50 lines to show you how easy is to do this kind of stuff with Phaser.

Download the source code and if you optimize it in any way, send me your work and I’ll be happy to publish in the blog.