Bay 12 Games Forum

Please login or register.

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

Author Topic: Lightspeed Repeater and Lightspeed Computer  (Read 9485 times)

MagmaMcFry

  • Bay Watcher
    • View Profile
Lightspeed Repeater and Lightspeed Computer
« on: September 02, 2011, 06:15:34 pm »

For the Lightspeed Computer look here.

Original Post:

I had the sudden urge to invent something again, and this time I wanted to create the fastest physically possible repeater. And I did it!
A repeater so insanely fast, a door can open and close five times before a dwarf walks a single step! The principle behind it is very simple, but the construction of such a repeater is mindbogglingly difficult. The design described here uses about 1700 mechanisms! Also, the order of building is very important, and this order is such that you just cannot designate it all at once, but have to build the units one by one.
Theory as follows: If a pressure plate sends an OPEN signal to a door, the door opens. If the pressure plate sends a CLOSE signal, the door closes. But do these signals necessarily have to come from the same repeater?
If you have three 100-tick repeaters, you can attach them to the same door, and if you manage to kickstart them correctly, then you could get the following order of events:
Code: [Select]
Time --->

Repeater 1           ---O--C--O--C--O--C--O--C
Repeater 2           -----O--C--O--C--O--C--O-
Repeater 3           -------O--C--O--C--O--C--
What the door sees   ---O-OCOCOCOCOCOCOCOCOCOC
So this door opens and closes three times every 100 ticks.
If you manage to combine 50 100-tick repeaters in perfect unison, then the door gets a signal EVERY SINGLE TICK!

There are two major difficulties here:
--- First, how can you ensure that no two repeaters fire at the same time?
The answer is pretty simple: Fire them up mechanically with a 2-tick delay between consecutive starts. A method for this will be shown later.
---Second, how can you ensure that the OPEN signal always fires at the same time?
This poses a greater problem, as most repeaters use water falling onto a pressure plate. The CLOSE signals strictly adhere to the 100-tick period because they are always triggered by water instantly getting sucked from a pressure plate, but then the water is higher up, and in some point in time, has to fall down. This downfall is not immediately, and also not always at the same time. The solution is simple, albeit exploity: There is a bug that allows water to behave strangely in a U-tube:
Code: [Select]
Side view:
  #7<%
  #7##
__#7##
#777##
######
There has to be absolutely NO FLOW in this setup. If the pump is inactive and you channel away the floor above the underground water, the water won't flow out to the left, because the water above hole level has no flow.
Code: [Select]
  #7<%
  #7##
_ #7##
#777##
######
Now if you start the pump, the water coming out of the pump will "teleport" out of the hole in the left, without creating flow on the right. So the column of water stays there and the pumped water is instantly transported downwards, while staying measurable and reusable.

So how can this be implemented, you say?

Here is a design in ascending z-level order (Levels 0 to 5), designed for horizontal repetition (!).

A red outline around a figure indicates a channel, the brown outlines on Level 1 are open doors.

How to build this correctly:
Preparations: Have enough water. Build three levers somewhere, name them X, Y and Z. Pull X.

How to build one cell:
First, dig out the water teleporting column. Channel out the northeastern channel (it's easier if you use up ramps and just let one dwarf stay in there and channel the rock away under his feet). Dig out the shaft on Level 0 without breaking the ceiling at the southern end. Optionally, you may get your dwarf out of there. Now build the green(!) screw pumps in ascending(!) order and completely (7/7 up to Level 5) fill out the teleport column. Seal it off completely(!), so that no water can enter or escape. Only now you may channel into the southern end of the teleport column. Next, build the two open doors at Level 1 and connect them to X. Pull X twice, so that all the doors connected to X will open and your dwarves will be able to build the two doors in the next cell. Now build the brown, cyan, magenta and green gear assemblies, not(!) the yellow and gray ones. Now build the gray assemblies on Level 2 and 3 in this order, then the vertical axles, then all other gray assemblies, then the horizontal axles and finally the yellow gear assembly. Connect the brown assembly to Y.
Now build the pressure plates. All of them shall trigger on 4/7 - 7/7 water. Connect every plate to the gear assembly of its color, then connect the brown assembly to the previous cell's (!) magenta pressure plate. If you are working on the first cell, connect the brown assembly to Z instead.
Finally, build the cyan screw pump.

Repeat this process another exactly 49 times. Finally, build the thing you want to automash. Connect all green, cyan and magenta pressure plates to it.
Now seal all the cells off so that the only free tiles remaining are exactly the non-black tiles shown in the diagram above. Pull Y. Completely flood the southern passage. Connect the power line to a power source that is VERY sure never to have not enough power. Pull X. Pull Z.

Finally, reach down to your keyboard and pick up your lower jaw again. :D





If you ask politely, I may explain all the construction steps you don't understand. ;D

Also, the first to build a working version of this gets an Internet.  8)
« Last Edit: September 03, 2011, 12:27:47 pm by MagmaMcFry »
Logged

