Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Configurable Fast Repeater  (Read 1862 times)

taleden

  • Bay Watcher
    • View Profile
Configurable Fast Repeater
« on: August 18, 2018, 02:26:00 pm »

Inspired by the great work in this old thread (the diagrams from which I had to resurrect via the internet archive's wayback machine), I present a new design for a compact, self-powered minecart repeater which can be configured (via the track stop friction settings) for 104, 144 or 206 tick cycle times, providing nearly-optimally-fast oscillation of doors/hatches/etc, upright spikes, or bridges/floodgates/etc.



Miscellaneous notes:
  • This design abuses the impulse ramp and drag-less up-ramp exploits (note carefully the track directions on the ramps), and also benefits from DFHack's ability to change track stop friction settings after construction.
  • The four marked pressure plate positions will work with all three cycle length settings regardless of activation order (that is, no matter if the plate or its linked devices are built first). Other track positions may not work for some cycle lengths because the cart may be moving too slowly, causing it to linger long enough on the plate that its next loop comes before the plate or its linked device has fully reset.
  • When first constructing the repeater, a hauling route is required to assign a cart to be pushed west from stop #5, and the cart should then be immediately forbidden (and the hauling route optionally deleted).
  • The lever and hatch on the upper level aren't strictly required but provide a safe and easy toggle; once the cart is installed, the repeater can be stopped and restarted with just the one lever (anywhere in the fort), without having to wait for a dwarf to reposition or push the cart.
Enjoy!
Logged

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: Configurable Fast Repeater
« Reply #1 on: August 18, 2018, 04:19:27 pm »

I cannot test it right away, because I'm just leaving for vacation, but the quoted old thread was the originator of the design I use routinely (the one named 148 ticks). However, in present version of DF (0.44.12) I've actually counted the ticks of this 148-repeater, and there was 176 ticks, for some reason.

It's was not a big deal, but slightly complicated my intended use, which was placing several more plates and triggering a hatch on average less than every 10 ticks (for goblin trap). Still used it for a danger room (which is more like medical training facility now). Also spikes are bit slow now, so I'm looking to test your design for Forgotten Beast Incapacitator.

I like the idea of easy restart, waiting for a dwarf to put the minecart in a slow fortress can be outrageous.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Configurable Fast Repeater
« Reply #2 on: August 18, 2018, 04:54:22 pm »

If it worked with 144 before, misconstructon is my bet, haven't detected any changes. One possible way to assure equal designations is to use a macro.

There's been other designs like suokki's proof of concept:

(haven't tested or improved, because I have only used repeating spears sensitive to length once)


Anyway, taleden, few notes:
 - most of door togglers I've seen have been long strips, so being a box is relatively unique.
 
 - you could make it 1z - I think you already know how - and ensure stop by linking highest track stop to a lever. This does lose you the lever restart unless you place it just before and after an accelerating ramp and add a second minecart into the system, which I guess could add 1 step wait depending on build order.

- The 144 is ~useless for repeating spears. They have 40 step cycle, placing all four plates in a row like that will result in only the first's signal doing anything and other 3 being ignored. suokko managed 2 plates by making the cart leave plate exactly 20 steps after entering it. Good effort figuring it out, though.

- The 206 is workable but there's been smaller designs with less material. I'm amused at the one I posted here being four carts in six tiles box, but it's hardly optimal. Larix has one on his wiki page as well that might be more to your fancy, supporting a hatch. I hypothesize smallest possible design could fit in 4 tiles or less while taking exactly as much steps as desired.

Haven't really looked, as my weight-configurable repeaters have been primarily focused on periods between a day and a season. You may find my notes of interest, though, if you're curious about the topic of different repeater lengths with same track designs.
« Last Edit: August 18, 2018, 05:02:30 pm by Fleeting Frames »
Logged

taleden

  • Bay Watcher
    • View Profile
Re: Configurable Fast Repeater
« Reply #3 on: August 18, 2018, 07:36:49 pm »

- most of door togglers I've seen have been long strips, so being a box is relatively unique.
The 104 tick door/hatch toggle was kind of an afterthought anyway; my original intention was just to get a smaller and lever-restartable 200+ repeater for a blinking bridge entrance, and I preferred a square layout for that since my fort designs usually allot 5x5 or 7x7 rooms so this could fit into that scheme anywhere. After solving the bridge timings I found it was easy to tweak the resistances to work for spears, and then finally figured I might as well also find settings for minimum pressure plate reset interval which only matters for things that respond immediately like doors.

 - you could make it 1z - I think you already know how - and ensure stop by linking highest track stop to a lever. This does lose you the lever restart unless you place it just before and after an accelerating ramp and add a second minecart into the system, which I guess could add 1 step wait depending on build order.
Yeah, I couldn't come up with a restartable design in 1z so I opted for the compromise of a very small upper-level footprint because the lever restart was important to me. But sure, you could remove the up/down ramps and stick a door or highest stop where the wall is and it'd be stoppable in 1z, just not easily restartable. The timings would have to be adjusted though.
- The 144 is ~useless for repeating spears. They have 40 step cycle, placing all four plates in a row like that will result in only the first's signal doing anything and other 3 being ignored. suokko managed 2 plates by making the cart leave plate exactly 20 steps after entering it. Good effort figuring it out, though.
I tested it with spears and it works just fine. They have a 40 step response but the pressure plate itself has a 99 tick reset period, so the plate sends open on tick 0, the cart leaves the plate tile on tick 3 (plates A,B) or 4 (plates C,D), the spears retract on tick 40, the plate deactivates on tick 102-103, the spears extend again on tick 142-143 just barely in time for the cart to come back and hit the plate again on tick 144. The idea is not to use all four plates with the same spear(s), you'd link just one plate to all spears in a room; the four slots are just what's available in the design, so you could split them up a plate per room if you like, or just only use one plate for all spears everywhere. I thought about trying to fit two plates in so they could alternate and leave the spears retracted for only 40 ticks rather than 100, but decided I didn't care enough about that small gain in spear damage output at the cost of doubling the mechanism cost to link every spear in a room to a second plate.
- The 206 is workable but there's been smaller designs with less material. I'm amused at the one I posted here being four carts in six tiles box, but it's hardly optimal. Larix has one on his wiki page as well that might be more to your fancy, supporting a hatch. I hypothesize smallest possible design could fit in 4 tiles or less while taking exactly as much steps as desired.
I'll have to take a look at that, thanks for the links.
« Last Edit: August 18, 2018, 07:44:58 pm by taleden »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Configurable Fast Repeater
« Reply #4 on: August 19, 2018, 05:10:04 am »

If you have a second cart pushing on the one on the lever-linked highest track stop, it is restartable with the pull of a lever. Unless it stops on upper z by hitting a wall rather than descending, it should work the same way when flattened out (though yeah this restart mechanism may mess with things).

That's what I mean by ~useless. When doubling or quadrupling single pear damage is too small a gain, trying to get close to 142 is not much of a gain either, and you can stick ╔║╗ ramps with sideways return(around 149 step cycle, depending on return system) with a plate and direction control to not hit plate if desired. Sorry if it comes across brusquely; I know you made at least fify tests for this setup, probably over a hundred.

It's a good try to improve upon previous designs though, that's for sure; certainly far smaller than the designs in original post, and somewhat unique on door waving.

taleden

  • Bay Watcher
    • View Profile
Re: Configurable Fast Repeater
« Reply #5 on: August 20, 2018, 11:04:12 am »

That's what I mean by ~useless. When doubling or quadrupling single pear damage is too small a gain, trying to get close to 142 is not much of a gain either

I don't understand how it would be possible even to double, much less quadruple, the damage output of a spear compared to one pressure plate on a ~140 tick cycle. If I understand DF mechanisms correctly, the spear's response time of 40 ticks means after it gets an "open" signal on tick 0, the spear will ignore any other signals until it retracts on tick 40, so the earliest it could receive "close" is 40 (or 41?) and then it would extend again on tick 80 (or 81), for a minimum possible cycle time of ~80 ticks; yes, that's a 75% damage gain over a 140 tick cycle, but surely not 100% or 300% gain, unless I completely misunderstand how DF devices with activation delays behave.

Sorry if it comes across brusquely; I know you made at least fify tests for this setup, probably over a hundred.

It's a good try to improve upon previous designs though, that's for sure; certainly far smaller than the designs in original post, and somewhat unique on door waving.

Brusque, no; a little patronizing, maybe. Which is irksome only because you seem to be essentially saying "that's nice but why did you waste your time iterating those ancient terrible designs, we're much past that now" while seeming not to realize that your latest and greatest designs are apparently buried in random forum posts (in threads not even about repeaters) and user talk pages (is this the "Larix's wiki page" you mentioned? I see lots about computing but not much about repeater timing) where newcomers are never going to find them. I based my work on that 2012 thread because that's the best existing bridge-flapping design I could find; the Repeater wiki only offers an even less efficient 7x8x3 minecart loop, and googling "dwarf fortress repeaters" for example just turns up results like this reddit post and this forum post which all seem to refer back to that same post I referenced initially.

So if you're sitting on a ~200 tick bridge repeater with lever restart that fits in 4 tiles or whatever you're estimating, please share it, and please consider putting it on the wiki where people can actually find it without trawling through years of forum posts. Then maybe folks like me can avoid wasting our time again in the future, and you can avoid coming across a little brusquely. :)
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Configurable Fast Repeater
« Reply #6 on: August 20, 2018, 06:13:38 pm »

@Spears:
Derp, my bad, conflated "4 plates" with 4x. You're correct (even then, it'd have been an exaggeration).

