Post puzzle ideas here.

All new ideas for the upcoming releases of ToME 4.x.x should be discussed here

Moderator: Moderator

Post Reply
Message
Author
Susramanian
Spiderkin
Posts: 454
Joined: Sat May 15, 2010 3:09 am

Post puzzle ideas here.

#1 Post by Susramanian »

A puzzle level is a level where some highly desirable thing (like the stairs down, for example) is in a room which denies the player access to it. We'll call this room Y. A very simple example would be Y hidden behind diggable rock. If the player can find Y (using Vision or whatever) and get himself there, the puzzle is solved.

A slightly less simple example might be stairs behind a sealed portcullis in Y. The goal is inaccessible until some number of tasks is completed in some other rooms, call them X1, X2, etc. Suppose the portcullis raises if the character pulls a lever in X. The location of X and Y is not important. Generate them like vaults, just tossing them wherever in the level, as long as they both make it in.

A moderate example: Y contains the stairs down, but they're locked behind a red portcullis. Scattered around the dungeon are rooms X1, X2, and X3. Each of them contains a lever and each room has either a red or blue floor, which is randomly chosen. Pulling the lever toggles the floor color. When the floors of rooms X1, X2, and X3 are all red, the red portcullis raises and the player can access the stairs. Note that solving this puzzle is not as simple as just pulling every lever you come across. (That's not a puzzle; that's a chore).

Plenty of complexity is possible with just levers and colors and portcullises, but that gets old. Let's introduce two new scrolls: vortex glyph and phase glyph. They both cause a glyph to be inscribed on an adjacent tile of your choice (or the tile you're standing on). The phase glyph casts phase door on anything that steps on it. The vortex glyph attracts anything that teleports near it; if you cast phase door while a vortex glyph is active and in range, you'll land exactly on the vortex glyph. Each of these glyphs disappears after a single use.

Here's a more complex example that uses No Teleport items from this post. Suppose we've got our stairs locked behind a blue portcullis in Y, and room X contains a pair of pressure plates. Stepping on a pressure plate causes one half of the floor to blink blue. Note that it just blinks blue in real time. Maybe it stays blue for a quarter of second or something. Each pressure plate is linked to one half of the room's floor. After some trial and error, the player discovers that dropping an item on a plate also causes it to blink the floor blue. Eventually the player decides that it's a good idea to somehow get both halves of the floor blue at the same time. The player inscribes a vortex glyph on plate A, walks over to plate B, and casts phase door. Any NT items in the player's inventory fall on plate B, activating it, and the player simultaneously appears on plate A (because of the vortex glyph), activating it. Bing! Both halves of the floor turn blue and stay that way. The portcullis in Y opens and the puzzle is solved.

Another moderate example, this time using the phase glyph. Y contains the stairs down, but they're behind a locked door with a big, obvious keyhole in it. The key is nowhere to be found, but X contains a mysterious box that has no apparent use. The key is in the box, and the key is an NT item. Inscribe a phase glyph on the box's tile and the box disappears, leaving the key behind. Take the key and unlock the door to the stairs in Y. Puzzle solved.

These puzzles are modular and can be mixed and matched to produce a virtually endless variety of puzzle levels... assuming we come up with a ton of interesting rooms X. I chose the floor/door color mechanic so that we have a way of letting the player know what they're supposed to do and how close they are to doing it. We don't want people just wandering around trying various combinations of levers and plates until they quit in frustration. Players see a chest behind a red grate, they know that red is the official Good Color for that level, and any floor they see they're going to try to turn red somehow.

Let's make things even more complex. A player explores a level, and sees two rooms with levers, one room with a mysterious red door, and one room with stairs behind a blue portcullis. Pulling the levers to turn the floors blue has no effect on the portcullis, but turning the floors red opens the mysterious red door, which turns out to be hiding... another lever! Pulling it toggles that room's floor between red and blue. Of course, we want it blue to access the stairs. So in this example we're using chained puzzles; X1 and X2 unlock Y1, and Y1 itself is a sort of room X for Y2.

So, generating random puzzle levels. We need a bunch of possible rooms X and rooms Y, but we also need templates for combining them. Coming up with templates is mostly a notation problem. I'll express them like this:

[Y: X1, X2]

A puzzle level designed using this template would generate one goal room (Y) and two puzzle rooms (X1 and X2). The goal room gets a random win condition assigned (Red or Blue in the examples above), and in order for the door/chest/portcullis/bridge in Y to activate, that same condition must be achieved in rooms X1 and X2 by the player. Whether all this involves pulling levers or stepping on pressure plates or some other thing is determined by the random selections of rooms X1 and X2. Maybe we should assign difficulties and bias the generator in favor of easier difficulties early in the game.

Another example:

[Y1: X1, X2, Y2]
[Y2: X3, X4]

This is a chained puzzle. Y contains the ultimate goal, which is accessible only by matching its condition to the ones in X1, X2, and Y2. But interacting with the condition of Y2 is only possible if you reach its lever/plate/whatever, which only happens when you match Y2's condition with X3 and X4.

