What uses more processing power? Active Instant Action, or Passive Periodic Action??

This was something I thought about today....

Consider two abilties:

  1. Passive ability that uses a periodic action to apply a buff X
  2. Active ability that uses an instant action to apply a buff X

So, which one uses less processing power?  At face value, intuitively I'd think the active using an instant action....but let us add some extra considerations...

Let's say I want to apply a buff X (via an entity like a ship, SB, or structure, doesn't really matter) to the local planet...furthermore, this buff has no time limit (something like an owner change may end the buff, but that's not important)...now, let us reconsider the two above options...

The passive ability has to apply the buff every t seconds...so, that's an action the processor has to consider every t seconds...

Unlike the passive, the active ability is guided by an autocast...so, while their is no periodic action sucking up processing power, does the game not need to perform "checks" to see if it should activate?  For example, the game should not activate this particular ability more than once since (to my knowledge) autocasts check to see if the buff has already been applied (at least targetted buffs, and I hope buffs applied to local orbity body)....

So the core of my question lies in this...in order to "see" if the buff already exists, wouldn't the autocast function have to constantly perform "checks"?  How is that different than a periodic action that performs an action every t seconds?  Would the active ability using an instant action (guided by autocast) really be any more efficient than the passive ability using a periodic action?

2,832 views 1 replies
Reply #1 Top

Let me put it this way... I've never had active abilities noticeably cause lag before they are even cast. If they weren't extremely efficient the devs wouldn't be giving two or more for each unit. I have had periodic action totally stall the game with sufficient numbers (they produce a distinctive stuttering when you have a ton of them). While I would love some thoughts from the programmers themselves, in my experience its no contest, periodic actions are the least efficient way to do anything.

So the core of my question lies in this...in order to "see" if the buff already exists, wouldn't the autocast function have to constantly perform "checks"? How is that different than a periodic action that performs an action every t seconds? Would the active ability using an instant action (guided by autocast) really be any more efficient than the passive ability using a periodic action?
End of quote

Its actually in the buff file whether the ability should try and reapply a buff to the same target or not. And you could say the same about constraints and stuff.