Hello everyone – welcome back! I’m pleased to say these past fourteen days have been closer to the usual level of productivity for a fortnight, although still a little bit disrupted by work stuff (though the life stuff seems to have improved a lot!). Last fortnight was 20% coding capacity, this fortnight has been something like 60%, and next time I hope to get back to 80% or more. I’m putting the final touches to a major grant application at the moment which is always a very demanding thing – and my first time really playing the big grant game (as opposed to, I guess, the small grant game?) in essentially around seven years, so there’s a lot that I’m having to really ease myself back into and get used to again. But, the good news is that the application is both flying along, and looking incredibly strong, so I have been able to find spare hours here and there on many days to advance the 0.11 development. Specifically, my focus this time has been on bringing the four main categories of riddle poem stanza generation – civilization, location in civilization (e.g. town), location in that location (e.g. a certain shop), and final instructions (e.g. chat to the owner about a certain bird), into the game proper and out of the (now incredibly large) testing file I have in Python which I used to rapidly iterate on stuff before integrating it into the game itself. I’m pleased to say the first two are now fully implemented into the game and can take any civilization data, any location data, and produce a logical, but cryptic, and rhyming, two-line stanza, about that place, whatever it might be. This is awesome, and gets me incredibly close to quest thread generation within the game itself – and it’s always worth remembering that the riddle poems are going to be the most complex type of riddle to generate, and while I do slightly regret starting with them instead of something else, it’s so reassuring to see even these incredibly complex ones coming properly into being.

First came the civilization riddles. A new function was created to house these, including a new integration which is the ability to rank how difficulty the outcome should be. I realised in the process that there are essentially three levels of information one might have about a civilization (or a place, or anything else that a riddle wants to reference) – stuff which is very easily accessible and visible, stuff which is accessible and visible but comparatively obscure, and stuff which actively requires searching out to uncover. The first type would be something like what kind of religious policy a nation has – have they got religious buildings in every city district? Have they got monasteries? Do they house a dozen religions? And so forth. The second type would be something like the specific type of throwing weapon they use in combat – there’s a lot of ways to find that out, but it wouldn’t be as obvious, and might require a bit of looking around, or some combat experience with people in that nation, or glancing at one of many books or other resources that would give that information. The third type would be something to do with a specific historical event in a specific place, for instance, which might only appear in a single book, or maybe only one class of NPC in that civilization is going to be able to tell you anything about it (e.g. maybe we’re talking about a famous religious heretic who died somewhere, and this is a monastic nation, and it’s only going to be the monks who might have that information to give you). Two of these layers both function within the civilization riddle function as it currently stands, which is to say, the two “easier” layers. The function can now be told to use the simplest possible data on a civilization, which is certainly what we’d want for the early-game riddles, or the slightly more obscure stuff, e.g. what throwing weapons they use, or things of that sort. This turned out to be far less onerous than I expected – well done to past Mark for writing the code in a sensible way here… – and so now the game can correctly take any civilization, with any combination of policies, politics, religions, coinage, weaponry, anything at all, and create sensible riddle stanzas to describe that civilization. Fabulous!

