Search Results

Search found 1 results on 1 pages for 'lemonbeagle'.

Page 1/1 | 1 

  • HTML5 Canvas and Game Programming

    - by LemonBeagle
    I hope this isn't too open ended. I'm wondering if there is a better (more battery-friendly) way of doing this -- I have a small HTML 5 game, drawn in a canvas (let's say 500x500). I have some objects whose positions I update every 50ms or so. My current implementation re-draws the entire canvas every 50ms. I can't imagine that being very good for battery life on mobile platforms. Is there a better way to do this? This must be a common pattern with games. EDIT: as requested, here are some more updates: Right now, the objects are geometric primitives drawn via arcs and lines. I'm not opposed to making these small png/jpg/gif files instead of that'd help out. These are small graphics -- just 15x15 or so. As the game progresses, more and more of the screen changes at a time. However, at the start, the screen changes relatively slowly (the objects randomly moved a few pixels every 50ms).

    Read the article

1