elf-fondling human

  • Bay Watcher
  • 4-d ftw
    • View Profile
Re: Lightspeed Repeater
« Reply #1 on: September 02, 2011, 06:42:38 pm »

http://myfacewhen.com/10/

If this works, I may need to reconsider my path in life...
Logged
That didn't last long, huh? Shame, cause binary's cool. Anyway, an important message: I will be changing my names on every username based thing I use to ASCIt on/around 10/1. Consolidating, I guess you could say.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Lightspeed Repeater
« Reply #2 on: September 02, 2011, 07:14:26 pm »

Unfortunately, this won't work.

A door opens instantly when it gets an 'open' signal.  When a door gets a 'close' signal, it waits 100 ticks, then closes.  Any signals received during that time are ignored.

Floor hatches work the same way.

Floodgates and bridges delay 100 cycles both on opening and closing.

Pumps, when they receive power, start pumping instantly.  But when a pump stops receiving power it keeps running for a short time before it stops.

So even if you have a repeater with a 1 tick delay, there is nothing you can connect it to that can respond faster than about 100 cycles.  (Except maybe upright spikes, which have a 40 tick minimum cycle if I recall correctly.)
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Lightspeed Repeater
« Reply #3 on: September 02, 2011, 07:37:20 pm »

Unfortunately, this won't work.

A door opens instantly when it gets an 'open' signal.  When a door gets a 'close' signal, it waits 100 ticks, then closes.  Any signals received during that time are ignored.

Floor hatches work the same way.

Floodgates and bridges delay 100 cycles both on opening and closing.

Pumps, when they receive power, start pumping instantly.  But when a pump stops receiving power it keeps running for a short time before it stops.

So even if you have a repeater with a 1 tick delay, there is nothing you can connect it to that can respond faster than about 100 cycles.  (Except maybe upright spikes, which have a 40 tick minimum cycle if I recall correctly.)

You are incorrect on doors and hatches. They open AND close instantly when they receive signals. I'm watching a door and hatch in my fort open and close right now.

MagmaMcFry

  • Bay Watcher
    • View Profile
Re: Lightspeed Repeater
« Reply #4 on: September 02, 2011, 07:43:40 pm »

Unfortunately, this won't work.

A door opens instantly when it gets an 'open' signal.  When a door gets a 'close' signal, it waits 100 ticks, then closes.  Any signals received during that time are ignored.

Floor hatches work the same way.

This is wrong. Doors and hatches will work with this setup, I already tested it.
If a door is connected to a pressure plate and the trigger is removed, the pressure plate itself waits 100 turns, then sends a 'close' signal. The door/hatch will then close instantly after receiving this signal. Try using a lever on a door. The door will close instantly, and because the by far easiest way to program this signal-handling mechanism is to implement only one kind of signal, there is very probably only one kind of signal, so the delay is not in the door, but in the pressure plate. My design counteracts this delay by sending a 'close' signal from a different pressure plate than the pressure plate sending the 'open' signal.

But I already knew this design would work only on hatches and doors. Perhaps Toady One will change signal behaviour if he is sufficiently impressed by this, but don't get your hopes up.

So just find some creative ways of using hi-speed door mashing! Perhaps (probably definitely) you can build a really, really fast computer based on pressurized water. Making memory will be a real pain though, because I suppose you will need a 400-step relay cycle for each bit of memory, but it can work, and I already have some really awesome ideas regarding physical bit transfer (hint: craploads of teleport pipes) and about circumventing the 100-step pressure plate delay. It will take a really big embark, a really badass processing core and gimongous bags of patience and spare keyboard keys, but it is possible.

