performance

Memory management tips

Memory is a critical resource in HTML5/JavaScript game development, especially on mobile devices. In a desktop environment you can load tons of textures but on some low-end mobile devices you can reac...

NPOT textures

Canvas+ uses POT (Power Of Two) textures by default in 2d contexts. This is very useful for performance improvements, especially on mobiles with old GPUs. But it can waste memory on games that don’t...

Lazy loading

Another Canvas+ exclusive feature available on version 2.1 and higher we have added the “cocoonLazyLoad” boolean property to Image objects (we have also added a duplicate called “idtkLoadDispose...

Max memory thresold

This new Canvas+ exclusive feature exposes the “setMaxMemory” utility method. When the max memory threshold is set, Cocoon checks the total amount of texture sizes (images and canvases). When the ...

Texture reducer

Texture reducer is a Canvas+ exclusive feature. When your game targets all resolutions you need huge textures for iPad retina like devices and small textures for small mobile devices. A game developer...

Screencanvas

ScreenCanvas is a canvas+ specific high performance canvas. In canvas+ you can create 2 types of canvas: A standard canvas renders everything to an internal drawing buffer (render to texture). At the ...