To many Timers?
BaDDApple
Member Posts: 49
I have been reading posts about optimization and having to many timers can be bad. I have spawner with at least 10 timers that launch different actors randomly on screen the player must avoid. The actors do destroy themselves when they reach a certain height. I wonder if having this many timers is bad or should I come up with a rule set where I have one timer that spits out a random numbers and than based on the number launch the actors. Would that be better? Thanks to the community for their help. I have learned a lot by reading the forums.
BaddApple
BaddApple
Comments
So, you have a timer actor that counts up.
Then, in your spawner, have a rule that says:
When timer = 10, spawn fighters at X,Y
When timer = 20, spawn battleships at X,Y
and so on.
The last rule says:
When timer = 240 (or whatever)
Spawn 'Level Complete' Actor
Destroy Timer.
Does that help?
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
@tshirtbooth,
in my new game i have a lot of timers, the thing is that the FPS is above 40,
but before i added the timers the RAM was about 20-25 and now its about 40-45 !!
the FPS is still 40 + ..... is it ok?! what is affecting RAM usage?
(its 40-45 and even without sounds and full graphic )
i just discovered a very strange thing, i have a timer (after 2 sec spawn actor)
with this time the RAM is 43 usage at initial start, without this timer its 38!, a single timer increase the RAM 5 mb more !?!?
i just confirmed this, but why is this happening? the actor that is spawned is not heavy ruled ,
i mean , 5 mb of RAM ?! why?