Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Dwarven Minesweeper  (Read 2902 times)

Angry Bob

  • Bay Watcher
  • Prone to catastrophic apathy
    • View Profile
Dwarven Minesweeper
« on: September 04, 2011, 10:40:22 pm »

Since I don't want to hijack the thread named [spoilers] Minesweeper, I'll put my idea here. Basically, I'll design and construct a working game of minesweeper within a fort, with its own dwarfy variations. Once completed and test-driven, I'll upload it for other forumgoers to try out.

I'm building it in an existing fort, just because the mass-production capability is already there.

I've got the basic idea down:

A room full of levers. Pulling a lever causes a hatch above it to dispense something.
Warning numbers could be a mix of animals and items of furniture, each designated as a particular number("this lever has X mines next to it"). An alpaca(or alpaca corpse, if it takes that long) might indicate "1" and so on.
The mines themselves could simply dispense magma, but I could include other things. Perhaps a fully-armed goblin prisoner or an untamed aggressive animal. Most likely a goblin, just because it won't die of starvation. More creatively, the entire room could be lined with pressure plates responding to magma, so when one dwarf pulls the wrong lever, not only does he or she die, but the spear traps scattered throughout the high-traffic tunnels activate, the farm area floods, and the magma tap in the break room turns on.

I expect slow going to begin with, since the fort I'm using is running at fairly low FPS and I need an assload of hatches and mechanisms, and I fear my laptop overheating, but if it cools down sufficiently where I am, we should see rapid progress. What this thread is for at this point is just to accumulate design suggestions and ego-stroking.

tl;dr: I'm building dwarven minesweeper. Supply suggestions for design and application.

Progress thus far, will be updated as various stages are completed:

Ordered the construction of a truly staggering quantity of hatches and mechanisms. My "board" is 11x11, and I'll need three mechanisms for each square, not including other related miscellanea. So, a lot of mechanisms.

Excavated everything I'll need to. Still needs some of the holes, but that won't take nearly as long.
« Last Edit: September 05, 2011, 05:19:42 pm by Angry Bob »
Logged
FUN FOR THE FUN GOD

Monk321654

  • Bay Watcher
  • [COMPUTER_DEPENDENT]
    • View Profile
Re: Dwarven Minesweeper
« Reply #1 on: September 04, 2011, 10:50:33 pm »

Magma for the mines... I like that...
But maybe getting something really vicious, like a GCS, or a Troll in there could be good...
Logged
This is a side-effect of dwarven animal training (hit animal with hammer until it forgets that it hates you, then lovingly cuddle it).

I'm not your average Bay12er. I care about my drunken midgets.

acetech09

  • Bay Watcher
  • Bay Watcher
    • View Profile
Re: Dwarven Minesweeper
« Reply #2 on: September 04, 2011, 11:24:46 pm »

Perhaps using different colored items (maybe rough gems - very prominent and available in many colors) that drop when you pull the lever. You could play a game of minesweeper (I'm on mac - don't know the colors by heart) and make the colors coordinate.

Perhaps instead of pulling a lever for a hatch cover directly above the lever, putting it in a room off to the side, so it's a cleaner view.

When pulling a mine, it'd flood the room with magma. Bonus if you use realgar/orpiment/saltpeter for the floors and walls of the room, so the whole thing will boil and poff when you use. Or maybe build the whole room out of fuel or raw fuel so you will turn minesweeper into !!Minesweeper!!.

Maybe even cause a cavein that releases clowns to the surface and your fort when you hit a mine.

Logged
I challenge you to a game of 'Hide the Sausage', to the death.

EveryZig

  • Bay Watcher
  • Adequate Liar
    • View Profile
Re: Dwarven Minesweeper
« Reply #3 on: September 04, 2011, 11:51:13 pm »

Perhaps you could use stacks of bones as the numbers, both because bones are dorfy and you can easily decrease stacks until they are the right size by making bone bolts/crafts.

so "1" would be one bone, "2" would be a stack of 2 bones, etc.

