Saturday 19 July 2014

Corrypt post-cariem

Okay Pippin wanted me to finish writing this, ugh it's way too many words and it's been a while so no promises on accuracy, chances are I remember some things totally wrong.

Will assume you've played Corrypt because spoilers or whatever. Play Game Title and Lost Levels too if you want but it matters less.

In general I make games because I want to play them myself, which means fixed content is pretty much out - I'll know what's there so it can't surprise me. Also there's a cost to making it. So: procedural. But not necessarily in the specific limited sense of writing software to build worlds, the way the term's often used ("procedural" means done by a program and "content" means stuff so PCG is a pretty silly buzzword since it could describe any software or system); the thing is that's actually a huge time investment as well, it takes a long time to cost less than just making things directly. What I try to do is make games where interesting structures grow through the players' actions without needing to be prepared in advance (an arrangement of pieces in e.g. chess is content, the rules describe a procedure to generate them). Or else really simple randomisation like shuffling a deck of cards - Zaga-33 and 868-HACK's levels are generated in the simplest way.
Corrypt (along with the Game Titles) is an exception: I made levels. It was a ton of work and it's clear why I don't do that very often. But it still has that element of generating structure through what the player does, changing the level layout in a chaotic way, which keeps it a bit more interesting for me than static puzzles.

I talked a bit about how the idea evolved through Game Title to Lost Levels to Corrypt in this interview, will try not to repeat myself.

Game Title was for a jam so basically I threw things in quickly without much planning. Mostly basic lock/key interactions - open the door, get through the forcefield, destroy the wall. I tried to do some hidden areas but didn't end up with anything more interesting than "bump into every wall to find the secret", I didn't have the tools to signpost them in a way that was clear enough to notice but ambiguous enough to be non-trivial. Best thing was the teleporter, allowed for a maze that wasn't really difficult but was interesting to perceive.

Lost Levels turned out really enjoyable to make, it was this difficult problem to arrange levels bearing in mind how the positions of objects on different screens could interact. It's not interesting for me to play; I know the solutions because I set them up; but sometimes it's worth making things just for the sake of them being hard to make.

I prototyped another puzzle trying to take the superposition idea further: certain tiles in each room (the monochrome areas in this image) were a void that carried over whatever had been in that position in the previous room. So there were multiple possible versions of each room depending on which direction you entered it from (and, if adjacent rooms had voids in the same place, where you'd entered those from etc.). It didn't work out, it was completely dependent on levels being designed to let things happen and you could feel it, you were just finding the path I'd prepared for you not doing anything for yourself. Wasn't interesting to play and - more importantly - wasn't interesting to make.

One approach I find appealing is to give a very open-ended toolkit for construction - see Spacechem for example - so the challenges are more like real engineering problems than mere puzzles. I got to thinking about combining a construction game with the Game Title ideas, basically Spacechem with an avatar and the goal of the machine you build is to open the way for you, plus glitches. Also I was thinking about a still-unreleased game by Alan Hazelden which this beautiful interlocking thing that grows until it must be all solved at once, the idea of the whole thing converging into a single puzzle is pretty, Riven had something of that feeling too towards the end.

Started by just throwing in some elements to see how they would combine. First sokoban box-pushing as a simple thing to do. Then the "dart" creatures, I was thinking of these as computational elements, they carry one bit of information (whether they turn right or left) and you could set a magic switch tile to flip that bit when passed over. Flipping didn't stay in so they ended up kind of under-explored, but I kept them because I liked how they interacted with the boxes. Had a couple of other tile attributes you could set, by far the most interesting was "lock this so it doesn't change" - new variation on the Lost Levels / void mechanic. Putting the player in control of which tiles locked was way better than predefining them in fixed levels.

It rapidly became clear that glitching tiles like this didn't really mix with the idea of setting up delicate computational engines so I just focused on this. But there were a few puzzles with the darts I thought were interesting enough to keep, and they were too rigid to just be able to throw a different tile into without breaking them, so it made sense to put them first and introduce *MAGIC* later. And anyway to provide a choice of what to lock into each tile position you needed access to a few different rooms, so it made made sense that you'd acquiring that later. Plus I'd started to think about a loose narrative to fit this corrupting pollution into, and for its destructive power to mean something the world needed to be set up first, it became a priority to make it feel worldy.

I was reluctant to add an undo button because of this worldiness priority; being able to arbitrarily turn back time costs verisimilitude. I tried to just make sure puzzles couldn't get into unwinnable states. Added box-pulling in an attempt to make sokoban reversible - which didn't work: if you pull a box towards another and end up between them then pushing the first one back now pulls the second; but I didn't think this through at first. But anyway the better puzzles I found could get stuck, so undo was just kind of unavoidable out of basic politeness.

I tried making just *MAGIC* immune to undo. Pretty exciting, doing permanent irreparable damage. (Best of all - you'd end up carrying a negative number of mushrooms if you rewound to before you'd collected the ones you'd spent on the magic you'd used.) I loved the idea of maybe having puzzles that required using undo as a tool, and maybe just breaking the game forever, but nobody else could tolerate it so it had to go. It was pretty bad, people would experiment not knowing what *MAGIC* would do and then just be stuck, there was no space to learn. It's like the least reversible part of the game, the most in need of undo. (I'm now somewhat satisfied by 868-HACK having .UNDO as a constructive ability.)

