Make a steady automata in javascript
        Posted  
        
            by RobertWHurst
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by RobertWHurst
        
        
        
        Published on 2010-04-26T22:12:20Z
        Indexed on 
            2010/04/26
            22:13 UTC
        
        
        Read the original article
        Hit count: 382
        
I'm working on a javascript game and I've got an automata system controlling game time and sprite animation as well as giving a hand to the path finding system for timing and such. My problem is on slow browsers the javascript loop I'm using for counting the time is not very accurate. It tends to jump around a lot. I there a way to force the loop to run consistantly at 30 fps? The automata can drop frames if it needs to catch up so if the solution requires droping frames thats ok.
© Stack Overflow or respective owner