javascript game loop and game update design
- by zuo
There is a main game loop in my program, which calls game update every frame. However, to make better animation and better control, there is a need to implement a function like updateEveryNFrames(n, func).
I am considering implementing a counter for each update. The counter will be added by one each frame. The update function will be invoked…