A cute robot coding at an old-fashioned computer terminal. AI code generation is great for making language games!

AI for Language Games : We’re All Developers, Now!

I’ve been developing games for language learners for over two decades now. Learning those programming skills was a labour of love, started when I was still a classroom teacher. Honing my own coding skills took years of practice. But now, thanks to ever-improving generative AI models, you can skip that step.

All it takes to create interactive language games is a good set of prompts!

Generative AI is an uncanny fit for language learners and teachers, who quickly realised how useful it could be for authentic(ish) text creation. But it doesn’t have to be static. By specifying the kind of features you want in a prompt, you can come up with great self-contained digital ‘worksheets’ with self-marking activities.

It’s possible to go well beyond this – into actual interactive gaming. Today’s generation of AI platforms are capable of taking your brief, then coding it up efficiently and intelligently as a working game, without any further input from you.

Now, if you can imagine it, you can make it.

Language Tetris

Let’s take a classic gaming example: a version of Tetris with a language learning twist. Blocks fall from the top of the screen, labelled with a word in either German or English. Students must manoeuvre the blocks with the arrow keys in order to land German-English equivalents together, whereupon they pop and disappear from the stack. The game speeds up as students progress; the aim is to prevent the blocks from stacking to the top for as long as possible.

It’s fun, and fantastic for improving recall with a set of vocab items.

An AI-generated interactive language learning game. Blocks fall from the top of the screen - the student must match them and avoid them piling to the top.

An AI-generated interactive language learning game. Blocks fall from the top of the screen – the student must match them and avoid them piling to the top. (Pictured is a ‘boom’ block that gives the students a lifeline!)

You can play a working version of it here, and you’ll see what I mean: it’s fun, it gets quite fast and furious, and it does a great job of drilling words. It may not look particularly pretty in its current state, but it’s completely playable; with a bit of visual sprucing, it wouldn’t look out of place on any language learning website.

It’s the kind of thing that would make a nice intermediate coding challenge for someone learning web app development. Maybe a weekend project, or something to do across a series of evenings.

But it took just a few minutes with ChatGPT.

Prompting for Language Games

Here’s the prompt I used for the initial version (and you’ll see some similarities with the interactive worksheet prompt, too):

Let’s create a language learning game in JavaScript, completely self-contained on a single HTML page. It will be like Tetris, adapted for language learning as follows:
– blocks will have either a German or an English word on them from a pot of ten vocabulary items on the topic ‘Clothing’
– blocks will descend from the top of the screen
– as they fall, students use the left, right and down arrows to manoeuvre the blocks before they land
– if a matching German block and English block touch (above, below or to the side), they go POP and disappear – and the game speeds up slightly
– ensure that ‘gravity’ is respected, so if there are blocks above one that ‘pops’, they fall into place accordingly
– the aim is to avoid the blocks stacking up to the top
– every few blocks (maybe every 5-10 at random), a ‘boom’ block falls that ‘pops’ every block it touches on landing (just to clear the space and make it a bit easier)

If you pop this into Claude Sonnet 3.5 right now – as long as you have Artifacts turned on – you should be able to play what comes up straight away. If you’re using ChatGPT or another platform, there’s an extra (easy-ish) step to do before you can play: you just need to save your code in some text editor as an HTML file.

Code output from a prompt in ChatGPT

Code output from a prompt in ChatGPT

Live Preview – Without Claude’s Artifacts

In fact, one free editor for coding – Phoenix Code – also shows you a live preview of the page working as you paste the code in, Claude Artifacts-style. If you really get into language games generation with AI, it’s well worth a download.

Using Phoenix to save and preview AI-generated language games

Using Phoenix Code to save and preview AI-generated language games

One important caveat: your game may well not be perfect on the first go. It might have a bug or two – AI might have missed the point occasionally. My initial version of Language Tetris, for example, allowed students to move the block across existing columns, unlike in the classic game.

But by prompting and re-prompting, requesting tweaks and changes as you go along, you can produce some amazing results. Change the styling, add features, include fiendish rules of play.

The sky’s the limit.

Pulling It All Together

Once you’re done with one game, it can serve as a template for others. It’s usually clear in the code where to change the vocabulary items to something else. Just change, Save As… a new filename, and build up a library of topical games.

A snippet of code produced by ChatGPT

It’s usually clear from a glance at the code where you can change the vocabulary.

In terms of styling, these games do tend to be graphically quite simple. That said, you can easily prompt for more visually appealing elements. And why not use a AI image generation tool like Bing to make some more attractive graphics to integrate into your creations?

Finally, you might be wondering if educational games developers like me are feeling a bit… well, put out by all this. My answer is a resounding not at all! If anything, AI code generation is a brilliant proof-of-concept, prototyping tool to try out new gaming ideas before setting fingers to keyboard. It’s incredibly useful to test if something will really work before pouring hours into coding it.

And of course, you can pick up with your own skills where AI leaves off, to create something even more special with that irreplaceable human touch.

Have you been using AI as your own coding assistant? Let us know in the comments what you’ve been creating together!

Searching by tag in Anki

Playing Anki Tag : From Plain Lists to Topic-Based Fun

Anki users, do you tag your cards?

If the answer is no, then perhaps you should think about adding this natty little superpower to your vocab decks. It’s not only a good habit, but it can turn plain old Anki lists into fun, interactive games like this. How? Read on!

Topical Application

To start with, tagging cards with keywords for topic names like colours, animals, or food, or parts of speech like verb, or noun, gives your data greater searchability. In the Anki browse window, you can then filter on these keywords using the tag: notation.

