Monday, August 8, 2022

I'm using Midjourney to create reward images for my word game Xordle

TL;DR 
 
Earlier this month, I wrote a new feature for Xordle, where each daily puzzle is now associated with a unique image related to that puzzle. It's presented as a reward to the player upon completion. These images are generated using the Midjourney bot and I was able to generate over 150 images in a few short days, working with the bot during my normal gaming hours at night. This post details the path that lead to this feature, with some example output at the bottom.

Background

Some months ago, on a whim, I created a Wordle variant called Xordle. You solve two Wordle puzzles on the same board, and you don't know which word your clues are tied to. The two target words don't have any letters in common, so you know that each clue you get is exclusively is for one word or the other, but not both. (Yes, the game is based on a programming pun for XOR.) For reference, below is a solved Xordle board with one guess to spare.

Mostly I just wanted to see if it was any fun; it was, and unexpectedly, the site became fairly popular. Before continuing: this post will have spoilers for past daily xordle puzzles. The site lets you play all the old puzzles; if you don't want to be spoiled, now's the time to stop reading. 

Early on, the daily puzzle was random and one of the answers was not to my taste: NANCY. It's either a proper name or a slur, neither of which I want as a puzzle answer. At that point I started curating the daily puzzles and updating the possible answer list.

Themed Days

Fairly soon after that, I decided to occasionally design some of the puzzles outright. The game starts players out with a first guess (so there's no optimal first guess; you're always playing dependent on some information), so I had three words to work with, the starting word and both answer words. That meant I could do some cute themed days, like starting with the word LUNAR and asking players to find TIDAL and FORCE.

Themed days were a hit. It's a fun little connection when you complete the puzzle. But they also make the game much too easy if you suspect it's a themed day. It's best if you can't spot the theme until after the puzzle is solved; otherwise a challenging word guessing game has been turned into an easy word association game. So I usually take some care with the themes to make them not too obvious, at least not too often, and I have to space them out somewhat randomly; they can't be every day. And a lot of players never even noticed the theme, which is a bit of a miss since it's fun to see them.

Reward Images

Enter Midjourney. Midjourney has a very easy interface for generating images based on a prompt with impressive results. I decided to experiment with generating an image for each daily puzzle. This would allow me to tie together the words for non-themed days, or to make themes more subtle, and I thought might just generally be a fun reward for finishing the daily puzzle.

Within a week of playing with midjourney at night, I was able to back-fill all 122 puzzles for the prior 4 months, as well as preload 31 puzzles for August, for a total of 153 puzzles generated in just a few days.

Easy Prompts

For some puzzles, the prompt is extremely straightforward, even just the words themselves, and without much experimentation I can get the bot to generate a good image. 

Click any of the images below for the full resolution version of the image.

 

Day 121

PAINT » SCENE + HILLY


 Image generated from prompt "hilly scene"
 
 
 
Day 111  
 
LEASE » CAMEL + BISON

Image generated from prompt "camel bison"
 

Creative Prompts 

 

Other days, I put a lot more creativity and experimentation into the prompt to get a good image.

 

Day 109

THUMP » HEART + SOUND

Image generated from prompt "boombox with anatomical hearts for speakers"
 
 

Day 92

PLUCK » ARSON + DIMLY

Image generated from prompt "candle in a window with a city burning in the background" 
 

Unexpected Results

Some days, I start with a prompt for something specific, but it goes in another direction and I like it.

Day 108

SLACK » LOGIN + FEWER

 Image generated from prompt "a woman walking away from a computer"
 
 

Day 117

WASTE » ANNOY + GIVER


 Image generated from prompt "angry santa claus next to trash can" 

 

And some days, I learn something new. Only after seeing the image did I learn that a Comma is a type of butterfly; and it has a rusty coloring.

Day 128

ETHIC » RUSTY + COMMA


Image generated from prompt "rusty comma"


No comments:

Post a Comment