Bay 12 Games Forum

Please login or register.

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

Author Topic: What to do with a clock?  (Read 23349 times)

Jyppa

  • Bay Watcher
    • View Profile
What to do with a clock?
« on: February 07, 2010, 10:34:10 am »

So, I thought it would be fun to build a doomsday clock for my fortress after I got an artifact mechanism called "the Breath of Time", so I constructed a very simple water clock based on this repeater design. It works like a charm, keeping track of hours, days, months and years, synced to the DF calendar. After building and testing it, I realized that I can actually make it send pretty specific signals, to create, say, a stockpile for quality booze that only opens the third week of Malachite every 7th year (vintage dwarven wine!) or a fortress entrance that will only open on the day of the First Dig for dwarfsized creatures standing on a pressure plate before the gates (might do this one with a waterfall that splits apart to allow passage). My trade depot will also automatically flood with magma every 16th Slate or so, saving me the effort :)

Any other ideas for what to do with an accurate mechanical clock? My fortress is built entirely within an underground magma pipe that can be drained or refilled in a few dwarf weeks, which could allow for some cool cyclic events. I have a river source, a chasm, untouched HFS, sand and flux on the map, and a ton of tame bears, because bears are awesome.
Logged

Djohaal

  • Bay Watcher
  • [PREFSTRING:Utter Insanitiy]
    • View Profile
    • My deviantart
Re: What to do with a clock?
« Reply #1 on: February 07, 2010, 10:48:45 am »

Cyclic boatmurdered. With Magma.

Do upload a video of your fortress using such mechanisms, I'm interested now :)
« Last Edit: February 07, 2010, 10:51:35 am by Djohaal »
Logged
I really want that one as a "when". I want "grubs", and "virgin woman" to turn into a dragon. and monkey children to suddenly sprout wings. And I want the Dwarven Mutant Academy to only gain their powers upon reaching puberty. I also have a whole host of odd creatures that only make sense if I divide them into children and adults.

Also, tadpoles.

Osmosis Jones

  • Bay Watcher
  • Now with 100% more rotation!
    • View Profile
Re: What to do with a clock?
« Reply #2 on: February 07, 2010, 11:17:55 am »

Build a fountain with three or more spouts. Have the water flow from them in time varying patterns (say, fountain 1->2->3->all off->3->2->1->all off->all on->repeat. This would probably require you also building an adder of some sort though.
Logged
The Marx generator will produce Engels-waves which should allow the inherently unstable isotope of Leninium to undergo a rapid Stalinisation in mere trockoseconds.

Danarca

  • Bay Watcher
  • [MILL_CHILD:ONLY_IF_GOOD_REASON]
    • View Profile
Re: What to do with a clock?
« Reply #3 on: February 07, 2010, 11:22:30 am »

Yeah, please do, very few players are able to create such complicated machinery :)
OR! If you want a challenge, out of bridges construct a digital clock showing the day and month :D
Logged
Clutter god the god of godly gods.
Om Nom nom nom nom
Ah yes the god of stone stockpiles, long randomly generated names, and gods.

Jyppa

  • Bay Watcher
    • View Profile
Re: What to do with a clock?
« Reply #4 on: February 07, 2010, 11:23:28 am »

Increment by fixed integer is very simple, it's how the machine counts days, weeks, months and years. I like the idea of a fountain, and it's actually how I'm planning to make the clock "year dial". A fountain that spouts water by statues made of materials corresponding to the months. Still need to get a hold of some felsite and slate, though. Might have to cheat a reaction.

Edit: There's really nothing to this design. Do you want me to post a description of how to build it? Requires 42 pumps and plenty of mechanisms for the basic year cycle.
« Last Edit: February 07, 2010, 11:25:10 am by Jyppa »
Logged

Flaede

  • Bay Watcher
  • Beware the Moon Creatures.
    • View Profile
Re: What to do with a clock?
« Reply #5 on: February 07, 2010, 11:26:36 am »

I am impressed! I have long wanted an accurate clock. please share details on the design? (maps, video, diagrams, details about the timing of the "ticks" whatever you can manage). I couldn't ever cobble together one myself, being inept in the dwarf-puting arena.

