The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#51 2014-02-06 15:38:22

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: Clocks!

Idylla wrote:

Thanks Iceman smile My FU is now flashing away nicely!

What have I done?!?!?

=P


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

#52 2014-02-13 03:37:44

Jfre
Member
Registered: 2014-02-13
Posts: 1

Re: Clocks!

Noob here, what's a "counter circuit"?

Offline

#53 2014-02-13 07:43:43

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Clocks!

Jfre wrote:

Noob here, what's a "counter circuit"?

If you look at the castledraft map in the OP you'll notice that there is a repeated pattern of electronics that is connected to the clock signal generator. Each of those is a binary counter bit which alternates between an "on" and "off" whenever it receives a pulse and also sends a pulse whenever it switches "off". So, the inital bit will alternate every time you move or use a tool, the second will alternate every 2 turns, the 3rd every 4 turns and the 4th every 8 turns.

Try creating yourself to see it in action. You might want to use one of the updated signal generators from later in the thread though.

Offline

#54 2014-02-15 10:44:16

mala
Member
Registered: 2014-02-10
Posts: 415

Re: Clocks!

maybe i'm missing something, i've built multiple version of the signal generator but i can't get any of them to work.

http://castledraft.com/editor/KUy0gd

shouldn't i see a pulse while moving around?

i've linked it to a counter but i had the same result. am i doing something wrong? obviously yes but i don't understand what big_smile

Last edited by mala (2014-02-15 10:44:39)


Current Incarnation: none
Previous Houses: Ticking Nightmare - Luna's Park - Hightower Mansion - Chang's Place

Offline

#55 2014-02-15 10:53:55

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: Clocks!

mala wrote:

maybe i'm missing something, i've built multiple version of the signal generator but i can't get any of them to work.

http://castledraft.com/editor/KUy0gd

shouldn't i see a pulse while moving around?

i've linked it to a counter but i had the same result. am i doing something wrong? obviously yes but i don't understand what big_smile

You shouldn't see a pulse when moving around, it will appear off at the end of the turn. The point of the pulser circuit is to give a tiny subturn pulse.

Offline

#56 2014-02-15 11:50:42

mala
Member
Registered: 2014-02-10
Posts: 415

Re: Clocks!

i've connected it to an electric floor and nothing happen, same thing with pit, nothing ever change it's state


Current Incarnation: none
Previous Houses: Ticking Nightmare - Luna's Park - Hightower Mansion - Chang's Place

Offline

#57 2014-02-15 11:58:45

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: Clocks!

mala wrote:

i've connected it to an electric floor and nothing happen, same thing with pit, nothing ever change it's state

That's exactly what a pulser should be doing. You need to connect it to some counters if you want to make a clock.

Offline

#58 2014-02-15 12:30:42

mala
Member
Registered: 2014-02-10
Posts: 415

Re: Clocks!

colorfusion wrote:
mala wrote:

i've connected it to an electric floor and nothing happen, same thing with pit, nothing ever change it's state

That's exactly what a pulser should be doing. You need to connect it to some counters if you want to make a clock.

i did it as shown in the op (but maybe the wiring is wrong)

the third signal generator in my example is linked to a counter that it's linked to an electric floor, but it never powers on sad


Current Incarnation: none
Previous Houses: Ticking Nightmare - Luna's Park - Hightower Mansion - Chang's Place

Offline

#59 2014-02-15 12:34:43

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: Clocks!

mala wrote:
colorfusion wrote:
mala wrote:

i've connected it to an electric floor and nothing happen, same thing with pit, nothing ever change it's state

That's exactly what a pulser should be doing. You need to connect it to some counters if you want to make a clock.

i did it as shown in the op (but maybe the wiring is wrong)

the third signal generator in my example is linked to a counter that it's linked to an electric floor, but it never powers on sad

The wiring is wrong, it's connected to the upper wires when it should be connected to the voltage switch. Look at some of the other castledraft posts for examples.

Offline

#60 2014-02-15 17:00:44

mala
Member
Registered: 2014-02-10
Posts: 415

Re: Clocks!

colorfusion wrote:

The wiring is wrong, it's connected to the upper wires when it should be connected to the voltage switch. Look at some of the other castledraft posts for examples.

ok, now i think i've made the right connection

http://castledraft.com/editor/JB8u76

but i still getting no result from the first design, never saw a single tick in the counter.

the second one is ticking, red light goes on/off each step, but the output is always off. i've noticed the the "inverted voltage trigger" in the lower right is the only one that never change it's state (everything else but that and output does) is that normal?


Current Incarnation: none
Previous Houses: Ticking Nightmare - Luna's Park - Hightower Mansion - Chang's Place

Offline

#61 2014-02-15 17:04:26