So how undo ended up working isn't completely ideal. Most conventional puzzles these days undo individual steps because repeating from the start of a room isn't interesting, but here with *MAGIC* you often want to undo something you did in a different room so you need to undo big chunks. I could have done multiple scales of undo but that seemed unnecessary complexity. A lot of people got confused that it returns the room you're in to the state it was when you most recently entered it, rather than its original state - so if you leave something in a bad position and go away, when you come back it'll still be there. This isn't ideal, but resetting rooms would be much stranger given that they can be part of multiple interlocking puzzles, and maybe you've magicked objects over from different rooms, what happens to them? The only thing that really makes sense is to just have a single linear timeline.

Basically this possibility of getting stuck and having to unravel quite a way is the cost of having everything interconnected; worth imo. And it's fine with me if it makes the game a bit spiky and hostile, that's appropriate, I really don't care if someone doesn't "get to the end" or whatever not my problem.

World map was initially quite a bit bigger (bottom right of that image), 7x7x2, I just didn't have enough stuff to fill all that space. Like the forest was 9 screens instead of 2 without anything extra happening in it. Compress.

First screen introduces the box behaviour, pushing and pulling.

Cringed a bit watching the few mainstream sites that covered it try to explain what the fuss was about without bothering to play it. The thing that you discover on the first screen, that's probably it I guess. Ah well.

Second screen tells you that box movement is recursive. Actually this rule showed up unplanned because I'd reused code from Glitch Tank, but it seemed legit so I kept it. Of course, it makes box-pulling even less reversible.

Some people criticised the game for not having a tutorial, maybe if I'd written TUTORIAL in large font across these first few screens they'd have noticed.

So, the dart puzzles.

This version has three solutions (use the dart to put the box on the button, use the box to put the dart on the button, use your body to direct the dart to the button and run quickly to the exit); the first two both seemed interesting so I separated them out, it was quite tricky to find configurations that allowed one but prevented the other. The third didn't interest me at all and was very difficult to eradicate from all the variations on this design. Also, if you get the box pushed to the wrong part, it can let the dart escape out into the corridor at the left where it's just annoying.

Moving the button two spaces away from the edge prevents the box deflecting the dart onto it. And putting two wall tiles at the top end stops the dart escaping. But in this version it's really easy to race to the exit, only 5 steps.

This is pretty good - the river is as short as it can be (it only needs to be two spaces from one end), there's a nice long route to the exit so you can't run it, but the problem is the space you need to manipulate the box in the bottom left is also enough to rotate the child later on - it's more interesting for that puzzle to require going to the next room. Also the dart can escape again.

