Page 1 of 1

Factorissimo as game concept

Posted: Thu Apr 20, 2017 2:23 am
by MrFancyPants
Something which I've liked the idea of since seeing it partially in Spacechem is nested systems, the same concept is in Factorio with the Factorissimo mod.

The interesting thing about these subsystems is that with the right tweaks they can be blackboxed, for those who don't know what that means wikipedia has this "...when a machine runs efficiently, when a matter of fact is settled, one need focus only on its inputs and outputs and not on its internal complexity".

In other words you could take a Factorissimo factory, simulate it for a few minutes and say "Ok, as long as the inputs remain constant at X then this factory can produce Y units per minute". Once you leave the factory then that's all that needs to be simulated, as long as the raw materials keep coming at the set rate then you don't need to worry about simulating the internals, you can just skip straight to the Y per minute that you know it will produce. Ok what if they are interrupted? Well this is where you need to tweak the factory concept a bit, if they're interrupted you add a stall mechanic or some other punishment for missing the inputs. When you restart the factory the simulation is run again to tweak the new input values and output values as they might have changed.

So why is all this interesting (to people like me)? Because black boxing allows an almost ridiculous level of recursion, imagine a version of factorio where you zoom from the map to the factory level, zoom further into the design of an individual inserter which has it's own subgame for how fast it can grab etc. Zoom further into an individual subcomponent which also has its own subgame level. Each time you make a tweak or advancement the same rules apply, take the simulation, derive an output based on assumptions (e.g. X units of circuit board as long as inputs remain at Y per minute) and then zoom out. This would radically change the way the tech tree would be implemented, instead of research points to create the fast inserter you'd refine the existing one until it's subgame was giving you an improved X grabbed per Y figure.

Ok so what about these subgames? The best examples of what these could be already exist as games in their own right which is those produced by Zachtronics (forum rules prevent me from linking, just google "Zachtronics")

Hopefully that all made sense and even better sounds enjoyable to someone other than just me :)

Re: Factorissimo as game concept

Posted: Tue Apr 25, 2017 8:14 pm
by ssilk
Why did you post this in off-topic? Should I move it to Suggestions?
And there have been some suggestions around this topic, just search for factorissimo in suggestions.

Re: Factorissimo as game concept

Posted: Wed May 10, 2017 10:29 pm
by boksiora
hi,

some time ago when i tried to make a mega base and i had FPS issues and i thought of the same concept



the simulation does not need to keep track of millions amounts of items

if input items amount does not change, the simulation can cache output->output ratio produce no UPS/FPS penalty for "blackboxed" regions

Re: Factorissimo as game concept

Posted: Wed May 10, 2017 11:08 pm
by Distelzombie
boksiora wrote:hi,

some time ago when i tried to make a mega base and i had FPS issues and i thought of the same concept



the simulation does not need to keep track of millions amounts of items

if input items amount does not change, the simulation can cache output->output ratio produce no UPS/FPS penalty for "blackboxed" regions
It will never register when a ressource runs out. That wouldnt work :)

Re: Factorissimo as game concept

Posted: Wed Jul 05, 2017 3:24 am
by Sactorio
Great idea MrFancyPants.
Distelzombie wrote:
boksiora wrote:the simulation does not need to keep track of millions amounts of items

if input items amount does not change, the simulation can cache output->output ratio produce no UPS/FPS penalty for "blackboxed" regions
It will never register when a ressource runs out. That wouldnt work :)
When what runs out? He said "if the input doesn't change". After the machine is stable, the game should treat it as a black box, taking X input and producing Y output. Only when the input changes (or the player is in the subfactory) do you need to simulate it.

Ultimately vanilla Factorio could do this by analysing regions that can be treated as black boxes (it basically already does this with power distribution), but it's easier and takes less CPU when the player is doing the work of defining the regions (Factorissimo factories).

Re: Factorissimo as game concept

Posted: Sat Mar 03, 2018 11:39 am
by driver
The idea inspired me to a screenshot comparison factorio (with couplermod) and industry giant2:
https://imgur.com/6dX8IBW
https://imgur.com/WOdkGOb

Re: Factorissimo as game concept

Posted: Sat Mar 03, 2018 11:51 am
by Caine
Blackboxing a simulated factorissimo factory only works when it has no side-effects. For example, a factory does not need to output anything, it can store end-products internally.

If the internal state of the factory matters in any way (buffer chests, circuit network state, non-constant belt saturation, etc.) then this would not work. The complexity of simulating internal state quickly scales up towards just running the entire internal factory.

Re: Factorissimo as game concept

Posted: Fri Mar 23, 2018 9:50 am
by Sactorio
Woops Caine you're totally right, I wasn't thinking. This could be very powerfully exploited - purposefully, or more likely, accidentally - for instance by tricking the simulation into calculating that a subsystem has an excellent and stable input/output ratio when really that output is only sustained for just long enough to satisfy the simulation (e.g. through the use of internally stored resources). Even if the black boxes are regularly re-simulated, that just means the subsystem has to satisfy the input/output ratio every X seconds whenever the simulation happens.

You're effectively introducing uncertainty to the game, and the uncertainties would multiply with each black box, leading to very strange and chaotic results. All kinds of nonsense would happen, and be totally game-breaking. The whole draw of Factorio is that is an actual simulation.

And no, the current implementation of the power distribution system is not a black box as I implied. There is no possibility of side-effects with power AFAICS as it is already abstracted.

Re: Factorissimo as game concept

Posted: Sun Mar 25, 2018 9:51 am
by driver
While assemblers are a very flexible concept, quite abstract and could be compared to modern 3D-printers for small and decentralized production, maybe the most basic structures with only one output like smelters or lumber mill that you are used to play with in many other rts-games (for example rise of nations) could look different and could have a different building.

Re: Factorissimo as game concept

Posted: Fri May 18, 2018 3:12 pm
by zane49er2
When I have free time again, I'm planning to do something similar, but with components a little more like those of TIS-100. You start at a simple grid with inputs and outputs of computer, zoom in to see systems, zoom in to see circuits, zoom in to see logic gates, zoom in to see transistors, etc. To bridge different layers, such as binary to (hexi)decimal on higher level, there could even be parts made just to interface between levels. I've also wanted to do a puzzle game with the concept, a lot like Opus Magnum.

Re: Factorissimo as game concept

Posted: Sat May 19, 2018 1:17 am
by Sactorio
Thinking further - I think the problems could be minimized by re-simulating the black boxes at random intervals? For instance if each black box were actually being simulated only 5% of the time, but the period between simulations could be anywhere from 5 seconds to 2 minutes. These numbers could be varied for a balance between the number of black boxes, the performance needed, and accuracy. In aggregate it would be kinda like how physics simulations work.