Hacker News new | ask | show | jobs
by bni 5676 days ago
I have found that the performance you get with canvas as opposed to using a DOM based rendering varies greatly with the device and rendering engine that your code runs on (shouldnt be a suprise really).

For my game I have encapsulated redering to use webkitTransform and translate3d if hardware acceleration is present. Otherwise use canvas, or in the worst case (IE6-8), use DOM with left and top css attributes.

If your game, like mine, can use a form of dirty-rectangle, invalidation strategy to rendering, its possible to do 60fps rendering with low CPU usage on iOS and desktop browsers.