Welcome, friends, to this week’s development blog for Padlock Simulator 2025 Ultima Ratio Regum. For the past little while now I’ve been working on generating padlocks as a way to draw attention to objectives for the player (especially a new player), to add even more visual flair, and also to give the player clues to the solutions of riddles and quests as well. These have been a lot of work but I’m excited to show them off now. I think they’ve visually really lovely, some of the work I’m proudest of recently that I’ve done in the past year or two, and they’ll be an exciting addition to 0.11 and beyond as things actually start coming together. So, let’s get into it:
One-Key Padlocks…
The most basic sort of padlock is of course the one key padlock – which is to say a lock that has little special about it, and just requires a single key (which the player needs to find somewhere) to open. I’d anticipate the player encountering a lot of these in the early game, and obviously once the player has the required key they’ll be able to open it and go through whatever door, or explore whatever chest, the padlock might be protecting. Given that the player might wind up with a very large number of keys by the end of the game, trying to open a padlock which requires keys will just automatically try every key in your inventory which hasn’t yet been correctly identified and associated with a lock. I did consider having you manually try keys, but that seems functionally equivalent to the former and just infinitely more frustrating. Starting off with the one key padlocks also really helped me to figure out what sorts of axes I wanted to vary the padlocks along. It soon became clear that the important ones were going to be “quality” / colour, and shape, and the nature of the lock itself (e.g. one key or something else). As a quick reminder in this regard, here’s an example of what some of the in-game keys look like, with low quality on the left, then medium quality, then high quality, then religious – these of course having a vast range of different colours, and even combinations of colours, though in this picture I decided to just go with one of the demonic options (for the religious keys) simply because the red looks so good.

So, at a bare minimum, we want locks to match the keys! Bronze / copper / brass locks for the lowest quality, silver locks for medium, golden locks for high, and then locks in metal painted the relevant colour or colours for religious locks. But shapes are also important – as the long term reader will know, each civilization has a shape whose aesthetics it really likes and which one can see repeated throughout buildings, clothes, and basically every other item or structure or thing within that civilization. You can also see this reflected in the keys above, with the low quality keys being from nations that like circles, octagons, and crosses; the medium quality keys being from nations that like crosses, circles, and diamonds; and the high quality ones being from nations that like circles, squares, and crosses. So, each possible shape will have its own style of padlocks, although two – the “octagon” and the “diamond” types, and the “cross” and the “star” types – have been compressed into one, since I found it too difficult to fit the relevant things into the “diamond” and “star” shapes without instead shifting them to be the same as the next-closest example. As for the quality, we can easily have the bronze/brass, silver, and gold colours, and add the religious colours too, but we needed to add some designs on the locks themselves. For low-quality locks, then, I decided to go with a style which suggested the lock was constructed from several distinct pieces, and had lots of visible screws or nails in the surface of its design. For medium- and high-quality locks, I wanted to make clear that these had been manufactured to be snazzy as well as functional, and thus should have designs and patterns on them – while the religious locks can be at any quality level, but in different colours. So, here are some examples of the one-lock padlocks I’ve been able to get generating, with these guidelines in mind:

