Help needed with factory building / resource gathering mechanics

I am trying to create a game with factory building mechanics, with mining, transporting, and combining materials to use to create units/ammo for turrets, however i am having trouble working on how everything will work

Currently the system works like this:
Each building has its own stats (health, team, ect) in attributes, some of these are what type of material it accepts as input, how much it has stored, how much it can dispense into other buildings ect
CONS WITH THIS:

  • Attribute hell
  • Only 1 type of input supported
  • Extremely rigid
  • All buildings can only hold exactly one material type and it cant change easily

Another system im thinking of is each building having a storage folder which holds all the materials in it, the materials being individual instances (like i.e empty model) and just moved between buildings and deleted when consumed by them

Im not really sure about any flaws/better solutions and id like to see if anyone else with more experience knows better implementations and/or possible improvements

1 Like