now, why I have wanted one is the answer to your question, since I've thought about this a while, I have quite the list -
I wanted a display of the year, and month (days, if possible) so I did not have to pause the game to find out if the caravan was due soon, or if the season was ending and I needed to get everyone inside before the next ambushers arrived. *
I wanted that entrance thingy, except I have a airlocked, 4-entrance cycle, and having it automatically alternate between them would be awesome. Lever pulling for that is horrendous.
I wanted a tomb that sealed until x-month of x-year whereupon it would open and release the captured megabeast. (or erupt the dwarf-made volcano, or Send In The Clowns)
I wanted timed release of POWs (Jubilee year? Kings' 25xN b-day?)
I wanted an automated wildlife management system (chained wild animals releasing their offspring into "hunting grounds" every x breeding cycles) I always forget when trying to manage that by hand.
I wanted a wave-pool (this requires good on/off timing on the pumps) or other cyclical water features. :D (yeah, that one's redonkulous. don't do that one)

The last idea I had was to have a clock that would work in adventurer-scale times. As in, I could have the clock running in adventure mode when visiting the site, and compare time-scales between it and fortress mode with that display I mentioned earlier. Once I had a handle on this -  build a crazy clockwork maze, ftw!

[edit] * I always liked the gearroom method for integer display. turning gears are 1, non-turning ones 0. Display is binary. Or course, for calendar purposes, just having the proper material gear activated is best for month-counting. It activates quicker, and has the advantage of not slowing framerate as much as a fountain.
« Last Edit: February 07, 2010, 11:35:18 am by Flaede »
Logged
Toady typically doesn't do things by half measures.  As evidenced by turning "make hauling work better" into "implement mine carts with physics".
There are many issues with this statement.
[/quote]

Jyppa

  • Bay Watcher
    • View Profile
Re: What to do with a clock?
« Reply #6 on: February 07, 2010, 11:37:59 am »

Awesome ideas there! Here's how to build the clock:

Carve out four cyclical repeaters as per mrFake's model, linked earlier. You want two with 14 steps, for the day and year cycles, one with 8, for the week cycle and one with 6, for the month cycle. Each has to have its own power supply.

First, build the day cycle with 14 pumps. Only delay 12 of the steps, leaving two to be "skipped" over each cycle. This is the only step where you need to be concerned about build order, IE pumps->gears->plates.
Next, build the week cycle, and connect it to a "resistor", a room filled with enough gears to stop the entire repeater when connected. Connect it to the cycle with a single gear, then build a pressure plate in one of the skipped slots from the day cycle. This will effectively increase the week cycle by one each day cycle.

Repeat this for the 4-step month cycle and the 12-step year cycle. To synchronize the system, stop the day cycle with a lever for a few steps at a time until you're counting days properly, then connect levers to the three increment-by-one resistor chambers and set the correct day, week and month.

Edit: since there seems to be an interest, I uploaded the 40d16 save, since a demonstration movie would be extremely boring to watch :P
« Last Edit: February 07, 2010, 12:19:06 pm by Jyppa »
Logged

Kidiri

  • Bay Watcher
    • View Profile
Re: What to do with a clock?
« Reply #7 on: February 07, 2010, 01:58:00 pm »

You should've made it all of an orange stone. Then you'd have A Clockwork Orange...

Also, I downloaded the file, but I have no idea what I'm looking at. And to be honest, the explanation didn't really help. What do you mean with delaying 12 of the steps? And with the resistor? Could you please make a diagram? It would certainly help me, and maybe others.
Logged
Veni, Vidi, Pompeii.
Soylent Green is kittens!
Sometimes, when my Dorfs are exceptionally stupid again, I wonder what exactly the [INTELLIGENT]-tag does.

Jyppa

  • Bay Watcher
    • View Profile
Re: What to do with a clock?
« Reply #8 on: February 07, 2010, 02:17:41 pm »

Wall of text warning.

Spoiler (click to show/hide)
Logged

Kidiri

  • Bay Watcher
    • View Profile
Re: What to do with a clock?
« Reply #9 on: February 07, 2010, 03:17:59 pm »

Ah thanks, I think I get it. The day cycle is going on all the time, and when the water comes to the Day++ noted pressure  plate, that one sends a signal to mechanism linked to the 'resistor' and week cycle, turning it off, giving the week cycle enough power to pump the water one tile further. Then the Week++ plate does the same with the months and theoretically you could have then have a Year++ plate which sends a signal to an adder, which counts the years. Right? I'll try and make a nice and organised diagram of it for posterity.
Logged
Veni, Vidi, Pompeii.
Soylent Green is kittens!
Sometimes, when my Dorfs are exceptionally stupid again, I wonder what exactly the [INTELLIGENT]-tag does.

Jyppa

  • Bay Watcher
    • View Profile
Re: What to do with a clock?
« Reply #10 on: February 07, 2010, 03:21:41 pm »

Exactly. The plate is there, just not connected.
Logged

Flaede

  • Bay Watcher
  • Beware the Moon Creatures.
    • View Profile
Re: What to do with a clock?
« Reply #11 on: February 07, 2010, 05:23:10 pm »

wow. so the day cycle is like a pendulum?
Logged
Toady typically doesn't do things by half measures.  As evidenced by turning "make hauling work better" into "implement mine carts with physics".
There are many issues with this statement.
[/quote]

Dr. Hieronymous Alloy

  • Bay Watcher
    • View Profile
Re: What to do with a clock?
« Reply #12 on: February 07, 2010, 05:40:03 pm »


A DF day is exactly 1200 steps, which is why the day loop counts to 12. This means that the lowest amount of time you can measure is two hours, a single repeater step.


AHAHA! Thank you!

This was always the key piece of data I was missing when I wondered about how to make dwarven water clocks. Thank you!

Please put a how-to on the wiki once you're done. As to what to do with it, what I'd wanted was a system to shower all my dwarves on a regular basis (say, every seventh day). I'd also thought about making a system to shut off my water works in winter so that it wouldn't freeze solid.

edit: I have bookmarked this thread
« Last Edit: February 07, 2010, 06:47:28 pm by Dr. Hieronymous Alloy »
Logged

Jyppa

  • Bay Watcher
    • View Profile
Re: What to do with a clock?
« Reply #13 on: February 07, 2010, 05:48:42 pm »

Yeah, you could call the day cycle the pendulum that keeps the beat. That way, you only really need to sync one repeater, which is actually easier than I expected it to be. If you want things to happen at longer, regular intervals, like the Goblympics every four years when all prisoners of war are released into the Thunderdome, you just need to build another repeater and connect it in the same way. If you, like me, want a long interval like 70 years, you just build a cycle of 10 and a cycle of 7 and set it (in my case, the coming Magmapocalypse) to activate when positions 7 and 10 respectively are filled at the same time.
Logged

Kidiri

  • Bay Watcher
    • View Profile
Re: What to do with a clock?
« Reply #14 on: February 07, 2010, 06:29:24 pm »

I think I got the idea. Anyway, diagram time!

Spoilered for huge. Seriously.

Does that look like it could work? Also, I think it would be clearer if you named the Day cycle the Hours cycle (because it just is a cycle of hours), the Week cycle the Days cycle, the Month cycle the Weeks cycle and the Year cycle the Months cycle. It will also make your notes more logical.

Now, let's say you want an automated entrance. And it only opens from the 1st of Opal to the 10th of Opal. You need to link up the pressure plates of day one of the month and day two to an OR logic gate. The same goes for every pair of days. You'll be left with five pairs of days which activate when it's either of their pair. Then link up pairs of outputs. If you at one point have an odd number of outputs, just link the last one up to the higher tier. Continue to link them all up, until you only have one output left. Next, link this output to an AND logic gate, along with the pressure plate of the month you want the door/bridge/... to be opened. Link the output of the AND gate to a NOT gate and the output of that to the bridge. When it is OR the 1st OR the 2nd OR the 3rd... AND Opal, the bridge will NOT be toggled (meaning: open). If you want the bridge to be opened automatically in different months, link the months' pressure plates via OR gates until you only have one output left and link that with an AND gate to the output of the days, and then via a NOT gate to the bridge. If it wasn't clear: Diagram time!


That is the general way. Let's say you want to open the special foods stockpile in the week before and the week after your real life birthday. Or mine, in this example: 31/07, which corresponds to 28th Limestone (last day of the seventh month to make it easier/applicable to DF). The week before is the last week of Limestone and the week after is the first of Sandstone. This is a relatively easy example: I link week 4 to Limestone with an AND gate, and link week 1 with an AND gate to Sandstone. The output of those AND gates are linked to an OR gate (it's in either the last week of Ls OR the first week of Ss). The output of the OR gate is then linked to the door.

