Ashley’s Tiles using Phaser
I created the game based on the concept set out here, and the storyboard here. I used Phaser, an extremely popular “desktop and mobile HTML5 game framework”. I highly recommend it. I could have used just HTML, JavaScript and CSS but it did end up saving me time in the long run. I really didn’t use it to it’s full potential, as my game was so simple and didn’t require using many of Phaser’s amazing features, but nevertheless it will definitely be a go-to framework next time I want to create a game.
The trickiest bit was writing the checks for the tile matches. To recap, once all the tiles have moved, the aim was to check if there were any matches of three tiles or more (not diagonally, but they didn’t have to be in straight lines as ‘L’ shapes are permitted). For a long time this function would cause the game to error. It turns out, the tiles were being checked before the animation was complete, and so empty tiles were being checked and causing a mess. Once the problem was identified, it was an easy fix.
I’ve put the game up on GitHub.
Ashley’s Tiles – feel free to let me know what you think.