The final version. Box can't send dart to button, child must go to next room, narrow opening and extra water mean dart can't escape. It's 7 steps to race to the exit, which wasn't quite enough so I increased the dart speed a little (could have done that with some of the others too but it would have had to be very fast).

This one went through similar iterations. You can get it stuck by pushing the box over - it should be possible to anticipate this but everyone tries it anyway - so UNDO becomes necessary here. I added a message, detecting this and reminding about undo, so nobody would leave it like that. Good to introduce the concept that something can get irrevocably stuck because constant paranoia about trapping yourself is an interesting way to approach *MAGIC*.

This one was the hardest of the three, so awkward to rule out the other methods.

Ended up with two solutions, one of which needs the dart to both push and pull, the other is push-only. Since it's harder ideally it would come after the other two, but when I was arranging the map I couldn't find room to gate this while also having things fairly open and non-linear. I'm okay with that because maybe it's interesting to encounter an obstacle that requires concepts you don't have yet, so you can realise you don't and come back later - or maybe figure it all out at once like a pro.

The first couple of rooms in the mines were just meant to be reminders that you can push and pull, probably superfluous.

I really liked how in Engage to Jabberwock you'd often see passages that you can't reach yet, it's all laid out on a grid really cleverly, I was trying to get that same feeling here.

I like this one because there's a sequence of moves you can do which each feels like making progress but which take you around in a circle. Some players go around that circle several times before realising and stepping back. Also I like leaving the boxes organised like this, though you don't need to.

Tried to make this look intimidating with lots and lots of boxes, but it's actually completely straightforward.

This is about how pushing a box next to another is irreversible. I like that you can get the mushroom but then find yourself trapped.

This is the only (pre-*MAGIC*) puzzle that's actually hard. I kind of wanted to show yes I can do really hard puzzles if I want, that's not the point but yes I can. I mean this whole thing is basically game designer braggadocio, whatever. It's optional.

Anyway I think of the rows of boxes shifting back and forth as like pistons pumping, it has the feeling of operating heavy machinery.

And yeah this one can get stuck too, no way around that really, what's nice/cruel about it is it's not at all obvious when you do get stuck so you can waste a lot of time on it after that without realising. This is a warning about a way we often approach puzzles in videogames, pushing buttons and hoping to get through without bothering to think; here you can't trust that something is always possible and so thinking is mandatory. It's all about instilling that paranoia for when *MAGIC* comes and makes everything much worse. Maybe I should have included a room that looks much like all the others but actually starts unsolvable, to really get this across.

I found some pictures of earlier versions I guess.