I'll start out with some very simple rooms X and Y. All rooms X start with no floor color, so we don't have to worry about initial conditions screwing up our puzzle. The first lever pull or whatever picks a random color, and further pulls toggle the color between red and blue.

Rooms X:

Red/blue floor, lever in the corner toggles
Red/blue floor, lever in the corner toggles for 10 game turns
Red/blue floor, lever in the corner opens trap door under player leading to pit full of crocodiles. Ha ha. Fake puzzle room!
Red/blue floor, pressure plate toggles color while an object, person, or monster is on the plate
Red/blue floor, two pressure plates. Each blinks one half of the floor red.
Red/blue floor, two pressure plates. Each blinks one half of the floor blue.
(note that these last two might be bad, since they can only be one color. If you have a red door in room Y, an only-blue blinking plate room would make the puzzle impossible. See below for possibly better rooms like this.)
Red/blue floor, two pressure plates, one lever. Each plate blinks one half of the floor red if the lever is in one position, blue if the lever is in another position.
Red/blue floor, two pressure plates to the left, two to the right. One of the left plates blinks the floor blue, one blinks it red. Same with the ones on the right.
Red/blue floor, pressure plate that requires huge amount of pressure to activate. (More than the player will ever be able to apply). Slow, reanimating iron golem generated in the room. Killing it only keeps it down for X game turns, then it gets up and comes after the player again. It refuses to leave the room. The player needs to lure it on the pressure plate.
Red/blue floor, locked closet in one wall. Indestructible box containing NT key on the floor. Lever to toggle floor color in the closet. Player needs to phase the box, get the key, unlock the closet, and use the lever in the closet to turn the floor the appropriate color.

Rooms Y:

