moscardino.net

LexiTiles

A word game for iOS and Android.

Update: LexiTiles is pretty much gone. I have no real incentive to keep up the app and don’t want to keep paying the developer fees to Apple. It may come back at some point.

About a year ago, I had some trouble sleeping and thought of a game. I opened Evernote and typed up the idea:

  • Like boggle
  • App generates game board randomly. 5x5 grid. Letters should not appear more than twice on board.
  • Player picks words, adds to list. 60 second to come up with as many words as possible.
  • Cannot use letters multiple times in a word
  • Score after timer. Server maybe? Uses scrabble dictionary for word approval. Uses scrabble letter values for points. Negative for wrong words. Bonuses for number of words.

So what did I end up with? LexiTiles! It’s a fun word game. You use the letters to make as many words as you can in 60 seconds. The only real difference from my late-night thoughts above is that I eventually added a word-length multiplier: each word gets scored then the score gets multiplied by the numbers of letters in the word, highly rewarding longer words.

Developing

The next day, I wrote the game. I had been using Ionic Framework at work for a few weeks beforehand and saw this as a good opportunity to learn some more about it.

Before I continue, let me just say how much I love Ionic. I’m a web developer, and it lets me develop “native” apps with the web languages I love to use. If you haven’t tried it, I highly encourage you to give it a shot.

The core of the game was written that weekend and hasn’t changed a lot since. I revised the UI from that starting point, and bug-fixed and polished for months in my spare time.

There were two main challenges I ran into when building it: the scoring and building for Android.

Scoring words is easy: breaking into letters, assigning each letter a point value, and summing the points. The difficult part was determining if the word submitted is actually a word. After a little research, I found the English Open Word List, transformed it into a JavaScript file where each letter would be an array on a main object. Finding a word is as easy as picking the right array and doing an indexOf on it. I did consider using some sort of REST API to score, but I didn’t want a server component or to require an internet connection. Also, despite the file being over 2mb, it loads from disk and searching for a word is surprisingly quick.

Update: Sorry the link to the EOWL is dead. I have no replacement.

Building for Android was the other main challenge. Actually building the app was pretty straightforward (thanks Ionic!), but testing and getting screenshots without an actual device was terrible. I won’t go into it, but I hate the Android Emulator. I’m considering picking up a cheap device for testing just to avoid having to use it ever again.

Publishing the app to the App Store and the Play Store was kind of frustrating. Setting up developer accounts, merchant accounts, getting screenshots, and more. There’s a lot more to do to get an app ready than you would expect.

Future

I don’t have a lot of spare time, but I do have a couple of ideas for how to improve the game. Sharing was the first major update after release (try it out sometime), and I want to put out a 2.0 at some point. I know I want to add a dark mode, and maybe a challenge mode where I replace the timer with a max-number of words.