It’s no secret to those who know us, my wife and I love games. We own a large collection of board games and frequently host game nights for our friends. We like all genres of games, from deep strategy, to light party games and everything in between. In most games we are pretty evenly matched. I am sure a large enough sample size of our gaming history would put us pretty close to a 50:50 split. There is however; one category of game that skews wildly in her favor. Word games…
My wife loves word games, and she is very good at them. Me on the other hand, not so much. Scrabble, boggle, wordle, bananagrams, I am outclassed 90% of the time. So when I decided to make something personal to give my wife for her birthday (and maybe tackle a new development project at the same time) I figured making her a word game would be a great idea!
But what kind of word game? I wanted something quick and simple that could be played any time she had a spare minute, but with enough depth to keep her engaged on the couch on a Sunday afternoon. I decided on a simple anagram style game. Given a series of letters, find as many English words as possible that can be made from them. Add a 1 minute timer for a little pressure, and a score multiplier to incentivize careful guesses and “Brianneagram” was born.
From a technical perspective, the game runs as a simple Angular web application. It leverages a local dictionary file with more than 370,000 words to validate guesses. The puzzle is made by randomly selecting a 7 and an 8 letter word from the dictionary and shuffling the letters together, so there is always guaranteed to be, at absolute minimum, 2 valid guesses per puzzle. I use a looping 1 second interval to create a countdown timer, and add player guesses to a list to check for repeats and increment a score multiplier.
Once I had the base framework of my angular app laid out, adding the bindings followed suit quickly. This project is by no means pushing the limits of Angular, but it was certainly fun to play around and learn the basics. Typescript is a language I am only somewhat familiar with, so I was learning on multiple levels at once.
Arguably my favorite part of the project was putting together an Azure DevOps pipeline for the automated deployments of the web app. I wanted the game to be playable on a mobile device, and rather than set up an emulator, deploying the code and testing it on my own iPhone and Android tablet was my go to strategy. Having an automated pipeline for these deploys saved me a huge amount of time in making changes and testing bug fixes.
In addition to the pipeline, I made some Bicep templates for the Azure resources that back the web app (a simple storage account with static web hosting and a CDN endpoint for caching and SSL termination). Why automate only half a project right?
All in all, this was a small project, but definitely a fun one. I learned a lot in a number of areas and tried my hand at a handful of new languages, tools and frameworks. I hope my wife has half as much fun playing the game as I did making it.
You must be logged in to post a comment.