Inherits from CCNode : NSObject
Declared in CCBigImage.h

Overview

@class CCBigImage Node, that holds parts of big image as an idvididual dynamically unloadable tiles. Besides dynamic tiles this node can have normal children, such as CCSprite, layer, etc…

CCBigImage is refactored DynamicTiledLevelNode New Features: 1) Tile-Cutter ( https://github.com/psineur/Tile-Cutter ) instead of Gimp & xcftools 2) Removed unnecessary code, more comments, etc…

Besides Dynamic Mode, when all tiles are loaded in independent thread this node also supports Static Mode (dynamicMode = NO) when all tiles are preloaded and no additional thread is used. However, even in staticMode tiles that aren’t visible now in screen rect will be not rendered to increase performance.

LIMITATIONS: CCCamera may be not supported.

Tasks

  •   tilesLoadThread property
  •   screenLoadRectExtension

    Returns size that describes in what distance beyond each side of the screen tiles should be loaded to avoid holes when levels scrolls fast. By default it’s equal to first tile’s size.

    property
  •   dynamicMode

    if YES – then only needed (visible in screen rect) tiles will be loaded at the moment via independent thread if NO – all tiles will be preloaded and no no additional thread will be used This property can be changed at runtime in both directions. On the Mac by default this property is OFF On the iOS devices by default this property is ON

    property
  • + nodeWithTilesFile:tilesExtension:tilesZ:

    Returns new CCBigImage. @see initWithTilesFile:tilesExtension:tilesZ:

  • – initWithTilesFile:tilesExtension:tilesZ:

    Inits CCBigImage. Designated initializer.

  • – loadTilesInRect:

    Load tiles by request in a given rect (in nodes coordinates)

Properties

dynamicMode

if YES – then only needed (visible in screen rect) tiles will be loaded at the moment via independent thread if NO – all tiles will be preloaded and no no additional thread will be used This property can be changed at runtime in both directions. On the Mac by default this property is OFF On the iOS devices by default this property is ON

@property (readwrite) BOOL dynamicMode

Declared In

CCBigImage.h

screenLoadRectExtension

Returns size that describes in what distance beyond each side of the screen tiles should be loaded to avoid holes when levels scrolls fast. By default it’s equal to first tile’s size.

@property (readwrite) CGSize screenLoadRectExtension

Declared In

CCBigImage.h

tilesLoadThread

Class Methods

nodeWithTilesFile:tilesExtension:tilesZ:

Returns new CCBigImage. @see initWithTilesFile:tilesExtension:tilesZ:

+ (id)nodeWithTilesFile:(NSString *)filename tilesExtension:(NSString *)extension tilesZ:(int)tilesZ

Declared In

CCBigImage.h

Instance Methods

initWithTilesFile:tilesExtension:tilesZ:

Inits CCBigImage. Designated initializer.

- (id)initWithTilesFile:(NSString *)filename tilesExtension:(NSString *)extension tilesZ:(int)tilesZ

Parameters

filename

plist filename from Tile-Cutter.

extension

file extension, that will be used for all tiles instead of their extensions that are in plist file. Pass nil to kep original extension from plist file.

tilesZ

zOrder, that will be used for all tiles. Usefull when you have other nodes added as children to CCBigImage.

Declared In

CCBigImage.h

loadTilesInRect:

Load tiles by request in a given rect (in nodes coordinates)

- (void)loadTilesInRect:(CGRect)loadRect

Declared In

CCBigImage.h