Jump to content
Stray Fawn Community
  • 4

More Input rows to logic gates


Roblin

Suggestion

Idea:

more (preferably arbitrarily many) input rows for AND/OR/NOR/NAND gates

 

purpose:

simplify programming

 

currently if you want to make a signal that means ROTATE_RIGHT AND RESOURCE_FOUND AND ENEMY_NEARBY AND STUCK_UNDER_TERRAIN

you would need to first make an AND gate that combines ROTATE_RIGHT and RESOURCE_FOUND into ROTATE_RIGHT AND RESOURCE FOUND and then

use another AND gate to combine ROTATE_RIGHT AND RESOURCE_FOUND and ENEMY_NEARBY into ROTATE_RIGHT AND RESOURCE_FOUND AND ENEMY_NEARBY and then

use another AND gate tat combines ROTATE_RIGHT AND RESOURCE_FOUND AND ENEMY_NEARBY and STUCK_UNDER_TERRAIN into ROTATE_RIGHT AND RESOURCE_FOUND AND ENEMY_NEARBY AND STUCK_UNDER_TERRAIN.

 

why not just let us use 1 AND gate to take all 4 inputs? it's unlikely to affect the balance of the game since the partial AND statements are often useful in ones drone, but I see little reason why the logic gates are limited to taking so few inputs when their various functions can be so easily extended to allow arbitrarily many inputs.

 

possible implementations:

AND gate: take any number of inputs, gives output if all inputs are recieved.

OR gate: take any number of inputs, gives output if any inputs are recieved.

NOR gate: take any number of inputs, gives output if no inputs are recieved.

NAND gate: take any number of inputs, gives output as long as any input is not recieved.

  • Like 1
Link to post
Share on other sites

3 replies to this suggestion

Recommended Posts

  • 0

This needs an XOR/XNOR implementation. How would this work?

For 2, it is simple enough. (if only one is on, output ON if not, output OFF).

For 3 onwards, even numbers turn the gate off, and odd numbers turn the gate on. Obviously, this would be flipped for the XNOR gates.

Also, the Tag system acts like an OR gate with the key adjacent to them. This means that you can have OR gates with at most 4 inputs.

Link to post
Share on other sites
  • 0

@garr890354839

true, one can use the keys + the tags to make OR gates with effectively more inputs, but for purposes of more structured programming, I would strongly discourage anyone from programming with keys. the single-letter notation makes the names very ambigous and it is far easier to avoid bugs by using tags with descriptive names like ROTATE_RIGHT or FIRE.

 

even when making a drone that is partially controlled by the player and supplementally controlled by logic I would encourage people to have IF gates that translate keystrokes into tags for programming the internal machinery.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...