However, it also turned out that even more work needed to be done here before these were polished. In going through them, as described last time, and adding loads more variations to the generator, I realised that there were a whole bunch of places where ambiguity could potentially exist and players could come up with interpretations or explanations that seem entirely valid, but aren’t what the game is looking for. This is a problem in cryptic riddle games in general – since it is intensely frustrating to find a totally valid answer for a puzzle and have it not be the right answer, e.g. as noted in my review of the wonderful but frustrating Alchemia from last year – but even more so in a permadeath game where you can’t reload. If you use up a bunch of resources testing a hypothesis that turns out to be false in a normal cryptic riddle game, you can reload; here, you can’t, and thus we need to cut ambiguity down to its lowest possible level to reduce the risk of player frustration from a valid, but incorrect, riddle solution. There were many levels of this. Firstly, I went through and checked all riddle generations for the “bee” coin image, and the “moth” coin image, are unambiguous (since both are flying, small, insects), and then had to do the same for the “fish” and “shell” coin designs for an equivalent reason (i.e. both underwater things), and making sure I hadn’t accidentally used the “tome” and “temple” coin images incorrectly, as I caught myself doing that once and became worried I’d accidentally done it twice. With those done, I double-checked that the use of throwing weapons (shuriken, etc) and the use of throwing grenades, were correctly disambiguated in the code, and then made sure none of the original code here, with catch-all options for rhymes, still existed (as that was outdated). Then I also needed to remove some more outdated code in which it was deciding what rhyme to create based on whether certain things were in the list of possible rhyming traits, rather than the one rhyming trait which had been selected, and then I went through and double-checked that all the language around coin designs and coin materials was correct (many many dozens of places), and removed the placeholder information for things like religious or national titles. I even, in this process, added the generation data for a ton of new rhyming words like crusades or hurls or char, all of which will just add extra variety to what players see. With all of that done (the complexity of these things is really bananas, but the end result is just so cool), I think the civilization riddle poetry generator is, actually, done (and I have tested it over 10,000 times, and not yet produced a crash or even a bug, as far as I can tell – so that’s rather good).

Second came the single-map-tile location stanzas – i.e. those discussing a single town, or a fortress, or a district in a city, or a mine, monastery, university, or whatever else. These will sometimes give you a two-part description about the tile being discussed; sometimes will give you one bit of information about that tile and sometimes a piece of information about another tile that has some geographical relationship to the tile we’re talking about (e.g. it is to the north); and sometimes will give you the location via two geographical relationship bits of information (e.g. where X is to the north and Y is to the east, and only one location fits those two requirements). In my previous creation of this aspect of the generator I was incredibly happy with how it turned out, and it really exciting to get this one into the game as well. I tested it by attaching it to the looking at the world map function where you can move a little crosshair around the world map to look at things, and by having the game generate a sensible riddle for whatever area I happened to move the crosshair over. This worked extremely well and it was incredibly satisfying to see this coming into being instantly, and always working no matter what I glanced at. I might, for example, check on a random location in the middle of a desert, and get this…

Where a shrouded steeple yet climbs so proud, much higher,

And water runs past a fishing bird yet crying, east, by no fire…

…telling us that to the north (“higher”) is a mountain called Dark Spire, and to the east (not near a volcano) is a stream called Weeping Heron River. Or I look at a settlement and I’m given precise instructions, via something like…

Where sweltering tendrils and clever birds are there in space,

And some live by dark grey slate with much of bright cerulean, at this place…

…to a town called Sapphirerock within a bioregion called the Dense Parrot Jungle. And I can do this for anything! Any tile on the entire map! No matter the map layout, or the names of anything, it can always find a rhyming couplet to describe that location in cryptic, but unambigious, terms. It’ll either give me two lines telling me the exact location, one line telling me the exact spot and one giving me a reference in a compass direction, or two giving me references in a compass direction and asking me to find where they intersect. I think this is, to put it mildly, insanely cool.

There were also other complexities in this aspect of the generator which I only saw once I actually integrated it into the game properly, however. These took me quite a bit of time to work on and fix. One of the first ones was simply that not all the tracking of plurals and singulars was correct here; I know some PCG games essentially abandon all hope at sentences having perfect grammatical correctness, but that’s not my way of thinking! I took quite a bit of time ensuring – I think – that these are always right, and now they should be good to go. Another major thing I had to add now that I’m integrating is some of the riddle rhyme suffixes which can only be used in certain contexts. For example, the “pier” ending can, unsurprisingly, only be used if the location is actually next to a dock in city. This was also true for endings like “wood” or “fire” (referring in this case to volcanoes) and so on, of which I discovered I’d actually implemented rather a lot of. These then necessitated new code to always ensure that such an ending is actually logical when being used, and isn’t just weird gibberish chucked in there simply to create a rhyme. Other interesting complexities arose when I continued play testing, and realised that some sorts of lines have to have preference over other sorts of lines. For example, we might have a town positioned on a road, and so a clue about the road is in fact not particularly helpful – it has to be a clue about the town. This in turn transitioned into a wider realisation that certain sorts of rhymes here are not acceptable for large multi-tile things. Imagine we are talking about a map tile within a bioregion, and the first line of a stanza hints at the name of the bioregion, and the second line hints at a mountain to the north – all that does is give you a column of potential tiles within the bioregion, rather than a specific map tile within the bioregion. As such, this also applies to multi-tile mountains, and chasms, and roads and rivers, where we need to be zeroing in on a single tile but the mountain (or whatever) might consist of several. This meant adding in some new code to keep track of and acknowledge multi-tile references, and only use them when their larger size does not generate ambiguity. This, again, took a while.