Stairs blocked by red/blue door. (Doors block line of sight).
Stairs blocked by red/blue portcullis. (Portcullises don't block line of sight).
Chest blocked by red/blue door.
Chest blocked by red/blue portcullis.

Here's a more complex room Y that doesn't quite work like the ones above:

Code: Select all

#####
#.>.#
#...#
#...####
#     1#
#     2#
#     3#
#......#
##+#####
The blank space is bottomless pit. The player needs to build a bridge using the 1, 2, and 3 to the right, which represent floating stepping stones, each of them either red or blue. Let's say 1 is a red stepping stone. Then we need to turn the floor of X1 red, and 1 slides all the way to the left. Same idea with 2 and 3. When they're all slid over to the left, we'll have a bridge to access the >. This room would require a special puzzle template, since it needs three rooms X. Also, its win condition isn't binary like the earlier example. The colors you need depend on the colors of the randomly generated stepping stones. This example also raises the question of whether we should use some cue to tell the player which room goes with which stepping stone. It doesn't really matter here, but it could in other examples.

Maybe the templates themselves could be organized by category. Binary puzzle templates would be like the earlier examples, with a room Y that has a red door so you need to turn all the room X floors red. The stepping stone room Y would not be available to templates in the binary category.

Okay, I need to stop before I write a whole novel on this subject.

Add ideas! Don't feel restricted to the special modular puzzles I've been describing, but keep in mind that a random puzzle generator will quickly become an immensely complex logical problem if we don't keep things fairly modular and consistent. Coming up with a completely different scheme of puzzle besides the red/blue matching would also be very good, especially if you describe how to assemble the pieces randomly into working puzzles.
Last edited by Susramanian on Tue Nov 09, 2010 11:10 pm, edited 1 time in total.

Susramanian
Spiderkin
Posts: 454
Joined: Sat May 15, 2010 3:09 am

Re: Post puzzle ideas here.

#2 Post by Susramanian »

Okay, elaborating further on the organization of a random puzzle generator. Puzzles should be sorted by type. The various types draw from different pools of X rooms and Y rooms. Here are three types, with some thoughts on chaining them together at the end.


Binary

Binary puzzles have as their ultimate goal a single Y that indicates a color, and various X rooms that are basically functions which return a color. When the player forces all X rooms to return the color required by Y, the puzzle is solved. What happens when the puzzle is solved depends on the exact design of Y, but in all cases of all puzzle types (binary and those listed below), the player simply gains access to a portion of Y that was previously inaccessible. This seems inflexible, but some consistency is required if we're going to use these rooms as building blocks of random puzzles. Maybe I'll think of other types later.

What the player finds in that sealed-off portion of the room can be controlled by puzzle-generating parameters. The same binary puzzle could be generated in two different dungeons, but in one dungeon the unlocked area of Y contains the stairs to the next level, and in the other dungeon it contains a chest. Then we don't have to come up with different versions of the same Y room with variable contents in the sealed-off area.

I called this puzzle type binary because my original vision of the rooms involved two colors, red and blue. There's nothing special about only having two colors, other than that it works more elegantly with levers. But we could easily have a character yanking away at a lever, cycling the floor through ten different colors.

Pattern Matching

These puzzles have as their ultimate goal a single Y that presents the player with a sequence of up to n objects, each with a color. For each of those objects, an associated X room is generated somewhere on the level. Matching the color of Xi to the color of object i causes object i to do something desirable. Once this is done for all objects, the way opens to a previously inaccessible area. The X rooms used are drawn from the same pool used by binary puzzles. In my previous post, the final example with the colored stepping stones is a pattern matching puzzle.

Each individual design of a Pattern Matching Y will have a maximum for n. When the Pattern Matching puzzle is generated randomly, however, values less than n can be used. Suppose that a Y room has a series of five locked doors leading to the restricted area. Upon generation, each door is randomly red, blue... or open. If two doors are red, one is blue, and two are open, then the puzzle requires only three X rooms, and thus only three are generated.

After some playtesting, we might decide that it's a good idea to indicate which room goes with each object in the Y room, but that would complicate things and is hopefully unnecessary. A little trial and error never hurt anybody.

Keys and Keyholes

These puzzles have as their ultimate goal a room Y which contains locked doors of various colors, each with an obvious keyhole. For each locked door, a room X is generated somewhere on the level. These rooms are NOT the same as the X rooms used in binary and pattern matching puzzles. Those returned colors, but these return colored keys. Unlocking all of the doors allows access to a previously inaccessible area.

Like pattern matching puzzles, not all the potential doors in a given Y have to be locked. A Y with a capacity for five doors might only be generated with two of them locked, so only two X rooms would need to be generated.


Chaining puzzles together

Suppose the RNG decides to make a key and keyhole puzzle. It generates one with three doors, but instead of generating three key-producing X rooms, it only generates two of them... along with an entire binary puzzle that rewards the player with a necessary key. In general, an entire puzzle can be substituted for an X in another puzzle.

This could easily get confusing. Chaining two binary puzzles, for example, would result in two Y rooms and a bunch of X rooms, some of which are used for one Y and some of which are used for the other. Should we make it apparent to the player which go with which? In some cases. Also note that X rooms can be used by multiple Y rooms.

In my previous post, I used this template to illustrate the chained puzzle:

[Y1: X1, X2, Y2]
[Y2: X3, X4]

X3 and X4 are needed to unlock Y2, while X1, X2, and Y2 are needed to unlock Y1. Having X1 and X2 use the blue/red color scheme while having X3 and X4 use a green/yellow color scheme could avoid much confusion. But consider this chained puzzle:

[Y1: X1, X2, Y2, X3, X4]
[Y2: X3, X4]

This would result in the exact same rooms being generated, but the X rooms for Y2 (X3 and X4) are also X rooms for Y1. Thus all rooms have the red/blue color scheme. It shouldn't matter whether Y1 and Y2 require the same color, either. Suppose Y2 requires X3 and X4 to be red, yet Y1 requires X1, X2, Y2, X3, and X4 to be blue. There seems to be a conflict there, but there isn't really. First, turn X3 and X4 red. This unlocks the special area in Y2, which contains a lever. Flip it until Y2 turns blue. Then go back and turn X3 and X4 blue, as well as X1 and X2. Bing! Y1 unlocks.

So, there we have three puzzle types. Each type should have a bunch of templates. When T4 decides to generate a puzzle, it first picks a type, then an appropriate template for that type, and then a Y room and X rooms from the appropriate pool for that template. Then T4 throws them randomly around the level along with the other vaults and normal rooms. The real meat is the X rooms, where the player will spend the largest amount of time staring at the screen and scratching his head. We need lots and lots of X rooms.

Next post: where all this belongs.

Susramanian
Spiderkin
Posts: 454
Joined: Sat May 15, 2010 3:09 am

Re: Post puzzle ideas here.

#3 Post by Susramanian »

I meant to make this post about where these puzzles belong (hint: not where they'd be mandatory), but I decided to make some examples of X rooms. These are all rooms to be used by binary and pattern matching puzzles. They involve only levers; there's no NT-item weirdness, pressure plates, or anything else. I'll make a bunch of those later.

Let me describe how these rooms work.

All rooms start with no color. All levers have a left position and a right position. The initial positions of the levers are random. Pulling levers toggles colors (red/blue) in the lever's domain. In the special case of colorlessness (the initial state of all room tiles), the toggle function turns colorlessness to red if the lever is pushed left to right (\ -> /) and turns colorlessness to blue if the lever is pushed right to left (/ -> \). All levers are indistinguishable. Though all rooms below are the same size and shape, the only real requirement is that the rooms are rectangular and that the game be capable of breaking them intelligently into halves.

Lever types:

0: no effect
1: toggle whole room colors
2: toggle column colors
3: toggle row color
4: toggle left half of room color
5: toggle right half of room color
6: toggle top half of room color
7: toggle bottom half of room color
8: remove all color from room (reset button!)
9: teleport player into hidden monster nest

Terrain key:

#: Hard wall
%: Diggable wall
X: Place lever 9 teleports you to
m: monster

Rooms that teach the player the various lever types:

Code: Select all

###########
#1........#
#.........#
#.........#
#.........#
#.........#
#+#########
Note: It may take up to two pulls of the lever to get the room the desired color, since the starting position of the lever is random.

###########
#.........#
#.........#
#4.......5#
#.........#
#.........#
#+#########
Note: The levers might need different numbers of pulls to match up the halves of the room in the desired color.

###########
#.6.......#
#.........#
#.........#
#.........#
#......7..#
#+#########

###########
#........3#
#........3#
#........3#
#........3#
#........3#
#+#########
Note: One lever per row, so no overlap. Flip each one once or twice as needed.

###########
#2....2...#
#...2..2..#
#.22.8....#
#........2#
#....2....#
#+#########
Note: One lever per column, so no overlap. The reset lever in the middle looks just like the other levers, and will likely annoy a player the first time it's pulled. But at least they'll learn about reset levers.

Rooms that start messing with the player:

Code: Select all

##############
#........3#X.#
#3........#mm#
#....3...9#mm#
#3........#mm#
#........3%mm#
#+############
Note: It's the familiar one-lever-per-row room, only what looks like the lever for coloring the middle row actually ports the player into a room full of monsters. Awesome.

###########
#....6....#
#.........#
#4...8...5#
#.........#
#....7....#
#+#########
Note: can easily be completed by simply using opposing levers. There's no way to know what a lever does without pulling it, though. Random lever pullings will turn this room into a plaid mess, so there's a reset lever.

###########
#........3#
#........3#
#....8...3#
#........3#
#3.......4#
###########
Note: pulling the levers down the row on the right goes great until you hit that last one, which toggles the whole left half of the room. You need to skip 4 and hit that bottom left 3 instead. 8 is there for the inevitable screwup.

###########
#0......%1#
#.......%%#
#.........#
#.........#
#0.......0#
#+#########
Note: the visible levers do nothing. You need to dig your way to 1.

###########
#........3#
#........3#
#....8%..3#
#........3#
#........3#
#+#########
Note: the pillar in the middle blocks the coloring of the middle row by its lever. The player figures this out the hard way, digs it out, resets, and goes down the column of 3s again.

###########
#....4....#
#.........#
#6...1...8#
#.........#
#....7....#
#+#########
Note: this one can be completed immediately by pulling the 1 in the middle, but the player is used to that being the reset lever, so they don't hit it first. They probably try opposing levers, get a plaid mess, try to reset with 1, which instead inverts the plaid. Oh God. Eventually they find the reset and solve it easily after that.
Let's add a twist. How about later in the game the colors applied by levers only last X game turns, until the whole room is one color, at which point the color sticks and the clock stops. This forces the player to optimize their solution to the puzzle. It also allows us to include puzzles in which previously the player could color himself into an unsolvable mess, like this:

Code: Select all

###########
#....0....#
#.........#
#4...0...6#
#.........#
#....7....#
#+#########
Note: With these levers, getting into a situation where three quarters of the room is one color and one quarter is the other color is impossible to get out of. You need a reset, whether by lever or colors disappearing after X turns.
I can't possibly be alone in thinking that these look fun. Using the rules above, design your own room and post it!

Mithril
Archmage
Posts: 327
Joined: Fri Oct 01, 2010 5:43 pm

Re: Post puzzle ideas here.

#4 Post by Mithril »

Like for lore, there are players who love puzzle game, but there are others who hate them. Not much of a middle ground here, I think. People playing roguelikes expect to fight explore and fight monsters. Not to solve puzzles or read long lore texts. So personally I think that puzzle, like lore, should be optional, and be possible to avoid completely for those not interested. Maybe an optional puzzle dungeon that can be avoided completely without bad effects by those hating puzzle games.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Post puzzle ideas here.

#5 Post by darkgod »

Some great ideas sus!

And yes mithril, just like lore this should be avoidable (lore is right right now, right ?).

Maybe you could encouter wizard towers randomly that had such puzzles, or random dungeons, either linked from the worldmap or from some zones.
Like a vault but it would take you to a special zone instead ?
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Post puzzle ideas here.

#6 Post by Grey »

I have to agree with Mithril. Maybe one optional dungeon, but no more. I especially find distasteful all the notions of coloured levers and rooms. This is not a Popcap game...
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Susramanian
Spiderkin
Posts: 454
Joined: Sat May 15, 2010 3:09 am

Re: Post puzzle ideas here.

#7 Post by Susramanian »

Susramanian wrote:I meant to make this post about where these puzzles belong (hint: not where they'd be mandatory), but I decided to make some examples of X rooms.
Guess I should have talked about where they belong first after all. My thought is perpendicular dungeons-- dungeons within dungeons, totally optional, very nasty and only for players who are really looking for a hard time. I'll post more on perpendicular dungeons later. Going to work soon.

overtrix
Archmage
Posts: 412
Joined: Fri Jan 17, 2003 9:33 am
Location: Les Corbières sauvages

Re: Post puzzle ideas here.

#8 Post by overtrix »

Sounds like a great module theme, then could diverge as far from the roguelike norm as desired with not a care in the world. It's even a good 'community project' with folk submitting lots of ideas for a maintainer to sieve through and put into practice, open-ended yet they could keep everything linked with some kind of thread.

Susramanian
Spiderkin
Posts: 454
Joined: Sat May 15, 2010 3:09 am

Re: Post puzzle ideas here.

#9 Post by Susramanian »

This is quickly turning into a gigantic math problem, which is probably why I can't let it go :)

I started to wonder how to get more variety in the pool of X rooms. Taking a simple room like this...

Code: Select all

######
#2222#
#....#
#....#
#....#
#+####
...and rotating it 90 degrees produces this:

Code: Select all

######
+...2#
#...2#
#...2#
#...2#
######
This is an unsolvable room, since those 2s only color columns. So making many versions of existing rooms isn't as simple as it is with vaults. Some of the X rooms will probably have to be custom-built like I'm doing now, but some could be generated with random dimensions and orientations. To do this, the game will have to be able to consider a room in various ways; it will have to recognize left and right halves, top and bottom halves, all four quadrants, rows and columns, and tiles that require coloring and those that don't. The simplest way I can think of setting up rooms, then, is as matrices. Force the generation of even numbers for the rows and columns, so the halves and quadrants aren't awkward.

A very simple algorithm for generating a random lever puzzle room is as follows:

1) Generate an x by y room, where x and y are even numbers.
2) Pick a solvable subset* of lever types and randomly place them in the room.
3) Pick a random subset of lever types and randomly place them in the room.
4) Either make the levers timed (say they expire after 2x + 2y turns) or include a reset lever.