@Repeater:
Well said.

Yeah, that's Larix user page - I was in particular referring to bridge repeater. You'd have also found it on the second page of that 2012 thread. The google search is pretty bad, but "minecart repeater" in this forum is a little more fruitful, especially if you look at other repeater designs of those who do them. Of course, it takes days to read everything Larix has posted on minecarts....

I think I looked at that wiki entry too when starting out - nearly the same as DF2012 version. However, I have not edited in some more compact/cheaper designs for four reasons:
  • I don't have perfect (as in minimum possible space and material cost) designs; even disregarding optimization potential there's gonna be tradeoffs between space and cost. Sure, could list extreme optimums of both, but...
  • As it stands, the page shows an example of a category each, with links elsewhere if one wants to do more than get one's feet wet. The aforementioned goblin example takes less than a handspan, while creature logic page with numerous examples has several pages.
  • I'm relative newcomer to DF, and defer to the conduct of more experienced players. They have followed pattern of adding into user pages, as you can see on the bottom of Computing.
  • I think it's rude to erase stuff others have posted if it is not incorrect. This of course means that if a hypothetical person near exactly like I includes non-perfect design that I have improved upon, if I do likewise and post without erasing half the page is now about minecart repeaters, which is undesirable.
Mind, it probs still needs editing even with all that: I suspect the goblin repeater would have to double up on hatches and smooth or isolate in air to prevent jumping/climbing over, provided the goblin doesn't go insane from stress and break them in tantrum.

