The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2014-02-16 19:18:02

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

Multiplexing

This doesn't seem too useful yet since I haven't gotten the size down, but here's an example of the concept:

http://castledraft.com/editor/C4lcVc

In the top left there's a 3 cycle (on/off/off) oscillator that's shifted twice. All three signals are fed through the switches and combined. At the bottom left the same signal is generated and used to read out which switches are pressed. In the bottom right it converts oscillating current to full current.

Unless I've made an error here, the each of the buttons should control the indicator light that's lined up with it.

Offline

#2 2014-02-16 19:40:51

Blip
Member
Registered: 2013-05-07
Posts: 505

Re: Multiplexing

That's really impressive. As an EE guy myself, I find it really cool that you're applying real-world devices to the Castle Doctrine. However, it seems like this specifically might not be much of a help. It actually makes it easier to reach the core electronics room for a brute-forcer, because they only have one line of walls to cut through. While I love the electronic side of the game, and am working on some new, secret designs myself (CDHDD v2, anybody? Let's relive v8 with the massive block of wires!), it sort of seems like a lot of it takes up too much room for its worth.

I'm not trying to dissuade anybody from electronics, because its hella awesome, but personally, I prefer to stick to my sadistic doggy deathtraps. tongue


Current life: Not dead, but I have no clue who I am
The Life and Times of Christopher Alvin Harris
Record: 149 Paintings!

Offline

#3 2014-02-16 20:20:57

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

Re: Multiplexing

That's a pretty interesting implementation, but I may be missing the point. I've built multiplexers before and they are nowhere near as complicated or huge.

This 2-bit muxer appears to work fine: http://castledraft.com/editor/fLeq1E

I think I used this to built a blueprint house way back in the day, but I don't know it's very useful for traps. Especially since you can already redirect signals with rotary switches.

Last edited by jere (2014-02-16 20:24:22)


Golden Krone Hotel - a vampire roguelike

Offline

#4 2014-02-17 04:02:40

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

Re: Multiplexing

Blip wrote:

It actually makes it easier to reach the core electronics room for a brute-forcer, because they only have one line of walls to cut through.

Well, the idea was to reduce the number of wires that need to lead somewhere important. The control room can be farther away since the space/distance cost goes down. But with this big of an upfront space cost it's not worth it.


Jere: I'm confused. Are we using the same meaning of the word multiplex?

Offline

#5 2014-02-17 05:25:17

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

Re: Multiplexing

A while ago now I created a house that relied the player sending different signals through the houses wiring in order to trigger core electronics to close the trap doors leading to the vault:
http://castledraft.com/editor/jyAZTg

In general it was pretty effective and there is a lot of potential for this sort of thing. For Mr Earl Wilson's house I used a similar idea of having different signals sent right through my house's electronics trigger the electronic doors to close.

The house above was made at a time when indicator lights were indestructible. To use it now the design would have to be modified a little to make sure the initial signalling electronics cannot be modified to provide full power to the trapdoors.

See if you can figure out how to get to the vault without tools.

Last edited by joshwithguitar (2014-02-17 05:25:46)

Offline

#6 2014-02-17 05:35:21

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

Re: Multiplexing

Jere: I'm confused. Are we using the same meaning of the word multiplex?

http://en.wikipedia.org/wiki/Multiplexer

In electronics, a multiplexer (or mux) is a device that selects one of several analog or digital input signals and forwards the selected input into a single line.

Multiplexer2.png

That's what my example does. It uses 2 control bits to select from 4 signals. http://castledraft.com/editor/fLeq1E


Golden Krone Hotel - a vampire roguelike

Offline

#7 2014-02-17 05:38:04

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

Re: Multiplexing

http://en.wikipedia.org/wiki/Multiplexing

In telecommunications and computer networks, multiplexing (sometimes contracted to muxing) is a method by which multiple analog message signals or digital data streams are combined into one signal over a shared medium.

Mine does something different. I guess it would be called time division multiplexing.



jwg: That is a nightmare.

Last edited by redxaxder (2014-02-17 05:57:57)

Offline

#8 2014-02-17 05:58:51

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

Re: Multiplexing

Oh, ok I see. That's pretty neat.


Golden Krone Hotel - a vampire roguelike

Offline

#9 2014-02-17 09:01:48

sebastian
Member
Registered: 2014-01-31
Posts: 68

Re: Multiplexing

Did not work. Did try the Circuit. Result: All Three lights light up regardless of which buttons that are pressed, except for one state: When none button is pressed, then none lights are light.

Offline

#10 2014-02-17 09:14:46

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

Re: Multiplexing

Hmm. I must have messed something up. I'll debug it when I have the funds.

*Edit:

I figured out the problem. The oscillators running the thing were on/on/off instead of on/off/off. So each of them had at least one cycle of overlap with the others and set off everything.

This one is tested and working:
http://castledraft.com/editor/ww4G0z

Last edited by redxaxder (2014-02-17 09:38:44)

Offline

#11 2014-02-17 10:08:51

sebastian
Member
Registered: 2014-01-31
Posts: 68

Re: Multiplexing

The 2 pulse generators are not identical. The bottom one has a crossed wiring while the upper one has horizintal wiring. Nearest the first Power source.

Marked the differences.
Are those supposed?
http://castledraft.com/editor/BZVrln

Last edited by sebastian (2014-02-17 10:09:51)

Offline

#12 2014-02-17 10:27:24

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

Re: Multiplexing

The horizontal one is the correct one.

http://castledraft.com/editor/ntEfeC

Offline

#13 2014-02-17 11:31:29

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

Re: Multiplexing

If I'm understanding you correctly, your multiplexor is supposed to send several different lines of information through the same wire?  Basically, squeeze 3 wires into 1 tile?


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

#14 2014-02-17 11:58:15

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

Re: Multiplexing

^I think that's it. I'm trying to think about how this is useful. Maybe that data wire is a huge electric floor hallway and that way you can have a bunch of crazy behavior on the other side without having the electronics there.


Golden Krone Hotel - a vampire roguelike

Offline

#15 2014-02-17 14:12:20

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

Re: Multiplexing

I had no idea what was going on in your example, so I decided to take my own shot at it.  This is how far I got before I had to stop (that was just before I realized I needed a stabilizer).  Anyways, now I understand your multiplexer much better!

Basically, there are three parts:

1. Multiplexer: This gives every button power on a different clock step.  That way, the single wire transmits info based on what clock step you're on. (Top left circuit in your house, left part of mine)
2. Demultiplexer: This takes the single wire and "divides" the clock steps from it into different wires. (This is the bottom left part of your house)
3. Stabilizer: Since the info coming through each wire from the de-multiplexer is only powered on 1 clock step, you have to "stabilize" it.  The stabilizer, if it receives power on a single clock step, provides power for the rest of the turn.  Basically, a "latch", but one that stores power over clock steps instead of human steps. (This is the bottom right part of your house.  I was going to design "per wire" stabilizers, but your version scales much better).

Anyways, I just realized the key to making it much smaller.  We both were tackling it the wrong direction - turning a single clock step of power into continuous power, thorugh the stabilizer.  I'm positive the better way is for the de-multiplexer to provide continuous power to each line, except for a single step.  That power from that step would come from the multiplexer line (if it's on).  I don't have time to work it out right now, but it *should* be the key to making the circuit smaller!


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

