Plot of stored resources over time using lamps
Posted: Tue Oct 06, 2015 10:06 am
In the image, the input signal is the amount of iron ore in a chest being filled up by a mining drill. As you can see it is going up over time, until it suddenly drops, which is when i took some iron ore out of the chest, then it continues to go up. The far most right column of pixels shows the amount of iron ore in the chest at the present time.
This design would be really nice to have in a real game. For example, you could have it display your iron in storage, so you could see how your stored iron has changed over time.
You can adjust the scale of both the vertical axis and the time axis! using 2 constant combinators. In the photo, the plot is using a linear scale, but you could use a logarithmic scale instead by changing the multiplication constants in the right most column of arithmetic combinators.
The way it works is by having a corresponding smart chest for each pixel. If there is a piece of concrete in the chest then the corresponding pixel lights up. On each clock cycle, the smart inserters move any concrete in the chests one chest to the left. Hence, slowing down the clock cycle increases the scale of the time axis. Logistic bots collect the concrete once it reaches the end and deliver it to the start of the chain, however you could use belts instead.
Limitations
I couldn't get any more than 14 pixels in the Y-direction (vertical) because the red/green wires wouldn't stretch far enough. However, there is no limit to the number of pixels in the X-direction. The refresh time can't be too quick or the green inserters cant keep up, however longer refresh times are more practical because you can see what the signal has been doing over a longer time frame. It is also difficult to power all the lamps because there is no room for power poles. I had to use bob's mk4 substations. Probably the biggest limitation is that it doesn't work properly if you have any inserter stack size bonuses, although there may be ways around this.