Yet with that done, they work, and they work well. They generate logical sentences is which aren’t too long, they always rhyme, and they always as far as I can do indeed yield unambiguous but cryptic directions towards a specific tile on the map. As I mentioned above, it’s incredibly cool to be playtesting this now, having now created a system that can just infinitely pick random tiles on the world map and create intelligent rhymes to describe that exact tile. I hope the reader will forgive me for tooting my own horn for just a moment here, but I’ve honestly never seen something quite like this, and it’s incredibly cool and interesting and novel. And even though in many ways it remains early days in quest generation as a whole, I do start to see this world of riddles upon riddles, mysteries upon mysteries, secrets upon secrets, coming into being. As an aside, all of this is also another reminder, yet again, of why the combination of “cryptic riddle game” and “roguelike” is both such a creatively and technically compelling and exciting one to explore, but also one that is bloody tricky – there are so many things one doesn’t need to ordinarily think about in either of the parent genres, but which are required when trying to combine them. The lack of a hand-made world and the lack of hand-made riddles requires all kinds of new code and new systems to ensure that whatever riddles get created in whatever world, they meet the sorts of requirements we’re actually looking for in terms of gameplay, how they can be understood, their difficulty level (which is very abstract and challenging to think about in these ways, although I think I’m making progress), and so forth. Regardless though: 50% of the rhyming riddles are now fully integrated into the game, as far as I can tell, and working fantastically.

What’s next?

Well, that’s everything for this fortnight. I’m sorry we haven’t had much – er, anything – in the way of screenshots this update and last, but I know they’ve been lighter updates because I’ve been overwhelmed a bit by other things, and because I’m really deep in the code here – but proper progress is being made, even if it’s not quite as speedy right now as I would like. Reaching the 50% mark on integrating the riddle rhyme generators into the game is a great milestone already, especially since (as above) no other riddle generator will ever be as difficult as this one (or even close to it, honestly), and I think a fortnight from now I should have the other two levels – rhymes for within a specific location (e.g. where in a town should you go?) and rhymes for the final command once you get there (do I wait ten turns? Drop a certain kind of item? Look at a certain object?). With that done I hope to have screenshots in the next post of the game organically generating full four-stanza fully-rhyming riddles on any possible generated world, and then it’ll be a matter of integrating that, with keys and chests, which is another gigantic task involving the wrangling of goodness-knows-how-many millions of permutations to ensure that both always and logically align. Still – I’ll get it done. Thanks as ever for reading, everyone, and please do leave any thoughts in the comments below!

