HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [] Question about Timer Vs Event System performance.  (Read 902 times)

Lunchbox

  • World Owners
  • ****
  • Posts: 136
    • View Profile
    • BrandNGames
[] Question about Timer Vs Event System performance.
« on: Nov 25, 12, 05:39:20 PM »

I am trying to optimize my spawner system. I had thought it was causing the initial fps hit when entering the first area but that doesnt seem to be it even though performance goes up after the first set of mobs spawn. If I remove the system completely performance still stays low which is weird.
Anyways I got to thinking maybe I should move from a timer on each spawner node to 1 master timer sending out a event message to all spawners periodically.
System 1 has a master spawner that spawns the sub spawner nodes, each sub spawner node has a timer that ticks down and fires off and spawns the mobs when needed.
System 2 master spawner has a timer and spawns the sub spawner. The master spawner fires off a event message every 10 seconds which the sub spawners listen for. When it gets the message it runs through some comaprisons and either spawns a mob or continues on til the next firing.
Which system is more beneficial performance wise, Im guessing the event one with one timer but wanted to make sure.
« Last Edit: Dec 09, 12, 04:37:19 PM by HE-Cooper »
Logged