Author: jebby Game: Hannah and the Pirate Caves Date: Monday, February 7, 2011 - 5:52 pm
Description: I spent a couple of hours today designing a logic circuit in HATPC. It is pretty simple and might crash every now and then (most likely for those with slower Internet). My first attempt uses four inputs, two AND gates, a NOT gate and an OR gate. The OR gate was particularly temperamental and caused the circuit to crash occasionally, though I seem to have fixed that. One of the 16 outputs opens the door. The inputs are represented by wooden crates and are set to 0; they run from left to right as ABCD.
My aim is to develop a uniform system of logic gates so that pretty much any part can be copied and pasted for others to build their own circuits easily. I also want to figure out how to build an XOR gate; this shouldn't be too difficult though.
Due to the limited time that I have for this kind of thing, it would be cool if others could try and further this project to design more complex and efficient circuits without them being so condensed that they are difficult to follow. The cave's up on jebby457; please let me know if you find any serious bugs or exploits in it. And I realise that this has been done before, but I've been learning about logic circuits recently and thought it would be fun to implement them in HATPC. Also, it would be nice to have a clear system that people could use to make their own 'circuit caves'.
Cheers,
James (Jebby) Image: 
Dimensions: 80x62 — Treasures: 0 — Water: None This is a novelty level |
|
User Comments (8) | DeathBunni X |
Eww, school.
Age: 26 Karma: 87 Posts: 690 Gender: Female Location: Midwest pm | email
|
Your real name is James?
| | Isa |
No. I'm an octopus.
Age: 31 Karma: 686 Posts: 7833 Gender: Male Location: Uppsala, Sweden - GMT +1 pm | email
|
I'm the first to admit that I don't understand what this does - you say you have two AND gates, along with one NOT and one OR. My question is...how can I tell? | | jebby |
Interguild Founder
Age: 31 Karma: 233 Posts: 968 Gender: Male Location: United Kingdom pm | email
|
http://www.kpsec.freeuk.com/gates.htm - this site has pictures of logic gates.
In this map, the OR gate (top-left) takes two inputs. If both are 0 (no arrow), the output of the OR gate is 0. Otherwise, it is 1. The two AND gates (bottom-left and top-right) only have outputs of 1 (an arrow) if both the inputs are 1. Otherwise, they are 0. The NOT gate (middle) takes one input. The output is always the opposite of the input. Combine a bunch of these logic gates together and you have a combinatorial logic circuit with a large number of possible input combinations. There are 16 different inputs; 15 result in 0 and the door doesn't open. The other 1 (the input combination you have to work out) will give an overall output of 1 and open the door.
Each set of inputs set the state of the next logic gate and then immediately after, the 'power' (or maybe clock pulse, you could say...) enters the logic gate and releases the output. The output enters the next logic gate and sets its output. The 'power' comes down once again soon after and releases the next output. | | jebby |
Interguild Founder
Age: 31 Karma: 233 Posts: 968 Gender: Male Location: United Kingdom pm | email
|
The four inputs are set to 0000. Hitting the right-most wooden crate changes the input to 0001, for example. The 'puzzle' is actually pretty easy to solve (in fact, it can be easily done through trial and error); the point of this cave was mainly to see if I could make a logic circuit with HATPC. I hope to make more in the future that are clearer and more efficient. | | canadianstickdeath |
Age: 34 Karma: 350 Posts: 2990 Gender: Male pm | email
|
| | Isa |
No. I'm an octopus.
Age: 31 Karma: 686 Posts: 7833 Gender: Male Location: Uppsala, Sweden - GMT +1 pm | email
|
I am pretty sure his was 8+8, actually... | | jellsprout |
Lord of Sprout Tower
Karma: -2147482799 Posts: 6445 Gender: Male pm | email
|
I haven't tried this level yet, but I think the input should be 0011.
Also, is there a reason something simple like this won't work for a NOT-gate?
The input is the highlighted arrow. It would seem to be far more compact, faster and reliable than your NOT-gate.
Similarly, for the AND-gate you could use:
And for the OR-gate:
These are similar to your gates,but far more compact and less complicated. They also have a nice level of symmetry, like the NOT-gate having the output at the same height as the input, making it easy to use them together.
And just brainstorming here, but could something like this work for the XOR-gate:
Code: >
> v
o
>k
o >
> k
xo ox
xx xx
x <^
xx xx
xxxxx
The sequence arrow should hit the bottom of the two > arrows at the top. The top arrow will fall down, while the hit arrow will cause an arrow sequence. If there was no input, there will be no boulders at the bottom and the arrow crate will fall into the hole and the arrow will fly over it. If there was one input, there will be one boulder in the hole and the arrow crate will land at the correct height. If both input gates were active, there will be two boulders and the arrow crate will fall too high.
I haven't tried this, but it would probably work.
| | shos |
~Jack of all trades~
Age: 30 Karma: 388 Posts: 8271 Gender: Male Location: Israel pm | email
|
Is this what we discussed on Facebook once? this should be interesting. I will test it sometime later today, and see if you deserve the kudos. by the way, the conversation on the adder is quite funny.
edit: sorry for the necro, I really have alot of unread topics, didn't notice the date :S i am seriously going to check it out tho~
| | |
« Forum Index < The Hannah and the Pirate Caves BoardIn order to post in the forums, you must be logged into your account. Click here to login.
|