Aren’t they nice?? I have to say that I do think the various levels of padlock here are really well distinguished, with the low quality ones being very basic but still having generators that can produce a lot of different looking outcomes, while the medium and high quality ones are quite ornate. The swanky designs for the medium and high padlocks have to be specially designed for each shape, which has been very time consuming, but also a great deal of fun, especially given how fantastic I honestly think the final products here are looking. These also, of course, include the shapes for nomadic civilizations and tribal or ancient civilizations, such as triangles, semicircles, and many others. Although both those latter groups of civilizations are going to undergo major changes in coming versions, they won’t be having their aesthetic preferences changed, so it was fine to get these in here. With these all in place then, the basics of the padlock generator were well developed, but this was only the very start. There were several other types of padlocks I wanted to develop, each of which will have a different and distinct gameplay goal, as well as just looking nice and offering a lot of aesthetic variation. As with everything, it’s important to me that things don’t just look nice, but also prompt towards different sorts of play focused on deduction and discovery – and I think each of these other lock types lends itself to different possibilities within quest generation and riddle generation, and so let’s now get onto those.
Multiple Keys…
The obvious next expansion from having a padlock with one key is… having a padlock with multiple keys! Genius. The point here is that such a lock will enable us to develop quest threads with multiple branches which can be tackled in whatever order the player wants to tackle them in, before then coming together to an endpoint. I think this is really important to prevent the game from being too linear, to promote player decisions and strategic choices, to enable quest threads to ramp up to become more challenging and more complex as the game progresses, and also to reduce the possibility of the player getting stuck on something they just can’t figure out and can’t advance past. In the near future combat will also be a partial solution to that last point, allowing threads to sometimes be advanced through a successful duel rather than a successful riddle solve, but we’re not quite there yet. Anyway, I gave this some pondering and decided to max out at three keys for a lock. I thought about four but it’s hard to fit them all in the size of the graphic we have, and if we ever do need more, I can just add two padlocks to a single door! So, I then added to the generator options for two key and three keypad locks, again with the same level of variations before across quality and shape – there’s so much going on here, especially in terms of drawing the special design variants for the high quality ones, that this was again a very substantial and demanding task, but also very gratifying one to see these all coming together and how cool interesting they all look. So, here are a tiny portion of the game’s possible multi-key padlocks:

Again, I’m very pleased with how these came out. As well as all the above points, which are true for all padlocks, I think these also give an interesting sense of scale and anticipation as well. I can imagine a player encountering the first one and taking from it a signal that there is substantially more to do than they previously thought, perhaps the world is bigger and more involved than they thought, and perhaps it also demonstrates that they are moving forward and advancing in the game towards more challenging and demanding quests. All of these are good things. As for how keys will work with these locks, you can try to open one and it will tell you if you do have a key which works in one of the locks, or two, the same as with a single lock. Key information in your inventory will be updated when you discover what each key does, so you always know which keys in your inventory have unknown purposes, and which you found the correct lock for, even if you might not be able to open that lock just yet (“This is a key you found in a secret chamber beneath a pagoda of Ur-Kajuu-na, and is one of the two required to open a door in a cave north of Eagle’s Rest” – or whatever). Anyway, with these done, the next step was to work on padlocks which themselves, in their visual, contain a clue as to the nature of the key, the location of the key, or some connection with the quest which tells you what this padlock might be linked with. So:
Keys and Clues…
For this next type of padlock I returned to the single key layout and format, but shifted the keyhole across in order to make room for one or two graphics or symbols which will give you information about the nature of the lock. Here, as ever, this might be drawn from the now massive (500+ things!) database of visual representations of in game things, such as a certain animal, or a certain in game item, or things of this sort, or might also be drawn from the database of abstract symbols I’ve mentioned before, which will all be assigned new values every time you start a new game world. I can see many ways these can be integrated into the quest generation and the riddle generation which I’m also working on, but given that you automatically test all keys in your inventory when you try to open a lock, the point here is not to hint you towards which key might function in that lock, but rather towards where and how that key might be located or acquired. Perhaps you encounter a padlock with two symbols, let’s say a moon and a hummingbird, and the only place you’ve ever found those two ideas connected is in a particular novel, which describes a certain place, or certain event, or something of this sort. In that case the player would be right to make that link, and use the information in that novel to decipher where the key can be found to open that padlock. This will, of course, require the implementation of a system to ensure that no two riddles or quests use the same data, which will be complex, but not unreasonably so – but that’s something to talk about in the future. Anyway, with all that said and done, here are some examples of the clue-and-key padlocks:

Aside from the aesthetics – again very demanding and time consuming to make, but also very rewarding – I really like the sense of mystery an question that these locks evoke as soon as you see them. For the more experienced player, I like that these locks might generate or spark connections or ideas about relationships between things – people, places, items, events, whatever – that they hadn’t previously thought were connected in any way, and for new players I think these really nicely pose interesting questions within the mind. Let’s say you haven’t paid any attention to the thing on the sidebar which tells you the phase of the moon, and then you discover a padlock which only mentions the phase of the moon on it. What does that mean? How can that be used to find the key to open it? I think these locks will really convey to the new player that that might be far more depth and detail in this world and its logics and information than they previously appreciated, and to look more deeply into things than perhaps they had until now. In my spare time, or in the background while working, I have a lot of fun watching blind playthroughs of cryptic riddle games (La-Mulana, Tunic, Lorelei and the Laser Eyes, Outer Wilds, Return of the Obra Dinn, etc) and one of the most common mistakes made by people new to this genre (not said with any snark, of course – just genuine interest, as a game designer) is insufficiently estimating the depth and detail of the world. By this I mean that players often don’t think the world is as rich or detailed as it actually is, and thus don’t look for important information in those details, because they’re not used to play a game where minutiae and obscure things important. I’ve so often seen people just breeze past something important, because they’ve never before played a game where something so small, or seemingly “background”, might be important. I’ve really taken this lesson to heart, and it’s one of the reasons why the initial tutorials explicitly say that looking at stuff is very important, but I think these padlocks will achieve the same objective as well, of telling the player “you know how closely you’re looking at this world? Yeah, well, maybe you need to look more closely still!”. Really excited about seeing these in-game.
…and Combination Locks!
With these three padlock categories complete, this brings us to the fourth and final type – the combination lock. These locks require no keys, and thus can technically be completed as soon as you encounter them, but with the most basic version having 1000 possible combinations – i.e. 10x10x10 – and easily pushing that number closer to 2000 if we just give each wheel a dozen options instead (12x12x12 = 1728), I wouldn’t anticipate anybody doing that (though they’re welcome to waste their time on such an endeavour if they really, really want to – though I would also probably have consequences for endless random guesses, such as a priest coming up to challenge you, or a trap triggers after too many wrong inputs!). Anyway, whereas real world combination locks tend to have four wheels, I couldn’t really fit four in here while sticking to the aesthetic and making the padlock look nice, so we have three wheels instead. I quickly developed a system to have the game generate wheels with any arbitrary selection of symbols on them, or even categories of symbols – so one wheel might have all animals, or one wheel might have all items, or one wheel might have all unknown symbols, and so on. The player will then be able to select which wheel they want to turn, and turn it left or right, which even includes a rather nice little animation (shown in the gif underneath the main image below). Again, this took a fair while (especially to get the animation working) but I think it was worth it. So, here are some examples of the combination locks, and some examples of me turning the wheels within a given padlock:


I have to say that I think these are pretty tremendous, although even as I was developing them, a potential challenge became clear. I had originally thought that these might be padlocks who’s code one might discover part by part, so you discover the answer to the first wheel somewhere, the answer to the second wheel somewhere else, and so forth. The reader will quickly appreciate the issue here which came to me very fast as well – once you know one wheel solution, there are then only 100 or so possibilities for the remaining two, and it’s certainly possible a player might bore themselves by doing that rather than seeking out the other information. Once you have two solved of course, there might be only no more than a dozen permutations of the final one to test. In any case, I don’t want to encourage dull, or grindy, or repetitive gameplay, based on just making guesses. Now, part of the solution is what I described above, i.e. that I will implement a system where repeated wrong guesses in a lock will come with some consequences – although the player will be warned first (e.g. “You sense the priest nearby is becoming suspicious of your failed attempts to open this door”, or “You hear some mechanism behind the wall clicking into place as you input another wrong solution”). This might be being challenged by someone in the same room, or it might be a trap, or something else. This definitely helps, but more generally it’s clear that the solution to a combination lock needs to be given in one piece – i.e. you find the full answer in a single document, a single note, a single painting, whatever it might be. This will nicely prevent those issues, and not clash at all with there being some consequences to just endlessly twiddling the dials. With that all resolved, I’m incredibly pleased with how these are looking.
So with all those types in place, and huge variation for patterns, shapes, and quality, we then have something like this, to show the full range of possibilities (or rather, in fact, a minuscule portion of the range of possibilities!) for the sorts of padlocks one might encounter in-game, whether on a chest, on a doorway, in a secret chamber, or anywhere else, for that matter:

