Discuss the massively-multiplayer home defense game.
You are not logged in.
I'm having trouble figuring out clocks and such when loops (understandably) die and everything reverts to 'off'... Anyone have any examples?
The simplest circuit that loops is this:
Initially power can get through, as the inverted voltage switch is in its Off state. By letting power through, however, the power reaches back up and turns itself On which extends the arm and stops power getting through. This once again turns it Off, which lets power through, which turns it On, which turns it Off, &c..
The game wants all all electrical components to be settled after 16 sub-steps like this. If it detects tiles that are still looping, it sets each one individually to its lowest seen state. That's usually (I think always) its unpowered/off state. This circuit will settle down to how it looks in the picture. Even though it looks like power should be getting through, the game has forcefully decided that the wires should be unpowered, and the switch should also be off so that they can stop looping.
This will still be recalculated each turn, but overall it will appear to stay off. Also to note is that death is calculated after wiring is done settling, so standing on an electric floor connected to this circuit is completely safe, because (although it technically turns on and off in between turns) it settles down to off before death is tested.
Although these mid-turn pulses can't be seen and traps don't really react to them, other wiring still receives them:
The second part added on here will start off, but stay on as soon as it receives any signal. This is because the signal will power the voltage trigger which then lets power through for itself. The small sub-turn signals will still trip this component on the first turn wiring is simulated, thus fully powering the whole circuit.
That's pretty much all the trickery that you need to know to understand clocks, so long as you already know basic wiring.
The first main component of a clock is a pulser that lets out a signal every turn, like the first circuit shown above (although more controlled), this is fairly simple.
The next parts are counters. The logic behind them is basically if they receive a pulse, activate a gate like the second component above which keeps themselves powered. However if that part is already tripped and powered, unpower it in some way and pass the pulse onto the next counter. They toggle on and off every pulse, and if they went from high to low they pass the pulse along to the next one.
In a chain of these, each one is triggered half as often as the one before. The ones at the end will most rarely get a pulse going all the way through. This actually creates a binary counter.
That's the basics of what clocks do. The exact wiring differs by design.
Last edited by colorfusion (2014-01-29 11:11:30)
Offline
OK well I've been trying to follow this and it doesn't seem to quite add up like I expected so I thought well I'm missing something so I'll replicate what's pictured and then I should be able to follow it.
So I made a copy of Hippasus's post "....repeating circuit with period 8...."
It did nothing. Guess I'm either still not following something or maybe there was a mistake it in somewhere.
I'm trying to make a repeating circuit that would flash on and off with each step. Is that possible?
If I vanish it's not due to a burglar shooting me as well as my wife while making his way to the vault....
I'm just a burst player.
Offline
To change every turn, just use the first two circuits in the example in this thread: http://thecastledoctrine.net/forums/vie … php?id=519 (In fact, a few posts down it has an improvement for the first circuit, the signal generator).
To use any of the clocks, just plug your traps into the wires connected to the top of the lights.
Fortress Theory Mod - New objects, tools, and paintings!
I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.
Offline
Whew... that's insane to learn. Made a few mistakes and killed myself. Getting it now... this is gonna be cool.
If I vanish it's not due to a burglar shooting me as well as my wife while making his way to the vault....
I'm just a burst player.
Offline
Once I figured it out, it's kind of fun to make corridors with timing puzzles
Offline
Tell me, gents, am i doing something wrong, or loops don't work/need to be updated after version 30? I made a loop, as described in second example in colorfusion's post, but it won't work
Offline
Tell me, gents, am i doing something wrong, or loops don't work/need to be updated after version 30? I made a loop, as described in second example in colorfusion's post, but it won't work
Everything should still work in V31. Keep in mind the second example doesn't alternate or anything, it's just to show that electronics can receive the mid-turn pulses. You should have a look at the clocks thread if you want something that loops/repeats.
Offline
Whoa! magic. So it means that i need bit storage to actually made it work, because pulse generator completing it's hidden cycle in one turn. Thanks, colorfusion. Yesterday i figured out how to build self-protected code system, but after five minutes i saw that i need protection system for protection system, lol
Offline