#16 2014-02-17 17:53:13

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

Re: Multiplexing

iceman: if you have two switches active at once, there will be feedback up the wire that causes additional pulses. I dealt with that using a one-way gate for each wire. It ate up a lot of space. Also, I think you have an extra bit of wire on the top left pulse generator.


Here's an attempt at a demuxer of the kind you suggested: http://castledraft.com/editor/Wc8qkK

I ran into trouble in that I need to OR three pairs of wires together, but I can't allow any feedback in any direction (or everything is borked). So I ended up using 6 additional one-way power gates. The size seems to be a bit smaller, but the savings wasn't as drastic as I was hoping.

Last edited by redxaxder (2014-02-17 17:53:54)

Offline

#17 2014-02-17 19:13:32

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

Re: Multiplexing

redxaxder wrote:

iceman: if you have two switches active at once, there will be feedback up the wire that causes additional pulses. I dealt with that using a one-way gate for each wire. It ate up a lot of space. Also, I think you have an extra bit of wire on the top left pulse generator.

Right on both accounts wink  I figured out the feedback part when I actually got close to finishing a working version.

I'd been working on my own version of the "improved" demuxer, and this seems to work (lights are not aligned, though).  Basically, in the bottom right part, each  demux wire cuts off the power from the next mux wire.  When a demux wire is turns off, the next turn the next switch is passable.

