2012-11-10, 19:25:16
First of all, I don't think that it affects multi-shot weapons in any kind, since the buff at the target just appears when the projectile hits it.
The reason for multiple energy torpedoes hitting the same target is probably a different one, too. Especially if it is true, that the target lock on happens before the cooldown is started. Then you try to escape into a bunch of creeps, but the weapon has already locked on.
A whole different thing is, that your weapons fire quite often, and nobody cares if it hits a creep. So the only situations remaining in your mind are those in which you actually got hit by multiple projectiles. This could distort the perception over the real probability.
Now about the low cooldown weapons attacking towers: Yes, that's what I noticed, too. And I also believe that it changes when you are moving. One possible explaination for this: If you stand just at the right position, one projectile will hit the target while another target is started at that same moment... or not, if it sees that the buff is on the target. Because no cooldown matches the exact frame rate, this should only happen periodically, like once a second. If you move though, you change your distance and it does not happen anymore. Or if it does, it only affects a single projectile, since the distance travelled will be different for the next one.
Rewriting it on own code: It takes up quite a lot of performance for two reasons. First, you cannot move effects in warcraft. this is solved by using a dummy unit with no model, attaching the effect and moving that unit. However, units seem to be implemented in a way, that low counts are assumed. So the warcraft code executed in the background adds to the performance cost. Secondly JASS is interpreted by warcraft, meaning that there is warcraft code running, and reading your code, and then translating it into machine code. However, the translation is not done before executing the map / code, it is just done when the code is executed. This means that JASS code is way slower than the actual warcraft 3 code (I think its a factor of about 20 or maybe 100, did some tests at some point). So basically yes, it is possible, but will lag if there are too many projectiles. There's a link to my supreme commander map in the signature, it uses only custom projectiles, works okay, but I don't think that it would be suitable for BT.
Some special weapons like the architects splash cannon however are already implemented in such way. Using it for everything would just put too many restrictions on the count.
The reason for multiple energy torpedoes hitting the same target is probably a different one, too. Especially if it is true, that the target lock on happens before the cooldown is started. Then you try to escape into a bunch of creeps, but the weapon has already locked on.
A whole different thing is, that your weapons fire quite often, and nobody cares if it hits a creep. So the only situations remaining in your mind are those in which you actually got hit by multiple projectiles. This could distort the perception over the real probability.
Now about the low cooldown weapons attacking towers: Yes, that's what I noticed, too. And I also believe that it changes when you are moving. One possible explaination for this: If you stand just at the right position, one projectile will hit the target while another target is started at that same moment... or not, if it sees that the buff is on the target. Because no cooldown matches the exact frame rate, this should only happen periodically, like once a second. If you move though, you change your distance and it does not happen anymore. Or if it does, it only affects a single projectile, since the distance travelled will be different for the next one.
Rewriting it on own code: It takes up quite a lot of performance for two reasons. First, you cannot move effects in warcraft. this is solved by using a dummy unit with no model, attaching the effect and moving that unit. However, units seem to be implemented in a way, that low counts are assumed. So the warcraft code executed in the background adds to the performance cost. Secondly JASS is interpreted by warcraft, meaning that there is warcraft code running, and reading your code, and then translating it into machine code. However, the translation is not done before executing the map / code, it is just done when the code is executed. This means that JASS code is way slower than the actual warcraft 3 code (I think its a factor of about 20 or maybe 100, did some tests at some point). So basically yes, it is possible, but will lag if there are too many projectiles. There's a link to my supreme commander map in the signature, it uses only custom projectiles, works okay, but I don't think that it would be suitable for BT.
Some special weapons like the architects splash cannon however are already implemented in such way. Using it for everything would just put too many restrictions on the count.