Re:Porting a HTML5 game: 6 platforms, 1 codebase.
by snewman on Tuesday July 12, 2011 @02:12PM
(#2755764)
It's great to see a real-world writeup of cross-platform development using HTML5. One question: I tried the app on Android, and it looks pretty much identical to the web version, so -- success. However, the animations seem very slow and chunky -- I'm guessing less than 10/frames second, sometimes significantly less, even though the game is very simple visually. Is this an inherent limitation of HTML5 animations on Android? What about other mobile platforms (e.g. iOS)?
[ Parent
| on HN ]
Re:Porting a HTML5 game: 6 platforms, 1 codebase.
by gren on Tuesday July 12, 2011 @02:44PM
(#2755916)
That's probably because I use HTML Canvas. The balls are currently not animated with CSS but with Javascript (in a requestAnimationFrame loop).
Making a full DOM version with CSS Transitions (or Animations) would be probably better because it's hardware accelerated (especially on iOS).
Android browser has different support/behavior between android versions. Using lot of CSS Animations is in my opinion a little too ambitious (for now), that's why I stayed on a slower HTML Canvas solution.
But for iPhone / iPad, that's not the case, animations work better than Canvas, I have to try a DOM solution to increase these performance :)