You can cut a LOT of money off by reusing power supplies, but, like you said, it doesn't save as much space as I thought it would.  I was thinking it would be simpler to remove the stabilizer than it really was.

On a side note/shameless plug, the 1 step electronics mod is a *lifesaver* when I was trying to debug the electronics.

On another side note, am I the only one feeling like a scientist who's working on cutting edge advancements that making incredible discoveries that should be impossible?    The depth of this electronics system just astounds me! (Even though I don't think anything past clocks is going to be helpful)  For instance, I'm pretty sure it's actually possible to transmit 1 bit of information without wires, if you use the 32 step limit.  Completely impractical, considering the size of the map, but still, possible.

Last edited by iceman (2014-02-17 19:28:17)


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

#18 2014-02-17 19:33:54

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

Re: Multiplexing

jere wrote:

^I think that's it. I'm trying to think about how this is useful. Maybe that data wire is a huge electric floor hallway and that way you can have a bunch of crazy behavior on the other side without having the electronics there.

Look at the example I posted earlier in the thread. That house did pretty much what your are describing, except using trapdoors and dog-doors instead of electric floor. It works through the player sending pulses through the house to the "crazy" electronics on the other side. And it was pretty effective.

Offline

#19 2014-02-17 19:42:36

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

Re: Multiplexing

That certainly looks like a neat house. I think you're going to have to annotate that a little bit though.... I'd have no clue unless I sat down with this for like an hour.

The part that I'm asking about though: is this useful considering the weakness of wired walls? The house you posted is extremely susceptible to saws. Maybe if steel walls conducted again and they were extremely expensive, this would an awesome way to conserve money.


Golden Krone Hotel - a vampire roguelike

Offline

#20 2014-02-17 19:47:38

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

Re: Multiplexing

joshwithguitar wrote:
jere wrote:

^I think that's it. I'm trying to think about how this is useful. Maybe that data wire is a huge electric floor hallway and that way you can have a bunch of crazy behavior on the other side without having the electronics there.

Look at the example I posted earlier in the thread. That house did pretty much what your are describing, except using trapdoors and dog-doors instead of electric floor. It works through the player sending pulses through the house to the "crazy" electronics on the other side. And it was pretty effective.

You could also have something that looks like this, and have the combo actually be down instead of up (and trick people into spending all their money sawing that way).  Sure, considering the amount of space you would need to do that, it would be impossible, but while we're giving ideas... wink

jere wrote:

That certainly looks like a neat house. I think you're going to have to annotate that a little bit though.... I'd have no clue unless I sat down with this for like an hour.

The part that I'm asking about though: is this useful considering the weakness of wired walls? The house you posted is extremely susceptible to saws. Maybe if steel walls conducted again and they were extremely expensive, this would an awesome way to conserve money.

I think this is going to be most useful saving space for just 2 wires.  Instead of having the connection between buttons and pits be either a) 3 wide, no holes or b) 2 wide, checkered, you could have it only 1 solid line of walls, with some more space at both ends.

EDIT: The rest of the thread got moved here, for going off on a tangent important enough for its own thread.  Anything after this post is back to multiplexing

Last edited by iceman (2014-02-19 12:25:13)


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