16 Comments

  • Very nice.

    One thing that has troubled me with the examples: I would not naturally think that “higher” could mean “more north” rather than “at greater altitude”, and I think I’d need quite a bit of clueing to lead me to that interpretation. I see it’s great for the rhymes, so I assume you want to keep it, but maybe you could find some way to drop early and consistent hints that “north” is strongly associated with “up” in this universe? e.g. working into the tutorial text some reference to the northernmost parts of the planet as the “roof” and the southernmost as the “basement” of the world.

    • Thank you mb! And – yeah, that’s an interesting one. A lot of this is going to be need playtesting, of course, and indeed before the 0.11 release I’m going to work on a “beginner” riddle rhyme generator, e.g. for finding something in the university where you start, just to get the player going. I do like the idea though and I totally hear you; that’s honestly excellent thinking. I’ll find a way to work it in!

      • I was thinking the same thing. Especially given that the example above was about a mountain, it would never have occurred to me (even having read previous blog entries!) that “higher” might mean “north.”

        • Thanks a ton Josh – this is honestly really useful feedback. As well as the specific clarity that I think I can find a way to work into an early tutorial or an early hint or whatever, more broadly, perhaps there’s something here about teaching the player, who I anticipate coming “from” roguelikes rather than cryptic riddle games (at least for now, though in the more distant future I hope to really bring over riddle game enjoyers as well), “how” to think about clues. Just reflecting critically on my own experience of playing lots of cryptic riddle games, it has taught me to consider every *possible* interpretation for a word, but your comment and mb’s have both been so valuable in making me realise *I can’t take that for granted*. This is such useful feedback. I’ll make sure a tutorial makes this point explicitly, i.e. to consider every possible meaning of a word – literal, metaphorical, etc. Thank you both! Great feedback.

  • You’ve been making incredibly consistent progress for as long as I can remember following URR, even if it’s a 60% capacity fortnight, and it’s great to see everything coming together in the riddle system. Best of luck on your grants!

  • Hi Mark, the idea behind the puzzles is very interesting, but the part where you suggested, as an example, that only monks could give you certain information about their monastery (or something like that) really sparked my imagination. And now I have this question: how involved are you planning for NPCs in the adventure’s development? Besides providing information, could the protagonist find allies? Perhaps traveling companions, or people who help by granting access to secret places, assisting in interpreting ancient writings, or hiding you from the enemy. I understand it’s difficult, especially since it’s a roguelike, where the protagonist is usually alone facing danger (just the dungeon and me). But you’re building a living world so full of possibilities. I don’t mean to raise expectations; whatever you achieve will be a milestone. In its current state, the game has a very solid foundation for generating truly compelling stories, something rarely seen in a roguelike.

    • Hello Frankvill! Thanks so much for the comment. I’m planning a total overhaul of NPCs, though probably not in 0.11 – once the changes are made, the average person in the street won’t really have anything to say (they’re just there to make the world feel alive, and let you look at clothes, hairstyles, any facial markings, these kinds of things), whereas I’m going to do a total reworking of how conversations work with important NPCs and the richness of what they can say. Right now the blah NPCs and the important NPCs all behave similarly and so none stand out – instead, I want the blah NPCs to have little to do except giving ambience, and the key NPCs to have far more depth than they have now.

      I’m definitely intending for many quests to be given by NPCs, e.g. a monk sends you off to find a relic and gives you some books that he *thinks* contain useful information, but he doesn’t know what parts of the books *are* that useful information. And allies, definitely, everything you just wrote is what I have planned :). I’m definitely not committed to the solo adventure, even if that might be the primary thing. Right now NPCs are much more “set dressing”, but that’s absolutely going to change pretty soon.

  • Just a recognition of the bat-shit-craziness of these contextual riddles. When you first started posting your work on the rhyming stuff I thought you were pretty mad. But, golly, this is off the charts. Nice work.

    • Friend, thank you! This is such a nice comment :D. I really appreciate it. I know I keep saying this, but it *is* super exciting to see it coming together.

  • What an interesting “under the hood” peek you’ve given us of the updates to the riddle generator! It’s astonishing to me that the game is now capable of creating an actual, rhyming couplet for ANY tile on the world map.

    I’m curious to hear more about the highest tier of information difficulty; in particular, you mentioned that some answers (e.g., specific historical events) might only be found in a specific book. When the game generates that sort of high-difficulty riddle, will there be some way that the game points or hints the player towards the specific book that contains the answer? Perhaps certain NPCs might be able to direct them to it, if they aren’t able to provide the information themselves?

    Regardless, this is an exciting development and I’ll be looking forward to seeing the second half of the location riddle generation. The final piece in particular (what the player should do when they get to the location specified in the first three parts) is going to be very complex, and you’re probably going to find yourself wanting or needing to add a lot more possible actions to it later.

    • Thanks crowbar! Really glad you enjoyed the read :). Yeah, that’s a great question, and the honest answer is – I really don’t know yet. I really don’t know. The more I push into the unknown terrain of roguelike + riddles, the more I discover questions like this… so I don’t know. I do have an idea for a “hints system”, though, which is going to be a sort of “insight” based thing where you have a resource for insights you can use to get a hint, things like that. The actual gameplay implementation I have in mind for this is *incredibly cool* and really thematically interesting and novel… but can’t be the standard thing. It’s the “I have no idea, nudge me in the right direction” thing. More generally I think that I’ll be able to give hints for where to look within some of the hints, e.g. the language, or the colours on a map hint, or where you find it, or a note accompanying the clue note that gives you a hint about the clue note…

      And the libraries at universities will be useful, as I’ll let you search by keywords! And maybe you can request certain kinds of books from shops as well? AND I think you’ll be able to show clues to NPCs, and if it’s a sensible NPC, they might say “Well, the “city of lights” sort of sounds like it’s describing [City Name], because it has gas-light lamps on many of its streets” – or whatever. Definitely want a good host of options, as well as the backup insight option when you just can’t make headway!

  • Hi Mark!
    Awesome to catch up with all the progress. It really stuck out at me though how fixated you seem to be on riddles having unambiguous solutions. I agree that having that in the toolbox is important, probably a lot of early-game riddles need to work that way, but I would be quite sad if a riddle was /always/ just a pure “go exactly here and do exactly this” once you understand what all the words represent.
    There are a bunch of ways you could implement ambiguity that could lead to fun gameplay imo:
    * The riddle could refer to any of several adjacent/nearby locations. You can just try them all. You wouldn’t want to overdo this, but it could give a nice feeling of “doing the archaeological legwork to pinpoint the referent of the fragmentary scroll”.
    * The riddle could refer to either of two far-apart places. You can invest heavily in reaching both of them, or hope to get lucky… or you can wait and look for another clue that disambiguates without providing the full answer on its own. For example one riddle could point you to “And water runs past a fishing bird” in a world with all of Weeping Heron River, Egret Creek, and an inn called The Tears of the Lion, and you have to cross-reference with a book telling you the thing you seek is associated with crying.
    * The riddle could incompletely specify the location, and the remaining information needs to be deduced via “common sense” — e.g. the riddle points to a religious relic being underground in a particular town, and you have to guess on your own that it’s in a vault in the church cemetery.
    * The riddle could uniquely identify a location, but be incorrect, and your job is to learn about a historical reason for the mistake — a mistranslation, a transcription error, the terrain having been modified since it was written, etc. etc.

    • Hello Jake! Thanks so much for the comment and the really detailed thoughts :).

      Firstly – I really appreciate your thought re: ambiguity. I know I say this all the time, but I don’t know all the answers (especially in this unknown riddles + roguelike terrain) and I always really, *really* value being questioned on some design decisions and made to think in ways I hadn’t before.

      Point being: you’ve made a good argument here. I actually think all four of your options here are genuinely interesting, and I so appreciate the time you’ve taken to think these through. Re: 1), I agree that if the options are relatively low in number, and relatively close, then something like that would be totally fine. Re: 2), I like that model a lot, actually. Make it an active strategic choice. You’ve persuaded me – I’ll add that in! Re: 3), that’s a really interesting one as well. This one is the only one of the bunch that I’m not sure about, particularly because sometimes things wouldn’t be in obvious places and I wouldn’t want to run the risk of implying they always would be, or – if the player has solved some with surprising places – they might not think well, this time it’ll be in a “logical” place. Both of those seem like potentially problematic ways such clues could be read, as well as a third option, that someone assumes they’re missing a piece rather than taking some guesses based on the existing data. I’m not totally ruling this one out, to be clear, but I think this one does have a few potential gameplay issues where solutions would need to be found to prevent frustration or getting blocked, unnecessarily, in a quest. Re: 4), though, I love this concept! This is just first-rate. Outstanding. It’s in :).

Leave a Reply to jos Cancel reply

Your email address will not be published. Required fields are marked *