* Solvable subsets include the sets {4,5} (left and right halves), {6,7} (top and bottom halves), and {a,b,c,d} (all four quadrants). There are a great many other solvable subsets.

Puzzles generated by this algorithm will be messy-- a bunch of random levers thrown into a rectangular room. The challenge is to find a set of levers that solves the room. This will get old fast, so shouldn't be used much, if at all. It serves merely as an example of how random X rooms can be generated easily.

A better system is to take existing custom-built rooms and rotate them clockwise in multiples of 90 degrees. A set of simple rules could be made to transform lever types appropriately. Taking an X room and rotating it 90 degrees to produce a new X room forces the reclassification of levers as given below:

2 -> 3
3 -> 2
4 -> 6
5 -> 7
6 -> 5
7 -> 4
a -> d
b -> a
c -> b
d -> c

Levers 1, 8, and 9 work however the room is oriented. If the game decides to rotate the room 270 degrees, it just applies the transformations in the above table three times.

Example. Take this room...

Code: Select all

############
#3%........##
##########.3#
###3.......##
###3.......#
###........#
###........#
###........#
###...7....#
############
...and rotate it clockwise 90 degrees:

Code: Select all

	
##########	
########2#
########%#
#....22#.#
#......#.#
#......#.#
#4.....#.#
#......#.#
#......#.#
#......#.#
#........#
#######2##
      ###
