HTML5 Canvas Game Timer
Posted
by
zghyh
on Game Development
See other posts from Game Development
or by zghyh
Published on 2012-05-30T13:04:23Z
Indexed on
2012/05/30
17:01 UTC
Read the original article
Hit count: 313
How to create good timer for HTML5 Canvas games? I am using RequestAnimationFrame( http://paulirish.com/2011/requestanimationframe-for-smart-animating/ )
But object's move too fast.
Something like my code is:
But if I press UP_ARROW player don't move one pixel, but move 5, 8, or 10 or more or less pixels. How to do if I press UP_ARROW player move 1 pixel?
Thanks for help.
© Game Development or respective owner