Edit: Thank you ninja, I rest my case.
« Last Edit: September 02, 2011, 07:46:47 pm by MagmaMcFry »
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Lightspeed Repeater
« Reply #5 on: September 02, 2011, 07:51:01 pm »

You are incorrect on doors and hatches. They open AND close instantly when they receive signals. I'm watching a door and hatch in my fort open and close right now.

No.  No, they don't.  I've timed this carefully in previous fortresses.  I've built carefully designed logic engines (such as this one: http://www.bay12forums.com/smf/index.php?topic=69307.0 ) that rely on doors and hatches taking 100 cycles to close.   Doors and hatches open instantly, but take 100 cycles to close when triggered by a lever or pressure plate.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

MagmaMcFry

  • Bay Watcher
    • View Profile
Re: Lightspeed Repeater
« Reply #6 on: September 02, 2011, 07:55:20 pm »

You are incorrect on doors and hatches. They open AND close instantly when they receive signals. I'm watching a door and hatch in my fort open and close right now.
Doors and hatches open instantly, but take 100 cycles to close when triggered by a lever or pressure plate.

I prefer to believe my DF version rather than you. I went through the process frame-by-frame. A few frames after the dwarf reached the lever, the door closed. I definitely would have noticed myself mashing the keyboard for 100 frames.
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Lightspeed Repeater
« Reply #7 on: September 02, 2011, 08:14:46 pm »

The behavior seems to be inconsistent.  I know for a fact I have used pressure plates to trigger doors and floodgates, and that while doors open instantly they have consistently taken 100 cycles to close.  The delay doesn't seem to be there for levers however.  I will have to do further experimenting along these lines.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Forumite

  • Bay Watcher
    • View Profile
Re: Lightspeed Repeater
« Reply #8 on: September 02, 2011, 08:17:55 pm »

I thought this thread was about Legendary Marksdwarves...
Logged
"The ability to quote is a serviceable substitute for wit." - W. Somerset Maugham

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Lightspeed Repeater
« Reply #9 on: September 02, 2011, 08:49:52 pm »

The question: Can we weaponize this?  Is there any conceivable way to, for instance, attach this to an upright spike?  Or, what other purpose would it have?  I deeply and heartily applaud the pursuit of knowledge, but I see little, if any, practical or impractical use for this.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Lightspeed Repeater
« Reply #10 on: September 02, 2011, 08:58:30 pm »

The question: Can we weaponize this?  Is there any conceivable way to, for instance, attach this to an upright spike?  Or, what other purpose would it have?  I deeply and heartily applaud the pursuit of knowledge, but I see little, if any, practical or impractical use for this.

Game lag generator, if you want to drop your FPS.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Lightspeed Repeater
« Reply #11 on: September 02, 2011, 09:13:07 pm »

We already have that.  Kittens and perpetual waterfalls.

Eddren

  • Bay Watcher
    • View Profile
Re: Lightspeed Repeater
« Reply #12 on: September 02, 2011, 09:28:57 pm »

Confusing the F out of a Goblin?

"Er, sir?"
"What, useless Goblin Numbe-Er, Urist McI'maGoblinandNotaKidnappedDwarf?"
"That door's opening and closing so fast that any time our guys go for it, they stop for five minutes, and their heads explode."
"DAMN YOU DWARF !!SCIENCE!!"
Logged
Ah, my dwarven heart beats with fierce pride for this.  I can't take it anymore!  I have to go do something profound.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Lightspeed Repeater
« Reply #13 on: September 02, 2011, 09:32:50 pm »

It'd make for a funky-ass adventuring map, that's for sure...  albeit not an overly difficult one, because a door will not crush you, you can step into it when it's open and walk through.

Eddren

  • Bay Watcher
    • View Profile
Re: Lightspeed Repeater
« Reply #14 on: September 02, 2011, 09:45:46 pm »

I'm just imagining that the door would repeatedly thump you in the back as you walk through.
*thump* "Ow!"
*Thump* "I hate Dwarven Mechanics.."
*Thump* "I'm through!"
Logged
Ah, my dwarven heart beats with fierce pride for this.  I can't take it anymore!  I have to go do something profound.
Pages: [1] 2 3 4