Bay 12 Games Forum

Please login or register.

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

Author Topic: First results from a borg-logic drop clock  (Read 4656 times)

Nil Eyeglazed

  • Bay Watcher
    • View Profile
First results from a borg-logic drop clock
« on: March 14, 2012, 05:27:44 pm »

There was some discussion in the past (here) about the possibility of using the rate of a falling creature to drive a clock.  There were some problems with implementation, however.

I have just concluded the first test of the vampire-based borg-logic drop-based delay circuit.

Code: [Select]

 ######
 #BhB<#
 ## #X#
 ## #X#
 ## #X#

...

 ## #X#
 #vb_X#
 ##^ <#
 ######

Side view: B is drawbridge, h is hatch, b is retracting bridge, # is wall, X/</> are stairs, v is a restraint, ^ is a pressure plate.  Beginning state is small flightless creature on pressure plate, retracting bridge open, drawbridges raised.

I'll list the problems with their solutions below.

1) Creatures die when they fall a long ways.
--Get a (standing) creature to wait at the bottom of the fall.  This will cushion the faller.

2) Cushion creatures set off pressure plates.
--Use a small creature then.

3) Can't get a creature to stand on one exact spot to cushion the fall.
--Attach the creature to a leash next to a retracting bridge.  Drop the leashed creature 1 z-level down the hole.

4) Dropped creatures dodge when you drop them, making the duration of fall unpredictable.
--Constrain the falling creature to a single tile.

5) Can't get a creature to stand on a single tile to drop it from.
--Use a dwarf, and use the "defend burrows" option to specify the tile you want it to try and stand on.

6) Dwarves are always eating, sleeping, drinking, etc.
--Use a vampire.

So far, there's just one test.  It worked perfectly.  The vampire fell 6 z-levels.  37 ticks after the dropping signal, the vampire set off the pressure plate at the bottom of the pit.  (6 z-levels per level fallen, except the first z-level takes an extra tick.)  Once the bridges were lowered, the vampire immediately returned to his original position.

So, is this practical?  Barely, but yes.  It's been extraordinarily difficult to institute delays shorter than 100 ticks-- if you wanted a 37 tick delay, you'd need 37 screw pumps.  To me, this is cool because it's the first (to my knowledge) perfectly timed creature logic delay, which means the possibility for a precise clock.

Can you use this to drive a clock?  My gut says yes.  I predict you would need four of these linked together to make a clock.  Would it work forever?  Not yet-- your cushion creature will eventually die of old age.  Next version, I anticipate that we will be able to tame cave blobs, which do not die of old age.  Additionally, I'm examining ways to use undead creatures to cushion the fall.  (I guess if you had a small vampire and a large vampire, you could build the pressure plate based on that and drop one on the other, which would work.)

I still have to do some testing.  There are a few things I need to make sure of:

1) The burrowed vampire will ALWAYS move to the correct spot, and not take dawdling breaks.  (Note that he is physically isolated from the rest of the fort.)

2) The burrowed vampire will never dodge off of the drop spot.  (I don't think that he can, in a constrained space, but this is something I'll watch out for.)
« Last Edit: March 14, 2012, 05:36:56 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.

Frogwarrior

  • Bay Watcher
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #1 on: March 14, 2012, 05:32:08 pm »

Vampire child. Obtained by having a normal vampire bleed into a well and locking the child in with the well until he gets thirsty, as always.

The problem, then, would be getting the child chained up. Can children be chained up for crimes? If so, perhaps you could assign the cushion-leash as usable for justice, than accuse the child vampire of a crime, then proceed as normal.
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

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #2 on: March 14, 2012, 05:35:55 pm »

After a few years, would a vampire child become eligible for the military?  If so, you could use a defend burrows order on it as well.  Of course, if you're making vampires, plates have good enough resolution to distinguish between a large adult dwarf and a small adult dwarf.
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.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #3 on: March 14, 2012, 05:40:45 pm »

Vampire children remain children forever.

You performed one test and measured at 37 ticks over 6Z.  That's presumably 6 ticks per level +1 for the bridge pull.  You'll need to repeat this.  We know that liquids fall at variable rates, but do creatures?  If they fall at a 100% constant rate, then it's viable for short-term timing devices.

If it's exact enough, and your vampire is fast enough to run back up to the top, you could in theory make a 100 level drop, a smooth 600 tick duration, and two of them linked to each other.  These would be able to tick at noon and midnight, as a day is 1,200 ticks.

rtg593

  • Bay Watcher
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #4 on: March 14, 2012, 05:44:32 pm »

If you're in an evil biome, can you restrain part of a zombie to cushion the vampires fall? An arm would weigh less than the vamp, and I imagine would cushion just the same.
Logged
Is it because light travels faster than sound,
that people appear bright until you hear them speak?

Kofthefens

  • Bay Watcher
  • Keep calm and OH GOD CAPYBARAS
    • View Profile
    • Marshland Games
Re: First results from a borg-logic drop clock
« Reply #5 on: March 14, 2012, 05:48:54 pm »