jere
Member
Registered: 2013-05-31
Posts: 540

Re: Clocks!

mala, that light is the output. connect something to the wires up there.


Golden Krone Hotel - a vampire roguelike

Offline

#62 2014-02-15 17:24:55

mala
Member
Registered: 2014-02-10
Posts: 415

Re: Clocks!

jere wrote:

mala, that light is the output. connect something to the wires up there.

damn i feel so stupid....

but than why the red light isn't flashing in the first scheme?

http://castledraft.com/editor/dPCXFv

Last edited by mala (2014-02-15 17:33:56)


Current Incarnation: none
Previous Houses: Ticking Nightmare - Luna's Park - Hightower Mansion - Chang's Place

Offline

#63 2014-02-15 17:38:07

redxaxder
Member
Registered: 2014-02-08
Posts: 96

Re: Clocks!

Each game turn runs the electronics for a number of cycles until they start repeating themselves. If, when that happens, something is getting constant current, it's on. Otherwise, it's off.

The light you put in the middle is getting a signal that goes on/off/off/off/off/... so it's treated as being off. Because it's live only for a single cycle each turn.

Offline

#64 2014-02-15 17:59:39

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Clocks!

mala wrote:
jere wrote:

mala, that light is the output. connect something to the wires up there.

damn i feel so stupid....

but than why the red light isn't flashing in the first scheme?

http://castledraft.com/editor/dPCXFv


The top "counter" bit is a chain counter bit that requires other chain counter bits to be useful. If you look at my brothers original example you'll notice that the signal generator connects to the top part of the bit and that otherwise each bit is connected to the one before it. Each pulse of the clock sets causes each bit to take on the value of the one before it. You'll notice in the bottom left corner there is a single pulse generator. This is there to set the initial bit to "on", otherwise the entire thing would remain "off". Now each turn the "on" bit will cycle around the clock.

The second bit you have there is a binary counter bit and is much more efficient for counting to higher numbers.

Offline

#65 2014-02-15 20:04:43

Pandamonium
Member
Registered: 2014-02-10
Posts: 123

Re: Clocks!

joshwithguitar wrote:

If you look at my brothers original example you'll notice that the signal generator connects to the top part of the bit and that otherwise each bit is connected to the one before it. Each pulse of the clock sets causes each bit to take on the value of the one before it. You'll notice in the bottom left corner there is a single pulse generator. This is there to set the initial bit to "on", otherwise the entire thing would remain "off". Now each turn the "on" bit will cycle around the clock.

Hey jwg, are you able to "circle" the area;s of your brother image to explain?

I don't know where to connect the "output" wires to all this. It's kinda doing my head in.

Offline

#66 2014-02-15 23:46:21

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Clocks!

Pandamonium wrote:
joshwithguitar wrote:

If you look at my brothers original example you'll notice that the signal generator connects to the top part of the bit and that otherwise each bit is connected to the one before it. Each pulse of the clock sets causes each bit to take on the value of the one before it. You'll notice in the bottom left corner there is a single pulse generator. This is there to set the initial bit to "on", otherwise the entire thing would remain "off". Now each turn the "on" bit will cycle around the clock.

Hey jwg, are you able to "circle" the area;s of your brother image to explain?

I don't know where to connect the "output" wires to all this. It's kinda doing my head in.

It really depends on what you are trying to achieve. For most purposes I'd go with a binary counter instead. You can have a look at my new design and how to use the outputs here: http://thecastledoctrine.net/forums/vie … php?id=944.

If you really want to use a chain counter like my brothers design - and they have lots of interesting uses - the best way to figure out what is happening is probably to replace a lot of the standard wires with indicator lights. This way you can tell what is powered when and what parts you can attach things to use as output.

Offline

#67 2014-02-16 05:39:00

redxaxder
Member
Registered: 2014-02-08
Posts: 96

Re: Clocks!

Pandamonium wrote:
joshwithguitar wrote:

If you look at my brothers original example you'll notice that the signal generator connects to the top part of the bit and that otherwise each bit is connected to the one before it. Each pulse of the clock sets causes each bit to take on the value of the one before it. You'll notice in the bottom left corner there is a single pulse generator. This is there to set the initial bit to "on", otherwise the entire thing would remain "off". Now each turn the "on" bit will cycle around the clock.

Hey jwg, are you able to "circle" the area;s of your brother image to explain?

I don't know where to connect the "output" wires to all this. It's kinda doing my head in.

This is the heart of the thing:

http://castledraft.com/editor/KoHbmW