For extra dorf points, have them all be elf bones.
For mega-dorf points, have them all be dwarf bones.
Logged
Soaplent green is goblins!

Eddren

  • Bay Watcher
    • View Profile
Re: Dwarven Minesweeper
« Reply #4 on: September 05, 2011, 12:27:04 am »

For super-mega dwarf points, have them be dwarven Elf-king bones.
Logged
Ah, my dwarven heart beats with fierce pride for this.  I can't take it anymore!  I have to go do something profound.

Angry Bob

  • Bay Watcher
  • Prone to catastrophic apathy
    • View Profile
Re: Dwarven Minesweeper
« Reply #5 on: September 05, 2011, 12:58:56 pm »

I think I'll just use animal/animal corpses/other items and key the first letter to the number. Pulling a lever and having an alpaca dropped on your head signals that you have one mine next to you, getting a bear signals two, etc. I'm seeing a shortage of {e} animals, though. I suppose I'll have to use elves or elf parts for that. Better start setting up cage traps around the depot.

Distributing the magma is going to take some time. I've build the board down near the magma sea, but I'll have to rig up a series of pumps and magma ducts to actually get the magma where I want it. I may also just get everything else ready, and then floor over all of the niches that aren't mines and flood the dispenser room with magma.

In other news, a weaponsmith retreated from society and immediatelty grabbed iron, so that's going well at least.
« Last Edit: September 05, 2011, 01:02:49 pm by Angry Bob »
Logged
FUN FOR THE FUN GOD

Damium

  • Escaped Lunatic
    • View Profile
Re: Dwarven Minesweeper
« Reply #6 on: September 05, 2011, 08:57:18 pm »

I would use fluid numbers to indicate empty cells as fluid levels show from the cell above a pit, easy to read and no chance of it starving, running away, etc. Also, rather than connecting the "mine" levers to hatches I would connect them to the doomsday device trigger and connect the mine-hatches to a different lever than deconstructing it. You wouldn't be able to tell the difference with out checking the lever to see what it can/can't connect to.

Of course, if you were as unlucky as me you would pull the mined lever first...

Spoiler: example (click to show/hide)
Logged

Angry Bob

  • Bay Watcher
  • Prone to catastrophic apathy
    • View Profile
Re: Dwarven Minesweeper
« Reply #7 on: September 05, 2011, 09:29:33 pm »

I would use fluid numbers to indicate empty cells as fluid levels show from the cell above a pit, easy to read and no chance of it starving, running away, etc. Also, rather than connecting the "mine" levers to hatches I would connect them to the doomsday device trigger and connect the mine-hatches to a different lever than deconstructing it. You wouldn't be able to tell the difference with out checking the lever to see what it can/can't connect to.

Of course, if you were as unlucky as me you would pull the mined lever first...

Spoiler: example (click to show/hide)

Reading this post, I realized that ponds fill one water level at a time. Does water in a sealed chamber evaporate over time? Because it could be a problem if it does. If you could do the same with magma, maybe, but I can't think of a way to move magma with any kind of finesse or precision.

If you want to build a minsweeper system that uses this setup, I'd be glad to play it, but my construction is already well underway and It's taking a longass time just to make the mechanisms I'm already going to need.

Would this all work better if you reclaimed before playing, and the background stuff was sealed off? That way you couldn't cheat accidentally.
Logged
FUN FOR THE FUN GOD

Angry Bob

  • Bay Watcher
  • Prone to catastrophic apathy
    • View Profile
Re: Dwarven Minesweeper
« Reply #8 on: September 08, 2011, 04:32:46 pm »

