Main Menu

Timers in CW

Started by UpperKEES, August 11, 2010, 02:19:08 PM

Previous topic - Next topic

UpperKEES

I just read the following at the Adobe site:

QuoteChange in timer behavior

In previous versions of AIR and Flash Player, timers did not restart the timer interval until any code triggered by the timer finished executing. Thus, if you created a timer to repeat every 500ms, and it took 200ms to execute the code in your timer event handler, then the timer would actually dispatch a timer event every 700ms.

As of AIR 2.0.3 and Flash Player 10.1, timers now restart the timer interval immediately. Thus a timer with a repeating interval of 500ms will now fire every 500ms, regardless of how long the code triggered by the timer event handler takes to execute.

This change can cause the timers in your application to dispatch timer events more frequently than before. Because the code triggered by the timer is run more frequently, the overall CPU utilization of your application may increase. If this increase is significant for your application, increase the intervals assigned to the timers in your application to compensate.

All AIR applications that use timers may be affected by this change when run with the AIR 2.0.3 runtime.

Will this affect timers used in CW, like for spores, firing rate and emitter intervals?
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

Sauffaus

QuoteWill this affect timers used in CW, like for spores, firing rate and emitter intervals?

It probably will... I'm not sure what items actually use built-in timers... probably not weapons (as they are fed with energy from OC)... but OC itself is perhaps affected, and so are emitters and spores, I would guess.

Perhaps Virgil could tell us which systems are built-in-timer-dependent?

Anyway... The speedup is probably negligible, and will perhaps not even be noticeable.

On the other hand... it could result in a complete cpu meltdown, if many things are timer-dependent, and the triggered functions needs longer to finish, than the timer is set to now "re-trigger" them.

knucracker

Everything is cool with CW and the new update.  CW doesn't use any timers.  It's an "enter frame" driven app so this change in timer behavior in the flash player doesn't affect anything in CW.

UpperKEES

Hurray! :)

Does this mean you have tested CW and it's save to update to AIR 2.0.3 now?
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

knucracker

On my systems, the update seems fine and the performance problems are resolved.  I tested the beta of this release and they have had this fixed for some time.  Now, that said a minor performance problem is introduced into the map editor with this version of AIR.  When you paint terrain really fast the screen won't update as fast.  It's not too bad, though, and doesn't really effect using the editor too much.  But, I can work around it with a code change so when I release a new update in a few weeks for CW I'll also release a new map editor that has this small issue addressed.

Note that I gave a copy of CW and the map editor to the folks at Adobe so they could add it to their testing suite for AIR.  So hopefully future releases of AIR will have the benefit of a bitmap driven game to help route out any performance bugs prior to release.

Thanks to all who followed this issue and reported any problems to Adobe.  The 'squeaky wheel always gets the grease', and figuratively speaking this is doubly true for software.

UpperKEES

Quote from: virgilw on August 11, 2010, 04:09:59 PM
Now, that said a minor performance problem is introduced into the map editor with this version of AIR.  When you paint terrain really fast the screen won't update as fast.

This was already the case with the previous version (even on my fast computer), so I guess it's no big deal.

Good to read that I can safely update now! :)
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

Pyxis_GeeK

#6
Hey Guys I wanted to let you know that I updated Adobe Air today and played one of my maps that I made that slowed the game down before. I am happy to report that the slow down is gone (at least for me) I dont have the best laptop either so it seems the update has helped.

Have fun killin creeper :D


Edit: I had been playing through some of the conquest missions and after a while(3 hours after original post today) I started to  experience the slow down again. I still think the update did work and it could have alot to do with the time I have been running the game eating up system resources. I just wanted to let you guys know. I have attached a pic so you can see what I had built and what was going on when the slowdown occured.

wessew

QuoteBut, I can work around it with a code change so when I release a new update in a few weeks for CW I'll also release a new map editor that has this small issue addressed.


so does this new map editor/game version is it just fixing a bug or is it adding new features or requests by players?
Fish all day sleep all night

UpperKEES

Quote from: UpperKEES on August 11, 2010, 05:19:01 PM
Quote from: virgilw on August 11, 2010, 04:09:59 PM
Now, that said a minor performance problem is introduced into the map editor with this version of AIR.  When you paint terrain really fast the screen won't update as fast.

This was already the case with the previous version (even on my fast computer), so I guess it's no big deal.

Hmmm, this is indeed even a lot slower now....
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview