Thread: Timed Effects
View Single Post
Old 01-22-2009, 10:25 PM   #13
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by moyack
PoC runs the single timer version, and it works very smooth...
Perhaps for you, but on weaker hardware or in a more challenging map it could lead to problems. I agree that the difference isn't big; but if you apply that logic to every spell and system then you eventually get a considerable difference once you compose them all together into a single map.

The single-timer version doesn't require other libraries, which could be considered a bonus in the case of any system other than TimerUtils. In the case of such a used library, however, it's pretty inconsequential.

If you insist on including a one-timer version then you may do so, but it should be secondary to the TimerUtils one (put it lower in the post, maybe use hiddenjass tags and explain beforehand it's intended for people who for some bizzare reason don't use TimerUtils) and the timer definitely shouldn't be running when there are no effects being timed.

Also, I second Dusk on the naming conventions. If you insist on this function format (function taking an already existing effect) at least name it accordingly, something like DestroyEffectDelayed or something.

The first post should also note in the introduction that many effects (the ones with a single animation) can be destroyed immediately after they are created. People who don't know that and stumble on this resource might otherwise think they should use it on all their effects.
__________________
Anitarf is offline   Reply With Quote