These days every mobile game hounds you with microtransaction and/or floods you with adverts in an attempt to make a quick buck. I wanted to create something that was simple, addictive and most importantly fun no matter your experience with games

The Premise

Games like Scrabble and Tetris are timeless because of their simplicity: you could give the game to anyone and within five minutes they know exactly what to do. These games are the pinnacle of easy to play but hard to master if you can nail this concept you can have someone who plays Counter Strike play alongside their grandmother with both people enjoying themselves. So, what better way to capture this ethos then to combine these two games – and that is exactly what Word Smash is: Scrabble mixed with Tetris.

Tiles fall from the top of screen and gradual fill up the screen, you must form words to remove the tiles, should the tiles reach the top of the screen it’s game over. A very simple concept, but as said before: hard to master. In order to further entice replayability a leaderboard component was introduced which was hooked up to the Facebook API allowing the player to compare their high score against their friends or the world.

Challenges

A particular challenge in writing the game was how to handle the 250,000+ words that would be recognised, loading a text file into a single variable, while would work was hardly a sustainable way to implement it, especially if more words would be added in at a later date or the game becoming unresponsive on older devices.

The solution to this was to split the words into several variables governed by their first letter. The idea being when the player submits a word we take the first letter and only search the array with that letter, by doing that we essentially cut searching through a 250,000 array down to approximately 9,500 (250,000 / 26), while these numbers are not accurate (as there could be more words that start with the letter T then H which would make some variables larger than others) it demonstrates the concept of breaking the large search volume down into more manageable chunks.

If needed, this method could be taken further by incorporating the second letter of the word into to further shrink the size of the larger chunks. This approach does have drawbacks for such as a larger amount of variables being created but it was very successful for Word Smash, the performance of the game is very strong, even on lower end devices.

Architecture

The game was built using the Unity engine in C# with CWardee providing the graphics and UI. The project was a two part afair: the app itself and the leaderboard. The leaderboard is a RESTful API written with Laravel (with unit testing, but no CI integration as only a single instance would ever be deployed) with the app handling the Facebook integration. Mobile games also have an additional challenge: inconsistent internet access, users may have a connection but upon submitting their high score may go through a tunnel causing them to lose signal. Events like this are taken care of by caching data locally and syncing with the Laravel API when a connection next becomes available.

The game is advert free and requires the bare minimum Facebook privileges to run. It can be downloaded from the Google Play store and the Laravel leaderboard can be viewed on the website.

View on Google Play View website