You could assign the vamp child to a burrow, then lock it in with a door. Also, I should warn you that too great a fall kills the faller, even with cushioning. I once dropped some dwarves and badgers 55 z-levels onto more badgers, and the falling creatures pretty much exploded. I repeated this test several times (mostly for the joy of seeing them die); the results were always the same.
Logged
I don't care about your indigestion-- How are you is a greeting, not a question.

The epic of Îton Sákrith
The Chronicles of HammerBlaze
My website - Free games

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #6 on: March 14, 2012, 06:26:23 pm »

You performed one test and measured at 37 ticks over 6Z.  That's presumably 6 ticks per level +1 for the bridge pull.  You'll need to repeat this.

I've repeated the test several more times.  It is constant.  (This was actually discussed in the puppy drop thread I referenced above, but of course I needed to verify that it's still true for this version.)  EDIT: Just to be clear, it's exactly 7 ticks for the first level, and 6 for each level afterwards.  I'm looking at every level dropped.  (There is the outside possibility that a longer drop would see acceleration.  I don't think this is the case, but I'll keep an eye out.)

It's not actually +1 tick for the bridge pull-- it's 7 ticks for the first z-level dropped.  Every time.  In order to be careful about this, I built some doors to keep track of exactly when signals were received, and I used a hatch to drop the vampire.  I was extraordinarily careful of build order, building every piece of furniture before building any triggering plates/levers.

Quote
If it's exact enough, and your vampire is fast enough to run back up to the top, you could in theory make a 100 level drop, a smooth 600 tick duration, and two of them linked to each other.  These would be able to tick at noon and midnight, as a day is 1,200 ticks.

The fastest dwarf (a speed ceiling) moves between every 5 and 6 ticks.  Every dwarf falls at a rate of 6 ticks.  Plus, it gets stunned on its drop.  Even using ramps and the fastest possible dwarf, there's no way the vampire can return to reset position in time for the signal with only two linked devices.  Three is possible.

The slowest dwarf (a speed floor) moves between every 15 and 16 ticks.  Based on my observations of vampires suffering from "really needs a drink," they all approach or reach that speed.  With a sufficiently long drop and good design, you could guarantee that only 4 delay circuits would be necessary.  With shorter drops, it's possible that you'd need 5 different circuits to run a loop.

If you're in an evil biome, can you restrain part of a zombie to cushion the vampires fall? An arm would weigh less than the vamp, and I imagine would cushion just the same.

I've heard that reanimating creatures are freed from their restraints, and I believe it (actually, I believe that they're freed at time of death, rather than at reanimation).  I've got a zombie in the circuit, and I'm going to see if I can get my vampire to restrain it.

You could assign the vamp child to a burrow, then lock it in with a door.

You can't use doors to restrain the cushion to a single tile, because your dropper has to be able to return to position.

Quote
Also, I should warn you that too great a fall kills the faller, even with cushioning. I once dropped some dwarves and badgers 55 z-levels onto more badgers, and the falling creatures pretty much exploded. I repeated this test several times (mostly for the joy of seeing them die); the results were always the same.

On earlier research I was plagued by the fact that sometimes my droppers would die.  I couldn't figure out why, until Di kindly informed me that creatures on the ground (ie, not standing) will not cushion falls.  I realized that when pitting a creature into a constrained tile, that creature would fall, and never rise-- thus, any creatures falling onto that critter would splat.  Are you sure that that's not what was going on?  Regardless, I'll probably experiment more with longer falls, and if I do, I'll document any problems I run into.
« Last Edit: March 14, 2012, 06:33:38 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.

Supernerd

  • Bay Watcher
  • Currently experiencing fremdschämen.
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #7 on: March 14, 2012, 06:31:54 pm »

Why not just equip one vampire with heavy clothing or something? Would that work? Or better yet hack off the cushion vampires limbs to make it lighter!
« Last Edit: March 14, 2012, 06:33:26 pm by Supernerd »
Logged
websim.ai is coming dangerously close to being able to run Gridhood. Maybe I'll live to see the day if I exercise, eat right, and somehow convince the world's governments not to nuke everyone.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #8 on: March 14, 2012, 08:36:36 pm »

Vampire children remain children forever.

...

Dwarven Baby + Mother in hospital + Thirst + "Bring Water" + Vampire blood well = ?

I know you want to do it.

Depending on how Toady patched the justice system, it may even be immune to accusations. I also wonder what would happen if the mother recovered, picked up the baby, and went to sleep holding it.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #9 on: March 14, 2012, 08:55:52 pm »

You mean, an actual baby?  Not a child, but a baby become a vampire?  An intriguing idea, for sure...  I'm not sure if I'm willing to drop to that level of depravity though.

Wish I had a good vampire fort archived!

Frogwarrior

  • Bay Watcher
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #10 on: March 14, 2012, 09:50:21 pm »

Wait seriously do people bring water to babies??? I always thought a loose baby was doomed.