PS: the bit about 4 tile bridge repeater was intended as motivation for you - one doesn't currently exist which means you can be first to create it.

Few checks with the 5-tile weight-based repeater shows hundred+ possible weight setups near, say, 230, and given 4 tile would have around half the length the 6731 under-100 weight configurations for 404/403 length is probably more accurate measure. All unexplored; the ratio of constructed repeaters versus possible ones is small indeed.
« Last Edit: August 20, 2018, 06:15:20 pm by Fleeting Frames »
Logged

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: Configurable Fast Repeater
« Reply #7 on: August 29, 2018, 12:09:31 pm »

If it worked with 144 before, misconstructon is my bet, haven't detected any changes. One possible way to assure equal designations is to use a macro.

If you refer to my post, then the real reason is I have never counted the ticks till recently. Since 2012 I used a repeater which I filed under the "148-ticks" label (recreated below) which I believe is the same quoted by OP. However, when I finally counted the ticks it's either 176 or 177. Yesterday I downloaded DF v0.34.11, built the repeater, and the count is the same, so it hasn't changed. I just always believed it to be 148-ticks.

Here it is for reference, using this strange pseudographics:

   ▓
▓▲H▲╗<-minecart is placed in this NE corner and pushed west
▓▲╔╗^
╔M╬╬╝
╚╬╬╬╗
╔╬╬╬╝
╚╬╬╬╗
 ╚╝╚╝


▓ = wall for pulse ramps
▲ = standard pulse ramps (pointing at the wall and the intended direction)
H = highest fraction stop for stoppin the cart (otherwise disabled by lever)
M = middle fraction stop
^ = pressure plate

Now, for the new designs in the first post here, I constructed it (in 0.44.12), and counted ticks for every config just to be sure - and it is as said, i.e. 104, 144, and 206 ticks per round. Since it's faster than the design I used previously, I'm going to use it for my danger room (or rather surgeon training facility) and for some more lethal traps. I just noticed that after reconfiguring it from the slowest to fastest (206->104), while it was running, the momentum was be a bit too low, and the cart climbed to the upper z-level but stopped  right at the starting position, before falling the hole. This needed a manual push to continue - but this would be rarely an issue, if at all. I prefer to build additional repeaters for new tasks anyway.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Configurable Fast Repeater
« Reply #8 on: August 30, 2018, 12:58:32 am »

So it has both images gone and is inaccurate. Well, I guess it should definitely be replaced then.