This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
extensions:tmxtilemaps [2012/03/02 00:26] – [Response (Elliot)] 76.24.142.138 | extensions:tmxtilemaps [2015/09/14 11:14] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ~~NOTOC~~ | ||
+ | ====== TMX Tile Maps ====== | ||
+ | |||
+ | ---- dataentry extension ---- | ||
+ | type : extension | ||
+ | author_mail | ||
+ | description | ||
+ | lastupdate_dt : 2012-02-22 | ||
+ | compatible | ||
+ | depends | ||
+ | tags : tilemap, tiled | ||
+ | homepage_url | ||
+ | download_url | ||
+ | ---- | ||
+ | |||
+ | ===== Disclaimer ===== | ||
+ | Hi everyone, | ||
+ | First and foremost thank you for checking out my first sparrow extension! I wanted to inform you all that this project has been a learning experience. | ||
+ | |||
+ | Thank you all, and without further ado... | ||
+ | |||
+ | |||
+ | ===== Usage ===== | ||
+ | |||
+ | You should be able to grab all the code files with the TMX prefix and add in the headers to your sparrow.h or just copy the one in the Classes directory. | ||
+ | |||
+ | To create a TileMap simply create one using [[http:// | ||
+ | |||
+ | <code objc> | ||
+ | TMXMap* map = [[TMXMap alloc] initWithContentsOfFile: | ||
+ | [self addChild: map]; | ||
+ | </ | ||
+ | |||
+ | ===== Example ===== | ||
+ | - Grab the example from [[https:// | ||
+ | - Next, crack open tiled and then open the " | ||
+ | - Take a look at the map, I have object layers as well as some physics polygons | ||
+ | |||
+ | (it should look like) | ||
+ | |||
+ | {{ http:// | ||
+ | |||
+ | - Add whatever you want to the map and save | ||
+ | - Make sure you have it saving as a CSV | ||
+ | - Go back into XCode and then launch the example | ||
+ | - From there you should be able to launch it and see the following | ||
+ | |||
+ | {{ http:// | ||
+ | ===== Changelog ===== | ||
+ | |||
+ | * // | ||
+ | * // | ||
+ | |||
+ | |||
+ | ===== !!Known Issues!! ===== | ||
+ | * Map may be inverted in different layouts | ||
+ | |||
+ | |||
+ | ====== Workarounds ===== | ||
+ | If you get the inverted map try the [[http:// | ||
+ | | ||
+ | |||
+ | The way my sample has the map in it is like this | ||
+ | <code objc> | ||
+ | BEScreen mScreen = [BEScreen screenWithOrientation: | ||
+ | TMXMap* map = [[TMXMap alloc]initWithContentsOfFile: | ||
+ | [mScreen addChild: | ||
+ | [self addChild: | ||
+ | </ | ||
+ | ===== Source Code ===== | ||
+ | |||
+ | I figured there were a bunch of code files and that a gist might not be the right format. | ||
+ | |||
+ | ===== Discussion ===== | ||
+ | |||
+ | Good: very easy to include in your project and use | ||
+ | Bad: Slows the system down really badly (10fps max), grid lines | ||
+ | |||
+ | Hopefully this extension will not be forgotten about, it just needs a little work! | ||
+ | |||
+ | === Response (Elliot) === | ||
+ | Hi there, I fixed the gridline issue and also put in some framerate metrics. | ||
+ | {{ http:// | ||
+ | Thanks, | ||
+ | |