Huh... if the mother was brought water and became a vamp too... then you could have a mother and child vamp team. and if the mother searches out the baby and carries it like normal... and if vamp babies will feed on adjacent sleeping dwarves... then whenever the mother went to feed, you'd have both of them snacking at once...
« Last Edit: March 14, 2012, 09:52:14 pm by Frogwarrior »
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

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #11 on: March 15, 2012, 06:19:03 pm »

So, I built in some testing for long-term longevity, and instantly, my vampires started getting hurt on the fall.  I confirmed that it wasn't because the creature on the bottom was lying down.  Redesigning the drop for auto-testing made some changes to the design, which I'll undo, and see if that will fix the problem.

One of the changes that I made was replacing the hatch with a bridge, and I'm going to have to see if that's part of the problem.  If it's not, I think there might be a way to design it such that you might be able to make do with only three circuits to make a continuous loop.  Unfortunately, it would probably require submersion, and that means the vampire-on-the-bottom trick wouldn't work (he'd just get up and get out of the water).  A cave blob might work though.

(It takes advantage of the fact that a bridge can add exactly 100 or 101 ticks to the delay involved in the circuit.  The submersion is necessary because the vampire won't path to a retracted bridge, so you need to get him moving close to his drop point before his drop point is actually accessible to him.)

I'll probably have to design a well of unlife to continue vampire research.  Promoted one to baron (he's trapped in his throne room, so he can meet with diplomats but can't kill anyone), and now two are dead-- if it takes some trial+error to return the drop to the safe state, I don't want to run out.

More for my own notes, I'm going to document some useful delays:

25 ticks: 4z drop by hatch
125 ticks: 4z drop by bridge built before triggering device
150 ticks: 8z drop by bridge built after triggering device

Obviously, you can do plus or minus 6n on any of these, but I feel like these are the handiest, round-number delay times.  Discounting stun time, return time on a 108 delay circuit is only 80 ticks (maybe 77 with a ramp design), so if stuns are short enough and you can get the vampire to path, you could do a 2-circuit loop with something like that, although 108 is a pretty unwieldy number.  (Actually, just had another idea for a way to get the vamp to return to reset with a retracted bridge, using an adjacent raising bridge in the same burrow to be defended, but it would only work with a carefully timed vampire, or you'd squish him.)
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.

DuckBoy2

  • Bay Watcher
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #12 on: March 16, 2012, 01:27:12 am »

If youre afraid of squishing with bridges, or their awful tendencies to throw things in random directions, Im sure some combination of grates, bars, doors and floodgates would work out for you.  IIRC, floor grates and bars have the same delay as bridges, but are otherwise counted as hatches. 

Falling creatures go right through wall grates and vertical bars, but will happily land on a closed floodgate or door.  (Hilariously, dwarves thrown by a bridge will also go straight through wall grates and bars unharmed)  If a door/floodgate is built on a constructed wall, then the wall below is removed, you get a floating door/floodgate.  And in the tile above that door or floodgate, you get left with an unpathable tile that is considered dangerous terrain, causing dwarves to reevaluate their current jobs. 

So if you want the bridge delay without a bridge, and your vampire is a hauler, and your cushion is a quantum stockpile, you can build a floating floodgate under a hatch and link both up to the same trigger.  The vamp will drop his stuff when the hatch opens, but neither he nor the item will fall until the floodgate opens, which I think has the 100 delay. You might be able to get the vamp to bring booze to his cushion every couple hundred ticks for all eternity.
Logged

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #13 on: March 16, 2012, 07:30:59 am »

Considering that vampires are pretty damn robust constitutionally, is there even a need to cushion them? I would think that a super-tough vampire would survive a brief fall.
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

slothen

  • Bay Watcher
    • View Profile
Re: First results from a borg-logic drop clock
« Reply #14 on: March 16, 2012, 09:54:23 am »

How are you measuring ticks?

Is the vampire taking injuries from his falls?  if so, is he healing?  Vampire interactions are specific to world gen, so perhaps vampires in your test world and vampires in another world may behave differently with regards to damage taken.  I've also read the vampire heal-rate might be linked to their ability to feed on blood.  Nothing you should worry about, but just keep an eye on your vampire's long term viability if they're taking damage and you're trusting it to heal.

Falls hurt.  Long falls will hurt or kill even a vampire.  Land in water is documented to cushion a fall, the effect varying with height of the fall and depth of the water.  It might be simpler to eliminate cushioning creatures and use water.  If the vampire's fall does not cause him to hit the bottom where the pressure-plate is, he would need to path to the bottom of the water.  Alternatively, you could have him path out of the water and hit the pressure plate on the way out.  The issue here is you're measuring movement speed and not falling speed, and you would need to calibrate the clock for each vampire.  Luckily if you use a homegrown vampire with the swimmer skill, the vampire won't gain additional skill levels.

Bridges.  Due to bridges seeming to fling objects in random directions, random distances, this is probably bad compared to retracting hatches/grates/bars.
Logged
While adding magma to anything will make it dwarfy, adding the word "magma" to your post does not necessarily make it funny.
Thoughts on water
MILITARY: squad, uniform, training
"DF doesn't mold players into its image - DF merely selects those who were always ready for DF." -NW_Kohaku
Pages: [1] 2