worDraw – a word link project

One source of ideas and inspiration when it comes to thinking of new programs for my classes has been my 7 year old daughter. We both love word based puzzles, crosswords, riddles etc so we often come up with random games to play. In India we have this popular singing marathon game called Antakshari where teams need to sing a new song which starts with the last letter of their opponent’s song. Perhaps using that approach, and Wordle, as an influence, my daughter and I play this word linking game where we need to come up with words of a certain length. The catch is – each new word should start with the letter the previous word ended with. Each word can be used only once.

With summer break here and both of us needing to find new projects to collaborate on (me more than her!) I drummed up this little project. The base requirements were these:

  • Some sort of GUI app or text based program which only works with 5 letter words.
  • The initial version will be single player vs the computer.
  • Every time a word is used – either by computer or by user – it should be removed from the base list.
  • Refreshing the app will allow you to restart the game hence reloading all the words.
  • Audio based feedback useful since it allows for more clarity on what the player should do next.

The design plan

I considered Python as the obvious first choice (I may still get my Computing students to build different versions of this next term) but since the target user in this use case was my daughter, I went with App Lab since it is easy and quick to build something like this. To engage my daughter into the proceedings I let her design the backdrop of it. I had made it clear that limited real estate for the design meant she had to be smart in how she used the given space. So we used my new Rocketbook Fusion (I loved how this integration fell into place!) for her to make her artwork. We then scanned that artwork in so I could embed parts of it within the layout.

The final design

The design that my daughter liked in the end was what is shown below.

Working with my daughter, we worked on a layout that could be easy to use within the limited real estate. We used her design as the background for the app and in the remaining space we made place holders for the following elements:

  • Computer generated word.
  • User input based word.
  • Guidance on the next letter user should build a word on.
  • A small logo for our little game.
  • Audio feedback (you can listen to this once you run the program) that helps user make the right decisions.

The data

Next, I needed a giant data set of 5 letter words. I managed to find one on GitHub which I downloaded and imported into App Lab as a data table.

The Logic

The first step in this was loading up the above data table into a words array. This would ensure apt processing of all the words as the game unfolded. To do this, I used the following logic.

Next I built the logic of what should happen when the Submit button is pressed by user. 3 possible conditions were looked at:

  • If the user entered the wrong sequenced word that does not match the link condition.
  • If the user entered a word that matched and was correct.
  • If the user entered a word that matched but had already been used (hence deleted).

Finally, the most important part. The process for the computer to randomly pick a new word that matches the game condition. This is a custom function I wrote and is called from line 30.

To make this app more meaningful to her, I also added a little code which opens up dictionary.com and tries looking up the meaning for the word the computer drew.

The final product

The app turned out pretty great! My daughter continues to test it out and is managing to learn new words in the process. Being able to click on the word the computer is generating means she can look up the word’s formal definition on dictionary.com.

We are thinking of ways to convert this into a 2 player game – which both of us can play. So shall blog about worDraw v2.0 once we complete it!

You may try this app out at the link here.

Highlights and takeaways

  • App Lab’s visual interface made it easy for my daughter to remain invested in this little project. She was able to appreciate the effort needed to make good use of all the space available within a phone’s layout.
  • The ability to integrate the app with her hand drawn artwork made this a personal project for her. She loved being able to see her illustrations clearly displayed without losing out on what the game was all about.
  • The cross curricular nature of this project – a theme close to my heart – where it combines literacy, reading comprehension, art and computing, allowed her to reflect upon how coding as a skill isn’t just about the complex stuff. A simple game we sort of made up could also be converted into a fun little app.
  • Overall a fun experience and a good way to keep her creatively occupied during the holidays! I look forward to more such collaborative efforts with her in coming time.