Attack speed: Difference between revisions
Qwertyxp2000 (talk | contribs) kinda got started with BATTD, only merely know that a speed caps apparantly exists there |
m Minor fixes; →[[Bloons TD 6|''Bloons TD 6'']]: Added Template:Cleanup due to poor grammar and/or spelling |
||
| (6 intermediate revisions by 5 users not shown) | |||
| Line 15: | Line 15: | ||
=== [[Bloons Tower Defense (game)|''Bloons Tower Defense'']] / [[Bloons Tower Defense 2|''Bloons Tower Defense 2'']] === | === [[Bloons Tower Defense (game)|''Bloons Tower Defense'']] / [[Bloons Tower Defense 2|''Bloons Tower Defense 2'']] === | ||
In these games towers are programmed to attack every certain amount of frames which can be converted into seconds considering they run at 40 frames per second. The only upgrade that modifies attack speed is Faster Shooting for [[Tack Shooter|Tack Shooters]], reducing it from 55 to 40 frames. Using the [[Upgrade stacking glitch]] (also called "hypersonic Tack Shooter glitch"), allows to purchase this upgrade multiple times, reducing the cooldown of the tower 15 frames every time. After 4 stacks, the cooldown of the Tack Shooter would be less than 0 frames, so the tower reaches a speed cap and attacks every frame | In these games, towers are programmed to attack every certain amount of frames which can be converted into seconds considering they run at 40 frames per second. The only upgrade that modifies attack speed is Faster Shooting for [[Tack Shooter|Tack Shooters]], reducing it from 55 to 40 frames. Using the [[Upgrade stacking glitch]] (also called "hypersonic Tack Shooter glitch"), allows to purchase this upgrade multiple times, reducing the cooldown of the tower 15 frames every time. After 4 stacks, the cooldown of the Tack Shooter would be less than 0 frames, so the tower reaches a speed cap and attacks every frame; further upgrades do not change this behavior. | ||
=== [[Bloons Supermonkey 2|''Bloons Supermonkey 2'']] === | === [[Bloons Supermonkey 2|''Bloons Supermonkey 2'']] === | ||
| Line 27: | Line 27: | ||
=== [[Bloons TD 6|''Bloons TD 6'']] === | === [[Bloons TD 6|''Bloons TD 6'']] === | ||
{{cleanup|Needs cleanup for grammar and/or spelling}} | |||
Attack speed in ''BTD6'' is implemented with a mechanic internally named '''cooldown'''. This cooldown is the amount of time in seconds which a tower will take before executing an attack or performing certain actions such as [[Spike Factory (BTD6)|producing spikes]] or [[Sun Temple (BTD6)|spawning sub-towers]]. This is measured in seconds, and the upgrades modify the value of this stat to a certain number. However, if the player notices the amount of damage that a tower is dealing before and after an attack speed or buff is applied, sometimes the tower seem to be doing better than expected, and this is because on how the actual attack speed / cooldown mechanic is implemented. | Attack speed in ''BTD6'' is implemented with a mechanic internally named '''cooldown'''. This cooldown is the amount of time in seconds which a tower will take before executing an attack or performing certain actions such as [[Spike Factory (BTD6)|producing spikes]] or [[Sun Temple (BTD6)|spawning sub-towers]]. This is measured in seconds, and the upgrades modify the value of this stat to a certain number. However, if the player notices the amount of damage that a tower is dealing before and after an attack speed or buff is applied, sometimes the tower seem to be doing better than expected, and this is because on how the actual attack speed / cooldown mechanic is implemented. | ||
| Line 64: | Line 65: | ||
<math display="block">\text{Increase} = \left ( \frac{0.33}{1-0.33 } \right ) \times 100\% \approx 49.3 \% </math> | <math display="block">\text{Increase} = \left ( \frac{0.33}{1-0.33 } \right ) \times 100\% \approx 49.3 \% </math> | ||
Attack animations do not have a correlation with the visual frame rate of the game, however the internal calculation of the game engine is performed 60 times per second, because of this, when the cooldown timer expires, the attack will be performed in the next calculation frame, and if the attack cooldown does not align with these frame rate, the next attack can be performed a frame early or late to compensate. For example if a tower has a cooldown of 0.22s, its first attack would happen at frame 14 (0.2333s), then at frame 27 (0.45s), frame 40 (0.6667s), frame 53 (0.8833) and frame 66 (1.1s), doing a cycle of 14-13-13-13-13 calculation frames between attacks. | |||
In cases of very fast cooldowns, the animations can be visually skipped or show inconsistencies, but they don't have impact on the actual attack speed. With high game lag, each visual frame will be the same than a calculation frame, representing 1/60 of a second. | |||
When the attack cooldown is lower than 0.1s, the game engine change will start to perform the attack in the nearest calculation frame and not in the next one, this can cause a Tower to fire two projectiles on the same frame. In this case each projectile will behave like normal in terms of damage, pierce and any buff, if present. Each frame can only fire one extra attack, so a Monkey is limited to 120 attacks per second, starting two every 1/60 of a second (0.0167s). For example, if the attack cooldown of a tower is 0.01s (equivalent to 100 attacks per second), it would still only fire 60 times per second, but 40 out of those 60 attacks would launch two projectiles instead of one. | |||
Even if the cooldown of a tower is lower than 0.00833s (equivalent to 120 attacks per second), the Tower will still be limited to 120 attacks per second, and to compensate, the damage of each projectile is increased to properly deal the correct amount of damage on average. For example if a tower has an attack that deals 2 damage and a cooldown of 0.005s (equivalent to 200 attacks / 400 damage per second), it will still attack every 1/60 of a second, launching two projectiles per attack, and each projectile damage would be increased to 3.3333 damage so it averages to 400 damage per second. | |||
To handle fractional damage, the game rounds down the damage and the remainder is added to the next projectile. In the previous case the 3.3333 damage means that for every three projectiles that the tower launches, two will deal 3 damage and one will deal 4 so they average 3.3333 damage. | |||
The cooldown limit of the game is 0.001s (equivalent to 1000 attacks per second) and cannot be further decreased. A tower with 2 damage per attack and this cooldown, would still only attack every 1/60 of a second with two projectiles at the same time, and each projectile would deal 16.6667 damage to have an average of 2,000 damage per second. | |||
There are specific interactions of towers with such high cooldowns that are not intuitive due to the limit of 120 attacks per second, for example if the tower of the previous example (2 damage, 0.001s cooldown, 1 projectile per attack, 1 pierce) would attack an arbitrary large amount of Red Bloons, it would only be able to pop a maximum of 120 of them per second. If the same Tower attacks Bloons under the effect of an [[Embrittlement (BTD6)|Embrittlement]], each projectile would deal 17.6667 damage, increasing the total damage per second against a single target to only 2,120 because the +1 damage bonus is applied per projectile. | |||
===''Bloons Adventure Time TD''=== | ===''Bloons Adventure Time TD''=== | ||
{{incomplete}} | {{incomplete|need to figure out more on how blockingCooldown works}} | ||
In ''[[Bloons Adventure Time TD]]'', | In ''[[Bloons Adventure Time TD]]'', attack speed is implemented internally as '''cooldown''' and measured in seconds, much like ''Bloons TD 6''. Some attacks have an animationSpeed variable as well which governs the lowest possible cooldown that attack can have. If this variable is not present then the lowest the cooldown can go is 1/60th of a second, or 1 frame ingame, which can be achieved with a combination with items and upgrades. All cooldowns are round up to the next frame. | ||
On the character's stat pages, attack speed displayed is actually the inverse of cooldown from the main weapon. It is similarly mentioned as such in balance patch notes. | |||
== References == | == References == | ||
<references /> | <references /> | ||
== Navigation == | |||
{{Attack_mechanics_nav}} | |||
[[Category:Game mechanics]] | [[Category:Game mechanics]] | ||
[[Category:Game mechanics in BTD5]] | [[Category:Game mechanics in BTD5]] | ||