Adapting the Dungeon Raid engine to create a iOS hit “Dots” prototype

One of the best things you can do when you’re into game design or into programming more in general, is to reuse your code, as much as you can.

Following this rule, today I am going to show you how to make some small changes to the Dungeon Raid HTML5 engine to create a prototype of iOS “Dots” game.


#1 game in 23 countries, the game engine differs from Dungeon Raid prototype for only two reasons:

* You can only select tiles horizontally and vertically, but not diagonally, like I showed you in HTML5 Dungeon Raid tile engine made with Phaser – Part 4.

* You can draw a 2×2 square, in this case all tiles with the same color of the current color will disappear.

Have a look at the prototype:

As usual you can draw to connect at least two orbs with the same color, and if you make a square, all orbs with the same color of the square will disappear, have a look by yourself.

And this is the source code, sorry, still uncommented because I still more than a dozen things to do on it before adding comments, but if you turn your console on you will see e detailed report of what’s going on:

Nex time you will be able to play a fully working version of Dots on your browser, meanwhile download the source code.

  • ozgur

    Thanks for the tutorial and the game cannot handle 3×3 square :)
    Also, still waiting for google adclick

  • Jidé

    There is something called “github” which is great to share code… :p