This is called a D flip-flop. To use it, you connect a clock signal (http://castledraft.com/editor/iUYnu7) to the wire marked with a door. The vault marks the input wire. The shotgun marks the output wire. This circuit will copy the input level to the output at each clock pulse.

Hippasus has 8 of these set up in a loop, all connected to the same clock signal. So each of them copies the level the one behind had last turn.

In the bottom left of the picture you see one of these: http://castledraft.com/editor/ZRjDXK. This will generate a single 1-cycle pulse the first turn and activate one of the D flip-flops through its output side.

Offline

#68 2014-02-16 07:03:25

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Clocks!

redxaxder: Where did you get the term "D flip-flop" from?

Offline

#69 2014-02-16 07:09:21

jere
Member
Registered: 2013-05-31
Posts: 540

Re: Clocks!

Not sure if you're asking about what it is or his usage, but http://en.wikipedia.org/wiki/Flip-flop_ … _flip-flop


Golden Krone Hotel - a vampire roguelike

Offline

#70 2014-02-16 07:13:12

redxaxder
Member
Registered: 2014-02-08
Posts: 96

Re: Clocks!

joshwithguitar wrote:

redxaxder: Where did you get the term "D flip-flop" from?


http://en.wikipedia.org/wiki/Flip-flop_(electronics)

a flip-flop or latch is a circuit that has two stable states and can be used to store state information.

Flip-flops can be either simple (transparent or opaque) or clocked (synchronous or edge-triggered); the simple ones are commonly called latches.

The D flip-flop is widely used. It is also known as a "data" or "delay" flip-flop.

The D flip-flop captures the value of the D-input at a definite portion of the clock cycle (such as the rising edge of the clock). That captured value becomes the Q output. At other times, the output Q does not change. The D flip-flop can be viewed as a memory cell, a zero-order hold, or a delay line.

Offline

#71 2014-02-16 09:01:22

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Clocks!

I guess this is what happens when people who actually know about real electronics scrutinise our terminology smile.

Offline

#72 2014-02-16 09:11:02

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: Clocks!

joshwithguitar wrote:

I guess this is what happens when people who actually know about real electronics scrutinise our terminology smile.

I still prefer paradox circuits and clock bits.

Offline

#73 2014-02-16 10:22:34

redxaxder
Member
Registered: 2014-02-08
Posts: 96

Re: Clocks!

joshwithguitar wrote:

I guess this is what happens when people who actually know about real electronics scrutinise our terminology smile.

I don't actually know any real electronics. The vocabulary has just been useful when talking about KOHCTPYKTOP. There are a lot of similarities between that game and the TCD's electronics model.

Offline

#74 2014-02-16 13:31:03

LiteS
Member
Registered: 2014-02-07
Posts: 167

Re: Clocks!

arakira wrote:

I finally decided to have a try at building a clock (I remember being stuned the first time I entered Huckabee's house. Loved it!). I had fun today building a "waltz" clock, a clock with period 3 (I had never seen one before). I'm not sure if this one is really interesting for building a trap, because if you are facing a trap that turns on/off based on an odd number period and if you can move a bit around, then you can move back and forth until you are facing the trap the way you want (if you want to do this in front of an even period trap, you may have to use a tool to catch up the tempo). Maybe with the help of pets it could become interesting.
However, this is my try, and it is the most compact I can build so far:
http://i.imgur.com/NXvhPLI.png
The 3 first rows are the pulse generator, nothing new here.
The idea of this clock is that there are 2 storage areas, the indicator light zones. On the first step, the lights on the left turn on. On the second step, the energy passes to the lights on the right. On the third step, they are all reset (there is a test on wether the two zones are on at the same time).
I'm pretty sure this can be improved, so I'd like to tempt electronics specialists around here if they can build some more simple or smaller waltz clock!

I replicated the original design and moved components around and came up with a more vertically compact design, 5 tall by 16 wide, as opposed to the original 9 by 9 design (One less tile! Hours of work! Yay!). I haven't tried to understand how it works yet, so my ability to compress was limited to removing power sources. And I found a nice interesting trap design for this, although I suppose a 4 step would serve a similar purpose. If anyone can compress the left half, it'd be greatly appreciated.
http://castledraft.com/editor/hzJ3AI

Edit: That version has errors, corrected is here (Thanks iceman!) http://castledraft.com/editor/tAX5wK

Last edited by LiteS (2014-02-16 14:31:21)

Offline

#75 2014-02-16 14:09:12

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: Clocks!

Your version had just a couple of errors that made it not work; I'm guessing you made this manually in CastleDraft? (there's a way to do it almost automatically - there's instructions on castledraft) Here's the working version:

http://castledraft.com/editor/tAX5wK

I just removed a + wire from the top right, and changed the right wire bridge in the left part of the circuit to a voltage triggered switch.

Still, good job!

Last edited by iceman (2014-02-16 14:12:42)


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

Board footer

Powered by FluxBB 1.5.8