The cocos.tiles module provides a simple method of managing tiled displays in 2D games.
Tile maps are made of three components:
cocos.tiles supports two file formats:
Both file formats are loaded with the same API call:
#This loads a TMX format map cocos.tiles.load('filename.tmx') #This loads a cocos2d XML format map cocos.tiles.load('filename.xml')
Once the map is loaded the API for accessing the map information is the same regardless of the on-disk format.
Fairly simple examples of using the cocos.tiles module is provided in test/test_tiles.py and test/test_tmx.py
A basic tile map editor is provided in tools/editor.py