Thursday, January 26, 2012

On inputs and outputs

Inputs and outputs are the glue of all blocks and thus all systems. They are what allow the infinite reconfigurability of the various interacting ecosystems of Flat Galaxy. I have drafted a few simple rules for inputs and outputs which will govern their behavior. These rules are not set in stone. Actually, they very likely will change a great deal as I go along, since everything hinges upon the behavior of inputs and outputs making sense and most importantly, not causing Flat Galaxy to come to a screeching halt.

I have given a description of inputs and outputs in a previous post, but I will repeat my definitions here, as they currently stand:

Each input and output (abstract "put") will have:
  • A name
  • A fuel type
  • An external and/or internal type value
  • A modifying factor
  • An amount (or capacity or bandwidth)
And each input will have:
  • A queue
  • An accept/refuse insufficient fuel switch
  • A wait/discard fuel switch
Draft #1 of Rules for Outputs:
  1. An output will always try to send as much of its block's remaining fuel as possible, up to a max of the output's Amount*Factor.
  2. Output capacities are determined by the quality and type of the output (not the type of fuel it can output).
  3. Output factors start at x1 and remain so unless a skill increases or decreases that factor.
Draft #1 of Rules for Inputs:
  1. An input's capacity does not guarantee it will receive that amount of fuel. That depends on the output to which it is connected.
  2. Input capacities are determined by the quality and type of the input (not the type of fuel it can receive).
  3. Input factors start at x1* and remain so unless a skill decreases** that factor.
These rules allow for fuel conversion without producing more total fuel than a block started with (at best, equal amounts). By utilizing the ranked output list in conjunction with outputs as described above, a block can convert smaller amounts of various fuels into a large amount of a desired fuel or vice versa. Note: There is not a guarantee of a one-to-one correspondence between an input and output of the same fuel type in a block. That is, you are not guaranteed that gaining X amount of Fuel A via your input will allow you to send off X amount of Fuel A via your output. Your block must be configured correctly and the proper amounts of total fuel must reach your block in order for this to occur.

There are some major gotchas here, like what happens when an output and input's capacities and factors disagree, but I haven't yet worked those details out. Likely they will tie into how skills modify the input/output factors vs. how much of a given skill exists in the world at the time. It will probably get a little complicated, but such complication will be necessary for balance, and will be presented as simply as possible to the end user.

* This will almost certainly change to model natural energy loss in energy exchange, but I haven't yet figured out what the formula will be, so for now it's x1.

** Meaning input factors can only reach a maximum of x1. If the input factor were x0.5, a skill could modify it to increase towards x1.

No comments:

Post a Comment