Rotating custom built rooms is a good start, but even better would be getting custom-feeling rooms from a simple set of parameters. For example, these two rooms are basically identical puzzles, but with different dimensions:

Code: Select all

######
#b..a#
#....#
#....#
#c..d#
##+###

################
#b............a#
#c............d#
#######+########
We definitely want our puzzle rooms coming in different sizes and shapes, but we really don't want to have to define a vault for each configuration of basically the same room. The above room wouldn't be hard to generate in multiple sizes and shapes. This one would be somewhat harder:

Code: Select all

############
#b....,,,,a#
#.....,,,,,#
#....8,,,,,#
#3,,,,%....#
#3,,,,%....#
#3,,,,%....#
#####+######
(I've used commas as well as periods just to help illustrate the quadrants.)

Here's where my coding ignorance really kills me. I'll just have to describe it in terms of a matrix. First, pick random numbers m and n between 3 and 6. Create a 2m by 2n matrix M (we're forcing the room to be evenly divisible into quarters). Every element of the matrix M has two values associated with it, a floor color and a terrain item. The floor color is either R, B, or C for red, blue, or colorless. The terrain type is things like levers, hard walls, diggable walls, etc. Represent each element of the matrix as an ordered pair. So for the specific version of this room illustrated above, m22 is the element in the second row, second column, which is a lever b on (to start with) a colorless square. So m22 = (C, b). Similarly, m46 = (C,8) to start with.

Once we have our 2m by 2n matrix, input the values of the elements (each of which is an ordered pair).

Code: Select all

For i = 2 to 2m-1 and j = 2 to 2n-1, set the first coordinate of mij to C
For j = 1 and j = 2n, do this:
	For i = 1 to 2m, set the second coordinate of mij to # (This builds the east and west walls)
For j = 2 to 2n-1, do this:
	For i = 1 and i = 2m, set the second coordinate of mij to # (This finishes the north and south wall)
For i = 2m and j = n, set the second coordinate of mij to +. (This puts a door slightly off center in the south wall)

So far we have a simple rectangular room of colorless floor surrounded by hard walls with a door in the south wall. All puzzle rooms get this treatment. Now put in the puzzley bits specific to this puzzle:

For i = 2 and j = 2, set the second coordinate of mij to b 
For i = 2 and j = 2n-1, set the second coordinate of mij to a 
For i = m and j = n, set the second coordinate of mij to 8 
For i = 2 and j = 2, set the second coordinate of mij to b
For i = m+1 to 2m-1, do this:
	For j = 2, set the second coordinate of mij to 3
For i = m+1 to 2m-1, do this:
	For j = n+1, set the second coordinate of mij to %
Unless I mixed something up, these instructions should, given a random m and n, produce a room like the one above in various dimensions. For example, if m = 3 and n = 5, it should create this:

Code: Select all

##########
#b......a#
#...8....#
#2...%...#
#2...%...#
####+#####
Ideally, we should be able to draw a puzzle room like the one above and format it in such a way that when the game reads it in, the game will be able to generate the same room in random dimensions. That way we don't have to be able to code to come up with a generalizable room. For example, this definition of a room...

Code: Select all

[[####~#  #~####]]
[[#b..~.  .~..a#]]
[[#...~.  .~...#]]
[[#...~.  .~...#]]
[[~~~~~~  ~~~~~#]]
[[#...~8  .~...#]]
[[              ]]
[[              ]]
[[#2..~.  %~...#]]
[[~~~~~~  ~~~~~~]]
[[#2..~.  %~...#]]
[[#2..~.  %~...#]]
[[#2..~.  %~...#]]
[[####~+  #~####]]
...might tell the game to generate a room with random dimensions that:
-Has a 'b' lever in the upper left corner of the northwest quadrant
-Has an 'a' lever in the upper right corner of the northeast quadrant
-Has an '8' lever in the bottom right corner of the northwest quadrant.
-Starting in the lower left corner of the southwest quadrant, has a column of '2' levers that continues to the upper edge of the southwest quadrant.
-Starting on the leftmost edge of the southeast quadrant against the wall, has a column of diggable walls '%' that continues to the upper edge of the southeast quadrant.

This format wouldn't work for all possible puzzle room layouts, but it would work for a lot of them. So now we can resize rooms as well as rotate them. We're a couple steps closer to random puzzle generation!

Susramanian
Spiderkin
Posts: 454
Joined: Sat May 15, 2010 3:09 am

Re: Post puzzle ideas here.

#10 Post by Susramanian »

More X rooms. Some of these use levers that toggle colors in one quadrant of the room. Key for those levers:

a: toggles NE quadrant
b: toggles NW quadrant
c: toggles SW quadrant
d: toggles SE quadrant

Some of these have commas in addition to periods to denote floor tiles. I started using both to help distinguish quadrants visually.

Code: Select all

###########
#b.......a#
#.........#
#.........#
#.........#
#c.......d#
#####+#####
Note: intro to quadrant toggles

###########
#22222....#
#.........#
######8..5#
#.........#
#....7....#
#+#########
Note: Strangely, you can paint yourself into a corner on this one. Need a reset.

###########
#3...#....#
#3...#....#
#####....5#
#.........#
#....7...8#
#+#########


###########
#6.......3#
#.#######.#
#......8#.#
#.#######.#
#2#7.....3#
#####+#####
Note: only use 6 and 7


############
#23.......8#
#..23......#
#....23....#
#......23..#
#........23#
#+##########
Note: ignore all 2s


+##########
#........3#
#.#########
#.#########
#.#########
#2#########
###########
Note: timed colorings. Not possible otherwise. 


###########
#........3##
#.########+#
#.#22222..##
#.#.......#
#2#.....22#
##+########
 ###
Note: timed colorings. Not possible otherwise. 

###########
#........a#
#.........#
#4...8....#
#.........#
#....7....#
#+#########
Note: needs a reset, as you can't quite go from all blue to all red.

###########
#3...#8..a#
#3...#....+
#3...+....#
#....#...3#
#c...#...3#
###########
Note: easy if you can close doors, harder if you can't.

###########
#2...8...7#
#3.......2#
#2.......6#
#4.......2#
#5.......2#
#+#########
Lots of winning combinations, lots of trial and error and resets. 


###########
#3...#...a#
#3...#....#
#3....#####
#........8#
#c...22222#
####+######
Note: success depends on the initial position of lever a

##############
#....6...a#X.#
#.........#mm#
#....9...5#mm#
#.........#mm#
#c........%mm#
#####+########
Note: The sealed-off area doesn't need coloring. This is always winnable without a reset, so the traditional reset lever has been replaced with a monster trap lever. Ha ha.

############
#b....,,,,a#
#.....,,,,,#
#....8,,,,,#
#,,,,,%....#
#,,,,,%....#
#7,,,,%....#
#####+######
Note: Need to dig out the intruding wall

############
#.....,,,,,#
#.....,,,,,#
#4....,,,,5#
#,,,,,.....#
#,,,,,.....#
#,,,,,.....#
######+#####
Note: extremely short timer. Need aimed phase.


############
#.....######
#.....######
#.....######
#4,,,,.....#
#,,,,,.....#
#,,,,7.....#
######+#####
Timed, otherwise impossible

############
#3....,,,,,+
#.....######
#4....######
#,,,,,######
#,,,,,######
#3,,,,.....+
######+#####
Timed, otherwise impossible.

############
#3....,,,,,#
#.....######
#4....#3,,,%
#,,,,,######
#3,,,,.....#
######+#####
Timed, otherwise impossible. Probably requires aimed phase, too.


###########
#......%22#
#......%mm#
#....1.%mm#
#......%mm#
#......%mm#
#####+#####
Note: Timed. Those spaces under the monsters need coloring in this one, so the player has to dig the wall out and deal with the monsters.


##########
#22222222#
#........#
#........#
#........#
#........#
#........#
#........#
#........#
##########
Note: Timed very tightly. Say each color lasts 2n + 2 turns, where n is the width
of the room (and thus the number of levers). Since the levers start off in random
positions, each will take an average of 1.5 turns to get the correct color, meaning
it usually can't be done on the first try. First flip all levers to the opposite side
of the color you want, then let them expire. Then move along the row and pull them.
Each takes only one turn now.


############
#3%........##
##########.3#
###3.......##
###3.......#
###........#
###........#
###........#
###...7....#
############
Note: There's no overlap, so no need for a reset. The challenge is finding the
top left lever.


Susramanian
Spiderkin
Posts: 454
Joined: Sat May 15, 2010 3:09 am

Re: Post puzzle ideas here.

#11 Post by Susramanian »

Grey, you make a very good point about this not being Popcap. I agree, filling the deadly dungeon with cheerful primary colors seems way off. When these are actually implemented, I would suggest charging the floor with various elemental damage types. Instead of red and blue, a room might be fire and ice, or it might be acid and lightning. The doors in the Y rooms could be coated with the desired element. Finding the passage to the next level barred by a door enveloped in magical roaring flames is way cooler than having the way blocked by a bright red door. In addition to fitting in more thematically, the elemental damage would add a whole new dimension to the puzzles; you'll be trying to solve them while walking as much as possible on the remaining colorless (element-less) squares.

Susramanian
Spiderkin
Posts: 454
Joined: Sat May 15, 2010 3:09 am

Re: Post puzzle ideas here.

#12 Post by Susramanian »

Here are a bunch of pressure plate puzzle rooms. All of these can be configured for easy rotating and resizing.

The color regions of the plates are the same as levers:

1: whole room
2: column
3: row
4: left half
5: right half
6: top half
7: bottom half
8: reset
9: upset player
0: nothing
a: NE quadrant
b: NW quadrant
c: SW quadrant
d: SE quadrant

Some new conventions for pressure plate puzzles:

m: indestructible wimpy monster
M: indestructible giant monster
P: ball-and-chain giant
*: massive iron box

Indestructible means that they come back to life X turns after being killed, much like those bone turtles in Super Mario Brothers. This is because they're important elements of the puzzle, so we don't want the player permanently butchering their only hope of success. Ball-and-chain giants are really big, slow guys shackled to a massive iron ball which happens to be a NT item. When teleported, they're parted from the ball and chain, and always make a beeline back to the ball and chain to put it back on. Never mind why! Massive iron boxes are just that. They're really heavy. Sometimes they contain surprises, but that's for later.

Plates come in three sensitivities: light, medium, and heavy. Light plates are triggered by any object placed on them. Medium plates are only triggered by the player, monsters, and heavier objects. Heavy plates are triggered only by massive monsters and iron boxes

Plates are single-color, unlike levers. They apply colors with no toggling, but only for as long as the required pressure is applied. In almost all the puzzles below, the plates come in pairs. In my nice text document, these are actually colored (one red, one blue). Since displaying text as code is the only way to produce fixed width characters on the forums, I can't color code here. So any time you see 22 or 77 or the like below, the left one is blue and the right one is red. If the numbers are vertically stacked, then the top one is blue and the bottom is red. This is true for everything below unless otherwise mentioned.

Finally, plates can sometimes use durations. Though an item remains on the plate, depressing it, the plate's applied color fades from the region after X turns. A special case of this is blinking plates which operate in real time. They apply the appropriate color to their region for only an instant, requiring the player to figure out ways to trigger multiple plates simultaneously in order to completely color the room.

In a few of the puzzles below, I mention a phasing/returning combo. Consider two pressure plate tiles A and B. Put a rune of phasing on A and a rune of returning on B. If you step on A, this simultaneously depresses the plate and ports you to B, which immediately depresses B. All this happens in one turn, so it's a way for the player to simultaneously activate two plates without the help of a monster.

Code: Select all

##########
#,,,,....#
#,,,,....#
#,,,,....#
#,,,11...#
#....,,,,#
#....,,,,#
#....,,,,#
#....,,,,#
##########
Note: teaches the player how pressure plates work. All plates are light.


############
#.....,,,,,#
#.....,,,,,#
#4....,,,,5#
#4,,,,....5#
#,,,,,.....#
#,,,,,.....#
######+#####
Note: teaches player that they'll need to get used to using their loot as paper weights. All plates are light.

############
#.....,,,%,#
#.....,,,%,#
#4....,,,%5#
#4,,,,...%5#
#,,,,,...%.#
#,,,,,...%.#
######+#####
Player needs to realize that there's more to be found. Clue, besides the obvious, is that the halfway point of the room is offcenter in the visible part, implying more to the east. All plates are light.

############
#.....,,,,,#
#.....,,,,,#
#....66,,,,#
#,,,,77....#
#,,,,,...*.#
#,,,,,.....#
######+#####
All plates are light. Teaches player that they still can't color tiles under boxes. The box has to go.

############
#.....,,,,,#
#.....,,,,,#
#....66,,,,#
#,,,,77....#
#,,,,,...*.#
#,,,,,.....#
######+#####
Note: all plates are medium. Moving * to plate activates plate. Plate tiles, unlike lever tiles, don't need to be colored themselves, so the * is okay as long as it's on a plate and not a tile that needs coloring.

############
#.....,,,,,#
#.....,,,,,#
#....66,,,,#
#,,,,77....#
#,m,,,.....#
#,,,,,.....#
######+#####
Note: all plates are medium. Need the m to complete the puzzle

############
#.....,,,,,#
#.....,,,,,#
#....45,,,,#
#,,,,45....#
#,M,,,...*.#
#,,,,,.....#
######+#####
Note: all plates are heavy. Need the M and the * to complete the puzzle

############
#bb...,,,aa#
#.....,,,,,#
#.....,,,,,#
#,,,,,.....#
#,,,,,.....#
#cc,,,...dd#
######+#####
All but one pair of plates is light. The player will have to stand on the one that isn't.

############
#bb...,,,aa#
#.....,,,,,#
#.....,,,,,#
#,,,,,.....#
#,,,,,.....#
#cc,,,...dd#
######+#####
Light plates, but one set is a blinking set, so it has to come last.

############
#bb...,,,aa#
#.....,,,,,#
#.....,,,,,#
#,,,,,.....#
#,,,,,.....#
#cc,,,...dd#
######+#####
Light plates. b and d plates are timed with barely enough time to walk between them, so they have to come last.

############
#bb...,,,aa#
#.....,,,,,#
#.....,,,,,#
#,,,,,.....#
#,,,,,.....#
#cc,,,...dd#
######+#####
Light plates. b and d plates are timed tightly, and c blinks. Need phasing/returning combo

############
#....m,,,,,#
#.....,,,,,#
#...4.,5,,,#
#,,,4,.5...#
#,,,,,.....#
#,,,,,.....#
######+#####
All plates are light and blink. Need carefully-timed monster luring or NT item trickery

############
#.....m,,,,#
#.....,,,,,#
#4....,,,,5#
#4,,,,....5#
#,,,,,.....#
#,,,,,.....#
######+#####
All plates are light and blink. That m is going to be almost useless because of the plates being against the walls. Need NT item trickery or maybe a phasing/returning rune combination.

############
#2..3.2,,,,#
#..2..,3,,,#
#.2...3,,,2#
#,3,,2.....#
#,,,,,.22.3#
#3,,2,...2.#
######+#####
All plates light. One blue per column (levers '2'), one red per row (levers '3').

############
#2..3.2,,,,#
#..2..,3,,,#
#.2...3,,,2#
#,3,,2.....#
#,,,,,.22.3#
#3,,2,...2.#
######+#####
Same as above, but one 2 and one 3 is medium. This is going to be a pain, as the wandering m is going to be triggering plates and screwing up your coloring.

############
#2..3.2,,,m#
#..2..,3,,,#
#.2...3,,,2#
#,3,,2.....#
#,,,,,.22.3#
#3,,2,...2.#
######+#####
This time, two 2s and two 3s are medium. That means you'll need to lure the wandering m to the right spot without him screwing up your coloring.

############
#.....,,,,,#
#.bb.*M,aa,#
#.....,,,,,#
#,,,,,.....#
#,cc,,..dd.#
#,,,,,.....#
######+#####
All plates are heavy. One gets a *, one the M, and the remaining pair needs a phasing/returning combo.

############
#.....,,,,,#
#.....,,,,,#
#....45,,,,#
#,,,,45....#
#,P,,,.....#
#,,,,,.....#
######+#####
All plates are heavy. Need to port the P to part it from its ball and chain. Need to get the ball and chain on one plate and the P on the other.

############
#....66,,,,#
#.m...,,,*,#
#.....,,,,,#
#22,,,.*...#
#22,,,.....#
#22,,,...dd#
######+#####
All heavy. Need to do a phasing/returning combo to get the last two.

############
#.....,,,,,#
#.bb..,,aa,#
#....*,,,,,#
#,,,,,.....#
#,cc,,..dd.#
#,,,,,.....#
######+#####
Downright unfair. These are all medium, so you need a triple phase/return combo, which is only possible if you use both rods and scrolls of phasing/returning.
There are a lot more pressure plate puzzle rooms coming, with new puzzle elements. Monster trap pressure plates (9), for example. Those will never get old. Also sealed off portions of the room, NT items, color durations, and more. Like most of these, they'll be configurable as far as orientation and dimension.

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Post puzzle ideas here.

#13 Post by Grey »

Susramanian wrote:Grey, you make a very good point about this not being Popcap. I agree, filling the deadly dungeon with cheerful primary colors seems way off. When these are actually implemented, I would suggest charging the floor with various elemental damage types. Instead of red and blue, a room might be fire and ice, or it might be acid and lightning. The doors in the Y rooms could be coated with the desired element. Finding the passage to the next level barred by a door enveloped in magical roaring flames is way cooler than having the way blocked by a bright red door. In addition to fitting in more thematically, the elemental damage would add a whole new dimension to the puzzles; you'll be trying to solve them while walking as much as possible on the remaining colorless (element-less) squares.
Yeah, that sounds cool, and much more in theme with the game.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Post Reply