My 7-Day Roguelike experiment, A Rogue Dream, is now on Github, such as it is. It’s not quite playable yet, but hopefully some of the ideas behind it might be of interest to developers. So the code’s online with a brief description of how it works, in case anyone wants to fiddle, and this post will give an overview of the premise and the most famous original bit of tech behind it – generating game content from the web.
The original idea for the game came from musing about a roguelike which changed its theme as you played it. Initially I didn’t think this would have a mechanical effect, I just thought it would be a fun exercise in procedural content generation, if you could suddenly convert a fantasy theme into a cowboy theme, and work out analogues for items, monsters, etc. I was going to set the game in a virtual reality world gone haywire. This would slot in nicely to my development of Spritely (coming soon!) which is a tool for generating sprites from the web.
As I thought about this idea more, though, I had other ideas. In particular, I remembered Tony Veal’s 2012 paper about making metaphors, which you can read online here (it’s quite fun). Tony noticed that if you put an unfinished question into Google, you can mine answers from autocomplete. If you were to ask, say, why do doctors…
You get observations about doctors – so you can infer that they wear something called scrubs and say stat and do something called prescribing steroids. I was absolutely bowled over by this cute trick when I first saw it, but until now I’d not thought about how games could use it. A Rogue Dream does just that. The player enters a noun at the start of the game, and we try and autogenerate abilities, items and enemies for that noun, which the player takes control of. All of the screenshots are showing automatically generated sprites and abilities/items.
I add in some filters which are hand-made (something I shy away from for the work on ANGELINA but that fits perfectly here). For instance, after searching for why do <noun>s… if we see the word ‘hate’ we take the remainder of the autocomplete to be the description of an enemy. So cats get the enemy water, and cows get the enemy red. We do similar things for items (wear, eat) and even goals (like, love, eat). Anything not fitting the filters (including negative filters that remove things like references to ‘you’) is considered to be an ability. Journalists get the ability Plagiarise. Men get the ability Cheat On Women.
Herein lies the problem – and the strength – of the technique. It’s highly unpredictable even with my basic filters on. You don’t get facts, you get observations, which includes racial stereotypes and common misconceptions. But that can also lend a lot of weight to the results. One roguelike player observed that the game’s concept is a little bit like playing the Internet in game form, which I like a lot.
I want to keep using techniques like this, perhaps finding more focused or reliable ways to do so. It’s such an elegant and cheap way of getting fresh, contemporary knowledge from the internet without using databases or libraries of knowledge. You solve the common sense knowledge problem like any human would – you Google for it.
In terms of lessons learned, I wouldn’t have dreamed of entering Ludum Dare to make a platformer without having made platformers before. For some reason I thought I could enter 7DRL without having made a roguelike before. I’m glad I did, because it was a last minute thing and I got a prototype running, but next year I need preparation beforehand. Looking forward to it.