Hello everyone! Welcome back to the new and improved fortnightly URR blog update (for the time being, at least, though so far I can truthfully say that a slightly faster turnaround time has been only motivating, and not stressful – touch wood). Two entries ago I discussed in some detail the ongoing generation of the “poem” riddle archetype, which is going to the primary one for the forthcoming 0.11 release, and last entry I discussed the new tutorial system which’ll tell the player what they need to know and what they’re supposed to be doing, while also removing the old guidebook, making some big changes to the game’s control system, and also implementing an updated and polished options menu, which tracks which tutorials you’ve seen and whether or not you have tutorials enabled or not (definitely check this one out if you haven’t seen it!). This fortnight, then, we’re going back to notes – and also to books! – which will form some of the core foundations of the information you’ll be able to get in the game world. There has been a lot of progress on both of these, so let’s get into it.
First, I’ve begun some major new progress on books. I don’t anticipate books being open-able in 0.11 – but the exception here is the player’s journal. I think this’ll be an important piece of the game, and so I needed to get some of the basic implementations into the game for books in general, so that they can be used to handle the journal, even if all the other in-game books will be developed next year for 0.12. So, one of the first things I did was to return to the sketched-out version of books I had a few months ago and redevelop it away from placeholder / proof of concept, and towards something that any possible text can be put in, in a book of any size, and it’ll always be able to fit it in, as well as doing logical things like going to new lines or new pages for new chapters, and the like. This didn’t take too long since a lot of the foundational code was already there, but one of the really cool new additions I’ve worked on in these last few weeks is the ability to include pictures in books. There’s essentially two possible pictures we might want to appear on a given page of a book – a symbol (one of the several hundred strong library of 7×7 pictures I’ve developed, which I’ve shown a few of in recent entries) or an area of a map, either a global map or a local map, each tile of which is displayed 3×3 tiles in note form and I’ll be carrying that over to the books as well (so either 6×6, or 6×9, or 9×9 tiles in total). The game also has to be able to work out what image to print on what page, even though anything could be on any page, and we always need to make sure an image is being printed on the logical page, and to then bend the text around it – and do all of this when a book is generated so that the game can store page numbers, in case the game wants to use those in a generated riddle later on! So, for example, here are some book pages (using some placeholder text) of how we can fit pictures into book pages:
I think these give a really, really exciting glimpse into how finished books will wind up looking! Although I don’t anticipate symbols and pictures being everywhere, I actually do think that they are going to be a significant part of the books. Part of this decision is because I don’t think other games which procedurally generate books – which is not, er, exactly a lot of games – are really doing this, and it’ll be another intriguing and distinctive thing through which URR can stand out from the crowd. Far more practically though, it will aid in how readable they are and how accessible they are to players (particularly new players), and the integration and combination between visual aspects and written aspects will allow books to be both richer, and far more complex, sources of information. Pictures will also allow clues to specifically refer to pictures within certain books, and you will also notice that all these books also have page numbers at the bottom – I anticipate all books being created at world generation rather than on-the-fly throughout the game, and so some puzzles will will even be able to refer to particular numbers or particular pages in particular books! This stuff is so exciting. I mentioned above that it will also be possible for a map image to appear in a book – I’m still working on this at the moment, so we’ll show this off in another entry (it’s not quite as simple as just copying this code from other places where maps are used, but it’s not too far removed either, and shouldn’t take me too long to do, all things considered). These major steps of progress on generating and handling books are also the foundations for the journal – more on that soon!
Next, let’s talk about notes. Readers might recall this image from two posts ago, in which I noted that it was becoming increasingly clear that different riddle types should be scaled according to different points in the game the player is at. We’ll be starting with more obvious and transparent clue types, such as those which imply an area, or depict a specific scene, or contain a map, or just up-front written information about something… and then as a playthrough progresses, information will become gradually more obscure, and gradually more obscured in nature, and increasingly abstract, and require more and more understanding of that particular game world and its nations, religions, histories, and so forth. This diagram also had three “?”s on it, to denote clue types I hadn’t shown off yet. The first of these – going in the top row – was the poetry archetype, which I did show off a month ago, and continue to work hard on for the 0.11 release (more on this soon). In the meantime, however, I’ve also begun to implement the generators for the other two new clue types – they might not find their way into 0.11, but working on the poetry generator is hard work (rewarding, but hard!) and I do need to work on other things from time to time as well. The middle one isn’t quite ready to show off yet – as the complexity of the clue does not correlate with the complexity of the clue generation, and indeed might actually inversely correlate with it, but that’s an interesting design discussion for another blog post – but the bottom one is coming along nicely.
Before we get to that, though, we need to talk about damage! This fortnight I’ve gone back to notes and fully implemented the damage aesthetic that I talked about previously as being something I want to work in. For now, this is only aesthetic damage, i.e. it will never obscure something on the note that might be important, but later I have more ambitious ideas for this, i.e. damage which can obscure something on the note (the coding of this, to ensure the game knows what part is being obscured and has another method for the player to discover it, will be complex), and also for notes that are in two parts and have been torn in two, and you’re looking to spot the note fragments with the similar lines of tearing to put them together (or four, or six, or nine, and so on…!). Here are some examples of notes with generated damage, and note also that the game is also able to figure out where the thickness of the note should be applied – to imply 3D depth – and does this almost perfectly, though this is a complex thing and still needs a little bit of tweaking. Essentially damage can be applied to a corner or a side of a note, and the game tries a number of times to fit some damage in – the amount of damage being another variable I’ll be able to tweak, and will perhaps correlate with how old the note is? – using a large number of possible damage “shapes” which can also be rotated and inverted and so forth to fit them. Then, as I say, it cycles around the note to ensure the 3D effect is always correctly applied. Taking away the content of notes, then, this leaves us with something like this:
These make for vastly more organic-looking and realistic notes, and this then brings us nicely into the new clue type in the “hard quests / late game” category, which I think are very aesthetically pleasing. I’m calling these for now the “recursion” clues, and these involve one of the game’s many hundreds (647 and counting) of small 7×7 images – selected carefully to ensure the image actually has room to do the thing I’m about to ask it to do – blown up to 5x size (so becoming 35×35, which just fits into the largest possible note, with no space to spare!) and then serving as the backdrop for other images to be nestled within it. As with all the late-game clue archetype, the idea behind this one is to convey to the player a set of abstract relationships they might not previously be familiar with, and which might be useful to consider, or might give an answer to another clue, or suggest an interpretation that would lead the player somewhere, or fill in the gap in understanding something which relates to another quest… and so on. I’m really happy with how these are looking, and again I think they’re very distinctive and unlike the other clue archetypes or categories, and also give a huge amount of potential for what these could be used for during later game quests. Essentially, this clue type selects something which is the “topic” – rather like the example in the big picture in the bottom left, the “focus” or “centre” type, in that example shown with a scarab – and then finds room in the image to print a bunch of other symbols in it, which will all be related to it somehow. For starters, then, I needed to enable the game to be able to expand any of the 7×7 images up to 35×35 and then print them onto a note, and that gave us the following:
This is just the first stage however, since right now these show no interaction or association with other symbols or other pieces of the game world, and so more needs to be added in order to flesh these out into a fully-developed clue type. Specifically, what this means is that the game then looks in this picture for places it might be able to fit a smaller version of other pictures, whether they’re also black on the background of the paper colour, or whether they’re paper colour with a black background. To explain what I mean by this, here are some diagrams. Each expanded tile in one of these pictures is 5 by 5 characters, so two next to each other would be 10 by 5, and four in a square would be 10 by 10. This means a 10 by 10 square can fit in one 7 by 7 smaller picture, and to visualise what I mean by this, here’s an example of one of the potential crown shapes, where I’ve used dots to highlight a grid location where there’s nothing, as either complete black or completely blank. As you can see by looking at the fourth column or the sixth row, as I say, these are these are expansions of a 7 by 7 picture onto the full size of a note, on which we are now trying to fit smaller pictures in order to denote some association between multiple smaller pictures and the bigger picture which forms the basis of the note. I feel this is dreadfully confusing even now I’ve typed it out, so again, let’s get some visuals.
In the above picture then, we can see how the image consists of 7 by 7 “tiles” and each one has contributed to constructing this overall image of one of the possible in-game crown shapes. Now the game needs to look for places where other smaller images – in the normal 7 by 7 size – can fit in. This means it needs to locate a 2 by 2 area where it is all black, or all paper, in which it could then be slotted (because 7×7 is smaller than 10×10). This was a surprisingly complex bit of code to write because of how the images in general are handled and generated, but after a little bit of thought I came out with something like this:
So we can see here that six potential locations exist to put in a 7 by 7 symbol of some sort – two in the top left, two in the top right, and two down at the bottom. If they were to be put in the top left or the top right they would have black ink on the paper coloured background, but if they went down at the bottom, they would of course have the black ink as the background and the paper colour as the foreground. This is fine, except that one obvious issue arises here which is that some of these 10 by 10 grids overlap, and we obviously don’t want any of the 7 by 7 pictures being put into those 10 by 10 grids to overlap. So, the game also looks for for for larger blocks of space in which something could be printed on the same note, and for this particular image this would look something like this:
Here, then, the game has instead identified 3 areas where a 7 by 7 image can be inserted without having any overlap between others. Additionally, since these rectangles are all 15 tiles across, it can be placed perfectly in the middle rather than being slightly towards one edge or the other edge of a 10 by 10 box, of the sort shown in the previous picture. What that means is that this particular shape – this particular crown – would be stored in the database as having a range of different options for this clue generation type. The game would then know that it can potentially have three clues as part of this note, since there’s room for three diagrams here, but it will also note it could just have two, or it could just have one, as well. But now to explain what all of this in fact looks like in a finished note, here’s an example with the dots for keeping track of the space removed, and a number of pictures chosen by generation systems and then inserted into the note:
So here’s our first example! This note would be challenging the player to figure out which crown is being shown in the main picture, and then to investigate what potential connections there might be between that crown and the other three symbols being shown here, with the understanding that fully deciphering those connections will lead to some secret, or uncover something, move one forward in that quest, and so on. I think this is a really cool looking example of a clue type! It uses this existing gigantic database of 7 by 7 symbols I’ve now developed in a new way, and also is able to convey how multiple other things might all be connected to, or in some way orbit around, one central thing. However, for less symmetrical base pictures, what became clear was that some slightly uncomfortable or weird looking note permutations became possible. In order to resolve this, there is a second layer which takes place here, where I’ve created a database of acceptable positions and pairings – or triplings, quadruplings, and so on – for symbols within a base picture so that the note still looks attractive and compelling to the viewer, rather than just looking like a bit of a mess where the 7 by 7 symbols have been put in any way they can fit across the note without much concern for aesthetics. This has been a challenging piece of code to write because it’s one of those pieces of code which relies on trying to transform a very base and innate human aesthetic sense into something a computer can spot itself, and make good decisions about. However, I’m actually very happy with how these all come together, and the game has become increasingly competent at finding good locations to put one, two, three, four, or more, symbols into one of these large pictures, and doing so in a way which not just fit into the empty black or white sections, but also just looks good in general. This system is not completely finished yet, because it’s very very very complex, but here are some examples:
Don’t they evoke a nice sense of mystery? I think they do, anyway. Doing this clue archetype has also, unexpectedly, helped me to shed light on one of the key remaining questions: how does the player connect notes, for puzzles that might spread across multiple notes? Well, the answer I think, is simply by deduction and connection, rather than something explicit on a note. Imagine, for example, you find one note that discusses how a certain saint of a certain religion venerated five holy items, and the religion is keen to have those returned. Then, you find one of these new “recursion” types, with an image of an altar and various items around it. It’s then up to the player to make the connection between the altar style, the religion you’d read that information about, and hypothesize – ah, these could be the five things being talked about in the book I read about the life of that saint. Again, this is later game stuff – I anticipate all early game clues being self-contained to a single note, or a single passage in a single book, and so on – but the more I think about it, the more I don’t really see any issues here. With this said, however, my continued study of existing cryptic riddle games has shown that there are a number of very abstract but potentially quite complex and quite important challenges coming up later on when we get into more complex clue threads which are much more easily addressed in a non-PCG game than in a PCG game. I don’t think any of these will be insurmountable problems, but there are certain kinds of interactions which we probably don’t want to reproduce here in a procedurally generated context, and maybe don’t fit well into a permadeath game. We’ll need to think about how to how to continue to develop that same kind of riddle-solving gameplay, but with the very different and distinct game structure that a procedural content generation game offers us. This is going to definitely be an interesting challenge I’ll be returning to often. And, likewise, I think we’ll have to each of these clues first introduce the main image in small size, in another clue, so the player knows what the large shape is. But for now though, this new clue type is coming along nicely!
(And as a reminder, the three “abstract” symbols shown in the top of the two pictures directly above are not symbols which always represent a fixed thing, e.g. an owl picture = an owl, but instead might represent anything in that game world – a place, a person, a concept, an item, an event, a ritual… anything. Those meanings are assigned at game start and will be woven into the more advanced clues in a given playthrough.)
Last, but not least, I’ve mentioned in the past that I really wanted to show some “failures” on the blog to sometimes give a little bit more insight into the development process, as well as showing off finished successes… so I’m going to close this one out by noting something that really didn’t end up working out! Specifically, this was the idea to have the basic visual format of notes changed depending on where the note is coming from. You might remember that I showed a mockup example of what this might look like a few entries ago, specifically for a note from a religion that really liked the colour purple. In that example, we would have taken the default note colour – the sort of slightly off-beige colour, tinted depending on the note with a range of other colours and shades, just to a small degree – and replaced it with the colouring of the religion in question, while the text or diagrams would cease to be black and instead become white. Alongside this idea, I also wanted to give notes a different appearance if they came from different kinds of civilization – so the nomadic and tribal/ancient ones, as well as the sedentary states – and have a couple of other options, too, such as notes coming from cult. My thinking was that the colour schemes would thereby function as a source of information for the player in trying to track which notes might or might not refer to which riddles, and also to add some additional visual variety to the world and the colour palette used for notes (which are going to be a pretty vital part of the game). As such, I actually put quite a few hours into this stuff, and produced a few examples, but…
…they just weren’t all that good. Although I tried quite hard with these and iterated on them a few times, I just couldn’t find any type of aesthetic that looked as good, that looked as readable, and that looked as logical, as the default style (who has purple paper, anyway?). I do think the religion ones (all using a purple example here) are much more pleasant on the eyes than the attempted nomadic note style, but it’s still nowhere near as pleasant on the eyes (or, above, as easy to read, etc) as the default note type. I also had a style for notes from cults, but that basically just a different parchment colour, and the ones for ancient civilizations are frankly so aesthetically and morally heinous that I absolutely refuse to share them (despite what I said above about sharing failures – but there’s failures, and then there’s failures). So, although a reasonable little bit of work went into these, I’ve decided to do away with the idea, and make all notes – regardless of their source or origin – use the style I’ve established in the rest of the notes. To add just a little bit of extra variety, however, I have increased the range of different parchment colours that notes can come in, particularly adding more white and yellow variations alongside the existing biege-grey-brown colour we have at the moment. As for the other note styles, it’s possible I’ll come back to this idea later… but I don’t think it’s likely, honestly. This just didn’t end up looking how I wanted, a lot of these confused the graphics and the imagery the player is actually meant to be looking at, and broke the suspension of disbelief a little bit in the idea that there are scraps of paper in which important, if cryptically-enriddled, information has been scribbled down.
Nevertheless: it was worth a shot.
(Was reading about this failure interesting? Was it a waste of space? I won’t be offended if the latter, but please let me know!)
So, with the new system for adding procedural damage to notes, substantial development on another new clue type will be seeing in later versions, as well as a massive move forward in terms of how books generate and function and what sort of basic technical foundation will be needed for those in the future – and coupling all this with the poetry clues unveiled and discussed last time, which we’ll be coming back to soon and I continue to be very focused on developing – we can now update the master image of clue types and their approximate intended or anticipated difficulty levels. Also from this point on I’ll be adding circles beneath each type showing whether something is being actively developed – beyond a placeholder, I mean – or whether it is finished. The poetry clue type is the first one whose complete generator is being worked on, and thus that now shows a year a yellow circle. Once it’s done I’ll update it to a green one. As I’ve mentioned previously, the poetry archetype is the only one I am determined to have finished for 0.11 – if we have time for more, that’s fantastic, but the poetry archetype is already so spectacularly demanding in both technological and creative terms that it might prove to be enough! But we’ll see.
What next?
Whew! A lot to cover there. Thanks so much for reading everyone – I hope this was an interesting and exciting update, and gives a good sense of how all these mechanics around information and knowledge and examination and deduction are coming together and will continue to come together over the coming months. The notes look so much more organic now, the books have taken a massive leap forward to the point where they can essentially handle any kind of arbitrary data now, we’ve got an interesting new clue type which will find its way fully into the game in the later version, and although I didn’t talk about it much in this entry – because this post is already more than long enough! – I continue to put in massive amounts of work into the poetry clue generator, which I’ll be talking more about soon in a forthcoming blog update. I’ll be sticking to the fortnightly updates (!!!) for the foreseeable future, so please do come back in two weeks to check out the next additions to the game. In the meantime, I’d love to read any comments with any thoughts, observations, questions – or critiques! – you might have, and also, please do think about sharing this with friends or with others on the web if you think they would find it interesting! I always know there are so many out there who would be interested in this project, but it can be hard sometimes to reach them, I think.
Thanks again everyone, and see you all in two weeks!
To be fair, book generation is an entire subfield of PCG all by itself, big enough to have a dedicated annual event. No wonder few game developers attempt to use it as a mere subsystem on top of everything else they have to do.
That said, I love how notes look. You nailed the appearance of parchment perfectly. Experiments were definitely worth it too.