HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Timer Arrays

01-26-2008, 05:23 AM#1
chobibo
Is using a timer array with a fixed amount bad? i.e. pre-creating 1000 timers at map initialization?
01-26-2008, 08:03 AM#2
Av3n
Maybe you should ask, why you need a thousand timers...

A 100 will do, though 1000 at map init = lag

-Av3n
01-26-2008, 08:12 AM#3
Iron_Doors
Perhpaps create 100 timers at map initialization and use a backup system if they arent enough for some reason. Altough from my experience having shitloads of handles hanging around doesnt neccessarely have a noticeable effect. I once had a map where i created 8000 units. My fps dropped below 2 i think. However when I modified the map so that all of those units were hidden just after creation all the problems went away. So I would assume that idle handles arent that bad.

The SmartTimers system here on wc3campaigns uses this pre-creating method btw. http://www.wc3campaigns.net/showthread.php?t=85753
01-26-2008, 09:40 AM#4
cohadar
Quote:
Originally Posted by chobibo
Is using a timer array with a fixed amount bad? i.e. pre-creating 1000 timers at map initialization?

It's Ok.
I know that for example Toadcop uses that in his silly game
01-26-2008, 09:52 AM#5
chobibo
Thanks guys!
@ Aven: no man it doesn't lag i tried creating 2000 timers at map init lol.
Timer Arrays - Wc3C.net