Friday Facts #88 - Combinators

Regular reports on Factorio development.
Lupoviridae
Fast Inserter
Fast Inserter
Posts: 155
Joined: Mon Apr 20, 2015 6:26 pm
Contact:

Re: Friday Facts #88 - Combinators

Post by Lupoviridae »

NotABiter wrote:
I've been thinking about the "Decider Combinator" (with the output set to "Input Count" and operator set to '<'), wondering if it could somehow be used to latch arbitrary values (by toggling the 2nd input between MIN_INTEGER and MAX_INTEGER), but I'm not exactly seeing an easy solution. (The immediate problem is that you need to somehow loop the output back to the input in order to "remember" the value, but you don't want to wire-add the remembered value to the original input value.) Maybe with two of them linked together with some fancy timing of the secondary inputs...
Here's what I came up with for storing an arbitrary input value. Sorry for the potato quality (on lunch break at work)
IMG_20150610_124552.jpg
IMG_20150610_124552.jpg (132.8 KiB) Viewed 7437 times
When a "red" signal is sent, decider 1 records the "set" state. the current input for B (in this case 52) is captured by decider 2 and sent to 3 and 4. 4 Then forwards the value to 5, while 3 sends out a signal to stop 4 from continuously outputting B (which prevents the infinite addition problem). 5 and 6 act as the memory cell, passing the value of B back and forth. By then hooking up 3-out to 6-in, the reset signal can be introduced to the memory cell (5+6).

The only problem is in input signal B ever falls to zero the cell drops its memory... but there are multiple ways around that.

Lupoviridae
Fast Inserter
Fast Inserter
Posts: 155
Joined: Mon Apr 20, 2015 6:26 pm
Contact:

Re: Friday Facts #88 - Combinators

Post by Lupoviridae »

Refined the idea a little bit, adds an extra 2 deciders but should work assuming I am understanding everything correctly.
(Again, sorry for the poor quality)
IMG_20150610_143314.jpg
IMG_20150610_143314.jpg (57.61 KiB) Viewed 7418 times

lyallp
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Jan 24, 2015 8:03 am
Contact:

Re: Friday Facts #88 - Combinators

Post by lyallp »

Given combinators allow 'programming', how about including a 'Comment' field where we can place notes, to remind us of what we are actually doing?
So, we can see the comment whilst 'programming' the cominator and see the comment in the tooltip of the combinator.

Nothing worse than programs with no comments, especially when the programmer thinks themselves real smart, resulting in a program that is not easily understood by the next person that comes along to maintain it, or even the original programmer, years later!

:)
...Lyall

Zeeth_Kyrah
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Tue Jan 21, 2014 10:05 pm
Contact:

Re: Friday Facts #88 - Combinators

Post by Zeeth_Kyrah »

lyallp wrote:Given combinators allow 'programming', how about including a 'Comment' field where we can place notes, to remind us of what we are actually doing?
So, we can see the comment whilst 'programming' the cominator and see the comment in the tooltip of the combinator.

Nothing worse than programs with no comments, especially when the programmer thinks themselves real smart, resulting in a program that is not easily understood by the next person that comes along to maintain it, or even the original programmer, years later!

:)
A comments field would be awesome, but you know what? I want signs we can make for general use, not only for combinators! I want to be able to label zones, machines, and belts. I want to mark things with text for planning purposes. I want to add a sign that says "Biters go away" or "Zeeth was here" or other such messages. I want to write stories and letters in-game. It would be simple to have the sign's text appear in the info box when one mouses over the entity.
Planned projects: Energy Crystals Plus, Minor Fluid Handling, Small electric furnaces
(high-energy materials and assembler, fluid void burner and small tank, tiny and slow furnaces with charcoal)

lyallp
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Jan 24, 2015 8:03 am
Contact:

Re: Friday Facts #88 - Combinators

Post by lyallp »

Actually, to show just how dumb I am, I am having trouble getting a blinking light to work.

Would someone mind informing me of the exact settings of each of the 4 items?

Also, how do I delete a misplaced red or green wire? Do I have to delete the combinator and start again?

And, if I do delete the combinator, what's this about the red/green wires vaporising into nothingness?

Edit: I got the light flashing, good thing I don't suffer from epileptic siezures, it blinks so fast! How do we slow the blink down using the 4 items shown in the Friday Facts #88 post?
...Lyall

Sander Buruma
Fast Inserter
Fast Inserter
Posts: 100
Joined: Mon Jun 02, 2014 9:55 am
Contact:

Re: Friday Facts #88 - Combinators

Post by Sander Buruma »

I made an array of lights that turn on at different signal quantities, and it is on a loop.
http://youtu.be/vLLZLqXDURI
That may give you an idea.

Edit: switched in a clearer demo vid.
Last edited by Sander Buruma on Sat Jul 18, 2015 1:09 pm, edited 1 time in total.

lyallp
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Jan 24, 2015 8:03 am
Contact:

Re: Friday Facts #88 - Combinators

Post by lyallp »

Thanks for that.

Finally got it working after about 15 watches, lots of switches to full screen to try pick the detail, pauses to catch those brief displays of the settings of each object.

It is not obvious at all that the + combinator has a green wire to the power pole, in fact, it's not entirely obvious that the green wires don't come from the + combinator rather than the power pole.

If you decide to update that video, you may like to spread the gear apart a little.
In fact actually construct it in the video, slow enough so that people have time to press pause.
I am sure if I had trouble, others will.
:)

Now... to go and try figure out what is going on...
...Lyall

ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: Friday Facts #88 - Combinators

Post by ratchetfreak »

lyallp wrote:Thanks for that.

Finally got it working after about 15 watches, lots of switches to full screen to try pick the detail, pauses to catch those brief displays of the settings of each object.

It is not obvious at all that the + combinator has a green wire to the power pole, in fact, it's not entirely obvious that the green wires don't come from the + combinator rather than the power pole.

If you decide to update that video, you may like to spread the gear apart a little.
In fact actually construct it in the video, slow enough so that people have time to press pause.
I am sure if I had trouble, others will.
:)

Now... to go and try figure out what is going on...
check out his topic on that for my input about delays: https://forums.factorio.com/forum/vie ... 827#p91827

Sander Buruma
Fast Inserter
Fast Inserter
Posts: 100
Joined: Mon Jun 02, 2014 9:55 am
Contact:

Re: Friday Facts #88 - Combinators

Post by Sander Buruma »

Is there a chance we can have the save file with the factorio scrolling sign?

Twinsen
Factorio Staff
Factorio Staff
Posts: 1348
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: Friday Facts #88 - Combinators

Post by Twinsen »

Sander Buruma wrote:Is there a chance we can have the save file with the factorio scrolling sign?
Here you go :) https://forums.factorio.com/forum/vie ... =8&t=13755

Post Reply

Return to “News”