These really have been a lot of work, but I really do think they’ve been worth it. They look great, they integrate clearly with the core gameplay goals, and they all – to a greater or lesser extent – imply and signal interesting things about the game world which should further encourage a player to get out there and explore and discover and make and forge these connections, as well as giving the new player an initial sense of what we’re doing, and the level of depth and worldbuilding detail we’re dealing with here. I absolutely love these – I honestly couldn’t be happier with how they’ve come out, and it’s so exciting to now be integrating them into the game, and the game’s quest generators.
What next?
Thanks so much, everyone, for coming with me down this exploration of procedural padlock generation (a possibly wholly novel combination of words?). I honestly think these are some of the best visual work I’ve done in quite awhile, but also represent one of the most exciting mechanic additions as well, which will integrate so well into everything else we’re currently developing in terms of riddles, chests, rewards, information of the in-game world, and things to develop shortly, such as the generation of books, the generation of history, and so forth. I know I’ve been saying this a lot often in recent updates, but it’s just so exciting seeing all these pieces that will closely connect to each other coming together, coming into being, and being created exactly as I imagined them in my mind. It’s really thrilling, and I really do appreciate you all coming with me on this journey. Please do let me know what you think of the padlocks (both in terms of game mechanics and in terms of visuals) in the comments below – I’m super proud of these, and I’d absolutely love to know what you all think of them. Also, please do share this post around on the web if you think this stuff is as interesting and novel as I do, and if there might be other people out there – whether roguelike fans or not – who’d enjoy giving this post a read.
Thanks so much for reading, everyone, and I’ll see you in two weeks!
A visual fetish of incredible power. I wish I had such locks IRL for my luggage bag, for example. And looking at the keys, I immediately remember the magnificent examples of Catholic pendants in the shape of keys. The game becomes more and more beautiful.
Thank you dreamer! I’m so glad you like them. Quick Google later – super interesting, I’ve never seen those before. I will say, there may well be a few other key types coming – e.g. a skeleton key (one use, open any lock), or lesser equivalent, e.g. a religion key that can open any one lock, but only for that religion, and other things of this sort. They could be really useful strategic resources, and also good escapes for the player who is just absolutely stuck on one specific riddle, but still wants to advance to having earned the means to acquire such a key elsewhere…
I love the padlocks with the icon clues on them. Images look great too!
For the padlocks with multiple keys, there might be a sweet spot for effort required in the distance between (say) two keys. Some of the most eye-roll-inducing (and frustrating) moments I’ve had in games have been, “in order to open this door you need to pull three levers which incidentally happen to be at opposite ends of the map”. In a hand crafted game it feels like a cheap way to extend the gameplay and you can see it coming a mile off. It makes more sense for example to have two guards each hold a key but they can be found in the same village (maybe patrol the same spot at different times of day), or maybe two siblings in affiliated towns a bit further apart, but you were naturally going there anyway. Or maybe one of the keys fell down a drain and got washed out into the local moat. Or maybe a key got destroyed and the various parts can be found with a bit of elbow grease in a specific field. But too far and even though it’s procgen it might still feel a bit contrived/frustrating!
I guess basically a balance between “it’s near but you need to make an effort” or “it’s further away but not arbitrary or inconvenient”.
I have a feeling you’re already anticipating this though 😀
Thanks so much for the comment, Neil! Although I haven’t yet been moving on to too much of that kind of thought about exactly where keys would and will show up, I *completely* hear you about the potential for frustration there. I think you’re right, some of the time they will be quite close by so that one feels acquiring both is doing a single task, but other times of course it could be the reverse of that. You’re also completely right though that the PCG element does had so many complexities here, but also so much potential for so much rich interest. On the day I type this comment I’m working on the final step of the riddles for 0.11, it’s honestly just so mind-blasting and complex, but it sure is rewarding, too, to work this stuff out.
My point being – yes, I need to seriously think about pacing of the player discovering a lock, the player discovering keys, the player discovering locations of keys, and all these sorts of things. Implementing that pacing into quest generation will be really important.
The locks and padlocks look stupendous! I particularly like the variations in lock quality levels, and the animation of the spinning combination lock wheels made me grin. You’ve also come up with some great ideas (mechanical traps and guards/priests overhearing the attempts) to discourage players from fooling around too much with combination locks when they don’t know the correct combination.
Some other ideas after too many failed attempts on a combination lock: it could freeze for the rest of the day (like a locked phone); it could set off an alarm that summons guards (similar to a trap); repeated failed attempts could trigger some sort of negative status effect (e.g. mental exhaustion, frustration, etc); the lock turns into a mimic and bites the character (ok, maybe not!); the lock squirts out indelible ink on the character’s hand (similar to some real-life fire alarms in schools) which could get the character in trouble unless they have a spare set of gloves to slip on.
I am curious to find out how the clues on the padlocks will work in a ludonarrative sense, since I can’t think of any real-world (or fictional) examples in which clues to the location of a lock’s key(s) are visible directly on the lock. Perhaps clues on padlocks are found in the mysterious Sphinx Houses, or other locations in which puzzle-based locks are deliberately put there for mysterious reasons for puzzle-solvers? Regardless, I really like how the designs on these locks (along with the multi-key) locks actually serves to drive the gameplay and are not simply set dressing (however excellent that set dressing may be). It might also be worth including a locksmith’s guild or shop in larger towns to show where these impressive locks are actually made in-game, and perhaps as places to find certain keys. Maybe on an ancient mysterious lock the key has been lost or destroyed, but you find a diagram showing the correct design and need to have a key made by a locksmith (and perhaps out of a special material)?
Thanks as always for the update. I can see how the various generators are getting used to build on each other (such as symbol clues on the padlocks) — very exciting.
Thank you so much for the comment, crowbar, and I’m really glad that you like how the locks are looking! It has been a really nice break from far more textual and coding and technical stuff for the last few months, and ha, I was also really pleased when I got the combination locks working. I wouldn’t be surprised if other animations actually find their way into the game in the future – I’ve really enjoyed making this one, and I think it’s a rich and unusual effect in an ASCII / ANSI game, so we’ll see.
(We’ll definitely have a padlock unlocking animation, though, of the “lock” part just sliding upwards)
Anyway- thank you for these other fantastic ideas for failed attempts! One of the things that makes PCG so rich is the ability to combine things to create interesting challenges, and if we can develop a whole database of things which might happen if you try a lock too much, and then those are being procedurally combined with types of lock, then that would be really exciting. Indeed, perhaps I’d even want to add an option where you can acquire an item – like boltcutters – to destroy any luck you find, but you always know that there will be a major consequences for doing so. See also my other comments in this thread about skeleton keys and things of this sort.
Ludonarrative – that’s a very good and very fair question. As soon as I have an answer doctor… I’ll be sure to let you know!
And agreed, I think a locksmith shop will appear, for places where one can buy skeleton keys and the like, and also perhaps they sell things like diagrams or blueprints about certain sorts of locks which might also contain hints as to where the keys are found? Your final idea, about having a key made… honestly, this blew my mind. Amazing idea. Let me sit on that one a bit longer and get back to you on that, but I love it, it’s absolutely in keeping with the sort of thing I want to do! Thank you so much for that one – that’s a real winner, I love it. Always good to have multiple paths to one solution – find the key, or find a blueprint and have one made, OR buy a skeleton key, OR chop it off but face a big consequence.
And lastly – I’m so glad that those connections and relationships between everything are really coming together from the outside, as well as in my brain on the inside. Really fantastic, and thank you for letting me know! 🙂
These look fabulous!
The religious keys especially look amazing. They really do have a special sort of *feeling* to them, like they lead to something very important, either to you, or to the ones that made it.
As crowbar said, I’m curious on how they’ll fit the narrative as well.
Also not sure how effective a gold lock and key actually are, though, what with gold being an extremely soft metal and all. Unless they’re only gold plated, I guess.
Can’t wait to see how these fit in with what you’ve been working on!
P.S, Got an email today for Roguelike Celebration 2025, are you thinking of attending that one? I’ve enjoyed your previous talks there, always very interesting. You still have to wake up early though haha
Thank you Nick! Really glad you like the keys and the padlocks, and I’m glad you noted how distinct the religious keys are. Those were definitely particularly fun to make back when I was working on those, as even though we’re sticking to an essentially real world setting, that’s no excuse to not go a little bit weird and baroque on some things.
And, ha, I think they are indeed only gold plated rather than actual gold (or at least, that’s what we’ll go with from this point on)…
Re: the RLC, thanks for asking! I might well be attending, and perhaps I will be submitting again this year, though I’m not sure. I’ll certainly be submitting next year if I’m not submitting this year. I’ve added it to my calendar though, so we’ll see how I feel a little nearer the submission deadline! (And yeah, time zones *not* ideal…)