# Game Performance Question

**URL:** <https://forum.kirupa.com/t/game-performance-question/244156>\
**Category:** flash\
**Created:** [November 14, 2007, 7:43pm UTC](https://forum.kirupa.com/t/game-performance-question/244156 "2007-11-14T19:43:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iceflyin](https://avatars.discourse-cdn.com/v4/letter/i/9de053/32.png) [@iceflyin](https://forum.kirupa.com/u/iceflyin)\
**Post date:** [November 14, 2007, 7:43pm UTC](https://forum.kirupa.com/t/game-performance-question/244156/1 "2007-11-14T19:43:37Z")

</div>

How taxing is time based calculation versus frame by frame? Should I do 32ms, 40ms? Would 10ms slow things down at 100 non-filtered vector instances with movements?

Also, wouldn’t it be more efficient to have one global timer that all classes can listen to, instead of a timer on each player like here? Like, have a “gameworld” class that controls everything.

package {  
import flash.display.MovieClip;  
import flash.events.TimerEvent;  
import flash.utils.Timer;

```
public class player extends MovieClip {
    public function player() {
        var timer:Timer = new Timer(32);
        timer.addEventListener(TimerEvent.TIMER, onTimer);
        timer.start();
    }
    
    private function onTimer(event:TimerEvent):void {

```

//Gameplay calculations here  
}  
}  
}