FPS death. :( I guess I should have started with a fresh fort.

If I ever do so, I'll be sure to update it, but I suspect the new release will be rolling around by then and I'll have that on my hands instead of this.
Logged
FUN FOR THE FUN GOD

Xen0n

  • Bay Watcher
  • Took joy in ‼SCIENCE‼ lately.
    • View Profile
Re: Dwarven Minesweeper
« Reply #9 on: September 08, 2011, 04:45:57 pm »

Hmm just throwing ideas out, but for some reason my brain linked "Minesweeper" with "Mining" so I assumed mining would be involved.  That said, I've though of some ways to do that.

Mine out an 11x11 room, and mine out the 11x11 room above it, but leave one wall tile. Then channel away the edges of the upper room so the only support is the wall tile, so if you channel into it, everything collapses.  I guess only has 1 mine though...

Mine out an 11x11 room, and mine out the 11x11 room below it, leaving some wall section to contain the few tiles below of pressurised magma, such that channeling into them sprays magma like those magma land mines someone made.  The 'dud' tiles could contain clues like corpses as already suggested
Logged

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: Dwarven Minesweeper
« Reply #10 on: September 08, 2011, 04:55:52 pm »

What you want is a way for it to be randomly reconfigurable.  This is probably more work than you want to do, but....

1) Make a grid of pumps, just as if you were making a  mist generator, with reservoirs underneath each draw-from/spew-to location.  Send a unit of water along the path, then turn off all pumps with a lever.  Presence of water in a tile deactivates (by mechanism) each pump that spews-to that location.  Each stack of water acts as a mine, so repeat as many times as necessary (as many times as you want mines).

2) Each square needs 3 bits of memory to store the number of adjacent mines.  Presence of a mine increments the value of all adjacent squares.  (This is easier than it sounds.)  3 bits of memory need about 7x9 squares, so make each tile of your minesweeper a 7x9 with a lever in the middle.  Lever + memory-> octal output on that 7x9 square isn't too hard, and 7x9 is plenty of room for good-looking output.

3) Memory can be built wherever, but the fluid reservoir should be above the lever.  Pulling each lever doesn't just activate decimal output, it also drops the contents of the fluid reservoir (which will be empty on mineless sqares) on the lever puller's head.  After you get the bugs worked out, consider building a magma version.
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...<P>It should be pretty fun though.

Frogwarrior

  • Bay Watcher
    • View Profile
Re: Dwarven Minesweeper
« Reply #11 on: September 08, 2011, 05:06:14 pm »

Is this something to be played in Adventure Mode? That would be awesome.
Logged
Lately, I'm proud of MAGMA LANDMINES:
http://www.bay12forums.com/smf/index.php?topic=91789.0
And been a bit smug over generating a world with an elephant monster that got 87763 sentient kills.
http://www.bay12forums.com/smf/index.php?topic=104354.0

Angry Bob

  • Bay Watcher
  • Prone to catastrophic apathy
    • View Profile
Re: Dwarven Minesweeper
« Reply #12 on: September 08, 2011, 06:33:19 pm »

Huh. Interest goes back up as soon as it's inevitable that I'll have to start from scratch.

Since I'm starting from scratch anyway, I guess now is as good a time as ever to learn dwarven computing. Nil, do you have a handy schematic for a tile so I can get an idea of what I'm building?

I think the main reason I wanted to stay away from adventure mode is that I didn't know how many of the necessary mechanics would carry over. Do pumps still pump, does standing water change levels, and such. I'd have to know how much of what worked how before I could adapt it for adventure mode.
Logged
FUN FOR THE FUN GOD

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: Dwarven Minesweeper
« Reply #13 on: September 08, 2011, 07:31:05 pm »

The first and biggest step would be randomly making an 11x11 grid of mist generators.  I'm not sure if that's the ideal way to call randominteger(120).  A better way than the mist generators would probably to poll waving water or a pacing creature to generate a row and column.  Not sure if that's totally random, but it's what I'd do.  I do creature logic, which makes my designs huge.  There's probably a better way, but...

Here's my row/column random generator:

Code: [Select]
 
#X#           #X#
#h############h#
##^d         h^#
 #h###########d#
 # #         # #

Here's one arm of a loop for a goblin to pace.  This loop should have 11 arms.  Each pressure plate is linked to adjacent hatches and door and to one door I'm about to show.  X paths to map edge.  Don't try to sample the RNG too often-- maybe once every 3 days should be safe, but remember, it relies on the time it's sampled being random, and sampling patterns will show through to the numbers it generates.

Code: [Select]
 
   # ##d  #
   # d^## #           select row 2
   # ##h# #
   # ##X# #
  ## ##h# #
###d d^## #        select row 1
Xh^####d# #
###h# ##  #
  ##      #             return to reset for next run
   ########


This shows the doors the previous loop should connect to.  This diagram shows 2 doors only; there should be 11.  Goblin waits at row selection plate for door open, then returns to reset for next run.  There should be two of these circuits, one for row, one for column, but they shouldn't run at the same time, else you'll always get 3,3 or 4,4 (etc).  Door from reset is opened by lever, so that it gets opened at a random time, but only one path will exist for the goblin, and he'll choose a random row/column for you.  Either link the selection plate to memory, or link all of the doors that lead from the selection plate to reset to a lever that you only throw once both row and column are decided.

Row/column selection activates one of 121 screw pumps that move fluid into a reservoir.  Each pump has (at least) two gears connecting it to power; default state of these gears is off.  Selection of row 1 activates the row-gear of the 11 pumps in row 1 (duh).  Selection of column 2 activates the column-gear of the 11 pumps in column 2.  The intersection of those is a single pump, located at 1,2.

This system doesn't rule out already placed mines as potential locations.  That's possible too, but it's more complicated.

Here's 3-bit incrementing goblin memory:

Code: [Select]
 
    ###    ###    ###
  ###X#  ###X#  ###X#
 ##h#h# ##h#h# ##h#h#
## #^#### #^#### #^##
#dh#hd##dh#hd##dh#hd#
##^# ####^#^####^#^##
#h#h## #h#h####h#h##
#X###  #X###  #X###
###    ###    ###

This is designed for multipurpose, so it has unnecessary features.  NE and SW ^s are linked to all adjacent hatches.
SE^ is linked to the central hatches of the memory cell immediately to the right.  True is north, south is false.
1 goblin travels each loop clockwise, and increments ripple through from right to left.

Every time you send an open-close of the two central hatches on the rightmost bit, you increment the value by 1.  How do you turn the open signal generated by the ^ into an open-close?  With this:

Code: [Select]
 
####   ####
#Xh#####hX#
###^d^h^###
 #h#####h#
 ##  ^  ##
  #######


Every time you send an open to a door (and a close to the hatch permitting return to reset), you get an open-close back.  When you send a close (to the door and hatch) you get an open-close again, if you so need it.

You need 1 goblin RNG (0-10), 1 row picker, 1 column picker, 121 reservoirs, 121 pumps each with 2-operand AND gears, 121 3-bit incremementing memory circuits, and 121 signal converters.  You also need a way to reset your memory so you can run it again.  I didn't demonstrate output, but hopefully that part is obvious (if bit is 111, value is 7, run it through a binary->octal if you want, light up bridges like they're cells in a cheap calculator's LCD display).  Power's not really a problem because only 1 pump (and up to 12 gears) will be active at a time.  This isn't optimized, it's just throwing together stuff that I have handy, so chances are you could find a way around needing the signal converters that was a lot simpler.

Oh-- how do you drop the magma on your head?

Code: [Select]

####
#h^#
####

z=0

....
.l..
....

z= -1

EDIT: I have a feeling I screwed up the explanation of the memory design.  I think you wouldn't want to use 3 bits anyways-- you'd use 1 bit of octal memory, a goblin on a 16-step, 8 state loop.  That way you wouldn't need to convert to octal for output either.
« Last Edit: September 08, 2011, 07:51:45 pm by Nil Eyeglazed »
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...<P>It should be pretty fun though.

Angry Bob

  • Bay Watcher
  • Prone to catastrophic apathy
    • View Profile
Re: Dwarven Minesweeper
« Reply #14 on: September 08, 2011, 07:43:03 pm »

... I am sufficiently intimidated. Would you be insulted if I stuck to a simpler design? I'm not really playing a whole lot right now that school's back in and that looks like an awful lot to organize, construct, and debug(and debug again).
Logged
FUN FOR THE FUN GOD
Pages: [1] 2