Attack speed: Difference between revisions
Pixelentropy (talk | contribs) |
m →Bloons TD 6: Missing 0 |
||
| Line 70: | Line 70: | ||
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. | 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. | 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. | 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. | ||