Log In
Name:
Pass:
Online Members (0)
No members are currently online.
Current Interguild Time:
Sun Sep 24 2023 12:33 pm
Member Chat Box  [click here to enlarge]
Recent Posts and Comments

Author: jebby
Game: Hannah and the Pirate Caves
Date: Monday, February 7, 2011 - 5:52 pm

[?] Karma: +1

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


Level Code:


OR [Open Uploader Page without Uploading]

Link to this level:
ShareThis
Jump to nearby level:

Show/Hide Options

User Comments (8)
« Forum Index < The Hannah and the Pirate Caves Board

DeathBunni X
[?] Karma: 0 | Quote - Link
Monday, February 7 2011, 5:56 pm EST
Eww, school.

Age: 26
Karma: 87
Posts: 690
Gender: Female
Location: Midwest
pm | email
Your real name is James?


  
Isa
[?] Karma: 0 | Quote - Link
Monday, February 7 2011, 6:13 pm EST
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
[?] Karma: 0 | Quote - Link
Monday, February 7 2011, 6:26 pm EST
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
[?] Karma: 0 | Quote - Link
Monday, February 7 2011, 6:30 pm EST
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
[?] Karma: 0 | Quote - Link
Monday, February 7 2011, 7:42 pm EST

Age: 34
Karma: 350
Posts: 2990
Gender: Male
pm | email
I made an Adder that added up to 15+15, once, a while back -- CLS originally had a 3+3 one, I think.
http://www.interguild.org/levels/index.php?id=1681

It's completely impossible to follow, lol.
Isa
[?] Karma: 0 | Quote - Link
Monday, February 7 2011, 7:44 pm EST
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
[?] Karma: 0 | Quote - Link
Saturday, March 19 2011, 6:19 pm EST
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?
Code:
 v   
      
  k  
> k >
 >  |

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:
Code:
  v  
     
> k  
    >
> k  
     
  > ^


And for the OR-gate:
Code:
  v  
     
>|   
  k >
>|   
     
  > ^


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.


Spoiler:
shos
[?] Karma: 0 | Quote - Link
Sunday, July 17 2011, 11:22 am EST
~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 Board

In order to post in the forums, you must be logged into your account.
Click here to login.

© 2023 The Interguild | About & Links | Contact: [email protected]
All games copyrighted to their respective owners.