FactoryInput - Insufficient energy

    Joined
    Jul 5, 2013
    Messages
    372
    Reaction score
    0
    I get these red error popups (Insufficient energy) floating above some of my FactoryInput blocks. I don't see why, because each of these are connected to 5 power blocks. Overall power regeneration on the station is almost 1 million. And why only those factories but not the others. I even tried remove and replace them individually.
    https://www.dropbox.com/s/7vn8g0um669jvnm/ins_energy.png
     
    Joined
    Jul 14, 2013
    Messages
    97
    Reaction score
    0
    Judging by your power numbers, It looks like you don\'t have any power storage units installed on that station. If the total amount of energy consumed by a single tick of your factory (500 energy per operation, so if you have 4 enhancers linked to one factory input it consumes 2500 power per tick) is greater than the default 20k energy limit, it will perform a tick on every factory block it can, and the remaining ones will have insufficient energy.

    I\'m not entirely certain this is your problem, but if it is, adding enough energy storage to cover a full tick of your factory would fix this.
     
    Joined
    Jul 5, 2013
    Messages
    372
    Reaction score
    0
    Yeah that seemed to be the case. I get no power errors anymore, after putting power tanks on station.
     
    Joined
    Jul 5, 2013
    Messages
    372
    Reaction score
    0
    Well, it could still be a bug though. If they would somehow reserve power, we should see it somewhere. Station\'s used, or maximum energy is not affected when new factory blocks are placed. Besides, these are empty modules that aren\'t doing anything.
     
    Joined
    Jul 14, 2013
    Messages
    97
    Reaction score
    0
    It\'s a bit confusing to new players the way the factories consume all their energy in a single burst every 5 seconds, meaning there\'s no benefit to having more than 20% of your maximum energy regenerated per second on a factory station (unless it also has to power turrets, obviously).

    I made a game with a similar delayed-tick system for certain structures (in this case, the growth step for plants and trees in an evolving forest), and the way I got around the tick-burst was to set up a queue of all the structures that use delayed ticks and a counter variable. Once per game tick, you add the queue size * the time since the last tick to the counter, and then check the value of the counter to determine how many of those objects you should update. In pseudocode:

    1. Method partialUpdate ( Queue& objectQueue, float& updateCounter, float elapsedSeconds )
    2. updateCounter = updateCounter + objectQueue.size * elapsedSeconds
    3. Object tempObject
    4. While updateCounter > SECONDS_BETWEEN_PARTIAL_UPDATES
    5. tempObject = objectQueue.Dequeue()
    6. tempObject.Update()
    7. objectQueue.Enqueue( tempObject )
    8. updateCounter = updateCounter - SECONDS_BETWEEN_PARTIAL_UPDATES
    9. EndWhile
    10. EndMethod

    This technique is quite useful for any game objects that don\'t require frequent discrete updates, as you can increase the time between object updates to far beyond that of the game\'s regular update frequency, saving a lot of processor power. With this method only some of the objects are updated each game tick, but each object is updated, on average, exactly once every N seconds.

    In the case of Starmade\'s factory ticks, this would mean that you could run very large factories with a very low maximum power, as long as your power cores were generating enough energy per second to cover them.

    That having been said... I am not the developer for this game, and I can\'t say for certain that Schema doesn\'t want the factories to all update on a single, syrchronized five-second tick. There may be an engine or design reason I\'m not aware of preventing him from implementing this sort of gradual update system.