Crafty Blog - JavaScript Game Engine Development

Development of Crafty

1 note &

Fastest Canvas Drawing Library Ever!

This is a fairly bold statement but I would like to know if any other libraries manage drawing for pure performance as Crafty does.

Crafty will now redraw rectangles that have been changed (by an object moving etc) rather than redrawing the entire canvas element but if more than 60% of the screen is changing (meaning lots of redraw rectangles) then it switches to the naive method where the entire canvas is cleared and then every visible object is redrawn.

A register of changed DOM objects is kept and updated on every game tick which provides the best possible speeds. On top of that; every recommendation by JSGameBench is heeded.

All that’s left is to release!

The change-log for v1.0 is as follows:

  • Everything unit tested
  • Mobile devices
  • .css() should accept both JS and CSS notation
  • Detect the browser ext (moz, webkit, o)
  • Make sure IE browser can still attempt things. Add option for filters to do rotation and opacity.
  • Kick Ass Draw Manager

Filed under html5 javascript js library framework canvas

  1. craftyjs posted this