Straight away, this opens up the possibility to conduct a quick and easy language audit. For example, searching on tag:colours quickly shows if there are any gaps in your linguistic colour palette that need filling.

Filtering your vocab cards by tag in Anki.

Filtering your vocab cards by tag in Anki.

Now, wouldn’t it be nice if you could also test yourself specifically on those queries? Say, pull up all of your food and drink words and blitz them for a bit of extra practice?

Unfortunately, you can’t do that straight out of the box. Anki doesn’t provide a way to create a new or virtual vocab deck by tag. But you can easily export them to make thematic test-yourself activities on other platforms.

Playing Tag with Anki

It’s actually pretty simple to get sets of data out of Anki by tag. In the Browse window of the desktop app, start by tapping out a tag: query on your data as above. Then, highlight all of the matching entries that appear in the list (clicking on one entry and then hitting CTRL + A is the fastest way for me).

Selecting notes by tag in Anki

Selecting notes by tag in Anki

Next, head up to Notes in the menu, and select the Export Notes option.

Exporting selected notes in Anki

Exporting selected notes in Anki

As we’ll be using this data on any number of different platforms, simplicity is the order of the day. For that reason, Notes in Plain Text is the best format to choose for our data. Selected Notes should already be the active choice in the Include dropdown. Make sure to untick Include tags and Include HTML and media references to keep the data as plain as possible. Then, tap the Export button.

Exporting selected notes in Anki

Exporting selected notes in Anki

The result should be a .txt file containing a neatly formatted list of your thematic word list. Magic!

From Anki to Beyond

Now you’re ready to drop that into other edu-game services that have an import feature. Educandy and Quizlet are amongst the easiest, and a good place to start. With Educandy, you can simply upload the .txt file directly, and it handles the rest. With Quizlet, you have to open the .txt file, copy the text and paste it into a little box, but it’s still nice and simple.

Now, you have a whole suite of games you can play that focus entirely on your chosen topic. A brilliant way to granulate your Anki practice a bit – or simply create games for your friends (or students) to learn from too.

Anki vocabulary items imported into an Educandy game

Anki vocabulary items imported into an Educandy game

 

Anki vocabulary items imported into a Quizlet game

Anki vocabulary items imported into a Quizlet game

Sometimes you may need to do a little extra work on the other end. In Quizlet, for example, I needed to reverse the order of columns from term-description to description-term as the site default didn’t match my list. Fortunately, that’s just a single button-click on that platform. Phew!

Tag Tips

Anki tagging isn’t perfect, it must be said. Even the most avid taggers will point out that the app’s default tag management features are a bit basic. For some extra control over them, it’s well worth installing the free Search and Replace Tags add-on. There is also the premium add-on BetterTags, which adds some serious extreme tagging power to your app.

Both utilities are incredibly helpful if you end up with near-duplicate or misspelt tags to tidy up. For instance, I realised I had tagged cards variously as ‘animal’ and ‘animals’ over time. Easy to do if you add cards in tranches regularly, rather than all at once. But a nightmare if you are searching for the topic ‘animal’ and only half of your cards appear.

No problem: the two tags combined like a treat with the Search and Replace add-on.

Whether you’re brand new to tagging or have been tagging like a pro for years, it pays dividends to explore these import-export options with other sites. A bit of variety is never a bad thing!

Meet you teachers over a coffee or three!

From iTalki to real life: meeting your online teachers

Language lessons via Skype have been an important learning method of mine for some time now. Thanks to sites like iTalki, learners can now connect with teachers across the globe.

But however much experience you have with online classes, there might always remain a certain element of the unreal. It’s understandable; you only see your teachers for around an hour at a time, and under controlled and limited circumstances. It’s sometimes easy to forget that they are actually out there too, in the real world.

Breaking through the invisible wall

Over the last week, I had the chance to remedy that with a couple of my iTalki teachers. It was all lucky circumstance, really. Through regular lesson chat, it transpired that I would cross paths with my Icelandic and Polish tutors. What else to do but arrange coffee and cake (as if any excuse were needed!)?

Now, for a naturally shy language learner, meeting your online tutors can feel like a rather big step. There is something very safe and non-threatening about learning via video chat – the digital platform contains the teacher-pupil relationship quite neatly. On the other hand, out in the wild of real life, we lack those digital boundaries – the nature of greetings, niceties and farewells is quite different.

Performance pressure (with get-out clauses!)

Not only that, but there is also just a little performance pressure! In my case, Polish was a particular source of this, being a fair bit weaker than my Icelandic. Combined with a bit of social anxiety, the stress we put ourselves under to do well can jam up the brain somewhat. I am a perfectionist, after all (but I’m working on that!).

Thankfully, being a fellow polyglot, my Polish tutor chatted quite happily to me in both German and Spanish as well, providing a nice way out of my clumsy polski when needed. And that is one of the perks of meeting teachers who are, in all likelihood, fellow language enthusiasts – it becomes a bit of a meeting of minds, with more than enough common ground to talk about (in the target language or not!).

That said, it’s also important to note that these kinds of meet-up are not lessons in themselves. They should be an informal hello, rather than any test of your ability. In other words, it is all about putting a three-dimensional, human face to the digital presence from my hour once a week or fortnight. That can only help to create greater rapport. And ultimately, that should lead to more lively lessons, with more to talk about.

Chocolate perks

All in all, I had two very positive experiences with two lovely people. Affirming a distance connection face to face also makes the world seem a smaller, friendlier place. If you have the chance to meet your online tutors face to face, go for it! You might even be regaled with chocolate (dziękuję, Jan!)…

Polski torcik from my Polish teacher!

Yum…