For a more complicated example, let's take the day I signed up here: 11/11 or 11th Opal. Again, the week before and after something has to happen. This means from 4th Op to 18th Op. Handily, week 2 (8th to 14th) is smack in the middle of the period. So we can link that one up directly to an OR gate. Then you link up the separate days with OR gates until you've only got one output left. This gets linked to the other input (the first comes directly from week 2) of an OR gate. Then link this with an AND gate to Opal and the output to something else.

BIG NOTE: I haven't tried any of this. It's all how I think it should work. It could be that it's all wrong. I'm going to test it myself, and hope it's all right. If somebody sees an error, please feel free to tell. This here is all FOR SCIENCE! and purely hypothetical. For me that is. There are others who've done one of these things. And both of these, but separately. I've done neither, and hope to do the combination of logic gates and a clock together. Anyway, if somebody already has done something like this and sees some fatal flaw in my plan, don't hesitate to tell me. Or just anybody who thinks he can help out.


... I think I overdid my post a bit. But I hope it was helpful. And correct. I think it is, but I'm not entirely sure.

EDIT: I made a bit of a mistake in my examples. I kind of forgot the way the clock itself worked: not with 28 days, but with 4 times seven days...
EDIT2: Corrected some mistakes regarding colour-coding and logic of the clock.
EDIT3: Made a mistake in the cycles: the pumps without a delay should be right next to each other (in case of the day and year cycles), and directly after the pressure plate which isn't linked to anything. I tried making it the way I had drawn it originally, but things went awry. The water went too fast for a couple of pumps and then it slowed back down. I'm fixing it, and hoping it will work. which it does. Victory!
« Last Edit: May 11, 2010, 09:18:52 am by Kidiri »
Logged
Veni, Vidi, Pompeii.
Soylent Green is kittens!
Sometimes, when my Dorfs are exceptionally stupid again, I wonder what exactly the [INTELLIGENT]-tag does.
Pages: [1] 2 3 ... 6