This one's interesting because depending on which position you enter the room it can be a lot more difficult, you might have to go off the screen and come back to adjust the mimic's relative position (because it only copies you when you're on the same screen). I should have made more out of that.

This is the other puzzle that's a bit hard, but mostly just because it takes a lot of steps most of which you don't have to think about and the one you *do* have to think about doesn't look obviously different. It's like that Nethack thing where you're grinding through trivial enemies then suddenly you're facing death. This probably isn't interesting to solve but it was to set up.

The nice thing with the child is sometimes you have to return to a previous room to get her in the correct orientation to proceed. This tripped up some players pretty well because they assume that what looks like progress is progress (especially on the rooms that had been dart puzzles, because "I've already solved this room"); I like too how the first forest room is just a pleasant ramble going in but turns into a puzzle on the way out. Guess it's a bit like how once you get one face of a Rubik's cube you have to break it up to get further, but less interesting.
Apart from that I kind of used all the tricks on the right half of this screen already, maybe a bit hasty.

Finished up the pre-*MAGIC* section with a couple of puzzles that combine most of the elements introduced so far. They're not great but it seemed important to do combinations anyway.

The magician is rich with many mushrooms. You might think you're clever for stealing them then selling them back to him but he know's what's up, he's getting what he wants anyway.

I had a few people report *MAGIC* as a bug, figuring out its exact behaviour and letting me know, it's pretty much unplayable at this point because I have this glitch in the same place on every screen, really liked it before this happened, hope this'll help you track it down, looking forward to an update fixing this problem!

Lot of people didn't make it to *MAGIC* at all, that's cool with me; it feels special because it's not apparent on the surface. I'm happy with the game before that point too, it's just puzzles but they're decent ones. They're not hard but it's totally okay if they're not your thing.

Some of the rooms afflict you with *MAGIC* the first time you visit them. I felt this was necessary to introduce the mechanic before putting the player in charge, but maybe it's a bit hand-holdy. It's kind of unsatisfactory really, and way over-used, definitely one of the weakest points. The concept was like maybe it's something the magicians have done already just lying around and then it gets stuck to you? Anyway it meant I could plan around some positions, making sure they lined up with walls in convenient or inconvenient ways, have a few partially-constructed puzzles before going full chaos, that seemed useful at the time.

One of them erases the mother. I wanted a character to be erased for HORROR PURPOSES, it would have been nicer to have it be entirely the player's fault but I couldn't make that happen, probably I should have made more effort to predict them and set something up.

One tester went back to the start before going here, and picked up another piece of forced magic which overwrote the button so they couldn't get the key. I rearranged that room ("WAREHOUSE") to shift the forced magic down to prevent that happening, but it made its layout a bit clumsier (also easier to get stuck in, if the dart follows you up the ladder).

The forced *MAGIC* wall makes getting out harder; I thought this was pretty nice to have an unexpected obstacle appear like that. But it also means you can't get back in if you leave without getting the key, not ideal but pretty rare; I accept some probability of bad things happen.

It's interesting to have a *MAGIC* wall to deal with and you'd never make one yourself intentionally (which is really a weakness of the design - it'd be better to have reasons to want both).

Once you have *MAGIC* it doesn't allow for fixed puzzles, instead I just tried to make there be enough obstacles around in different coordinate positions that you'll run into some of them no matter what you've done. The mobile creatures especially are good at getting in your way. Also just tried to be really careful placing walls so that you can't open up everything at once. I had this map drawn on paper with the 9x9 grid counting how many rooms had a wall/mushroom/enemy in each position to make sure they were spread out well, can't find it now probably it's in Scotland somewhere. I remember there were some specific coordinates I got really angry at but I've forgotten which ones now.

At some point I realised I had a red key, score thing, magic door but NOT skeleton, so to carefully fit the authentic definition of game I added skeleton; this was a good addition because skeleton is very good at providing obstacle even with much magic.

The dart in this room is in a cute setup: a wheel. It constantly cycles the three boxes around and around (incidentally turning the switches on and off). By the time you reached this room you'd probably ruined everything anyway so you might not have seen it in action, it's just there as a novelty I guess, there's no purpose for it, I didn't find a way to fit it into a puzzle, it might have been a neat way to do a timer if this had stayed a Spacechem-like.

Spent lots of time trying to balance the economy, by adding just a few more mushrooms in walls or whatever. This started to feel more like balancing a strategy game than designing puzzles, because it didn't matter exactly where they were they just had to be spread out across different coordinates and gated by different walls, and there had to be enough of them to get through even if you made some mistakes but not so many it became trivial. The increasing price at the magicians helps control how it grows here, as you open up more of the world you have to explore further to find what you need. There are are several caches of many mushrooms: whichever you find first will supply ~3 *MAGIC* while the later ones might just give 1. Played it lots of times from the checkpoint trying different approaches, if I ran out of mushrooms I'd place a new one somewhere that was accessible with whatever I'd done differently that time. This was a whole bunch of work but I don't have a record of it (aside from the final game) because it was very fluid and intuitive, editing it as I played it. Got pretty sick of the game at this point, since even though it was a bit different with different choices it wasn't that different and it took a lot of replays to get it satisfactory.

At first I had both ladders in the same position to simplify the problem of designing levels, but then of course that made it very easy to erase them both and get stuck on one level, they had to be in different positions. You can still erase them both but it's much less likely.