<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>cocos2d for iPhone &#187; Tag: tilemap - Recent Posts</title>
		<link>http://www.cocos2d-iphone.org/forum/tags/tilemap</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 02:50:02 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cocos2d-iphone.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.cocos2d-iphone.org/forum/rss/tags/tilemap" rel="self" type="application/rss+xml" />

		<item>
			<title>Mathgeekboo on "Tilemap Help With Tile Actions"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28898#post-142689</link>
			<pubDate>Sat, 04 Feb 2012 20:13:04 +0000</pubDate>
			<dc:creator>Mathgeekboo</dc:creator>
			<guid isPermaLink="false">142689@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks you guys for all the reply's and now that I think about it you guys are both right. It would be really helpful if you could post an example code for me.</p>
<p>Thanks
</p></description>
		</item>
		<item>
			<title>virag0 on "cocos2d Hexagon Tilemaps"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/16435#post-142496</link>
			<pubDate>Fri, 03 Feb 2012 12:03:10 +0000</pubDate>
			<dc:creator>virag0</dc:creator>
			<guid isPermaLink="false">142496@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi,<br />
I hope rob76 is reading this one..... ;)<br />
I have made it to the same point as the guys above. I've got CSharpToOC's code running, but of course<br />
it produces the coordinate skew as noticed.  So, I tried to understand rob's code, which I almost<br />
can, but I am unsure how to integrate it with what is already working.  I understand it is a code<br />
fragment that looks like it should go in the <code>-(id) init</code> block, but I can't see how to<br />
properly implement it.  Without repeating what is already shown above, I have the first block of rob's<br />
code in my init method, but the <code>Map.position = ccp((x,y);</code> is failing with "undeclared identifier "x"".</p>
<p>The second block, I understand what it is doing - iterating through the tilemap and centering the coords for<br />
each tile, but I do not know how to implement it either!   I note in CSharpToC's method, there is similar code,<br />
but I am sort of confused how to blend it nicely together.   I almost have this working, but can't get my<br />
brain around making the whole work.  Certainly I can see how rob's stuff works in theory, but perhaps<br />
I am too confused by the methods I've got in there already.   I have got the same thing working in a regular<br />
tilemap, but seem to be short of a few braincells with hex tiles. </p>
<p>Any help for such a newb would be terrific.... </p>
<p>rachel
</p></description>
		</item>
		<item>
			<title>skyhawk on "Tilemap Help With Tile Actions"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28898#post-142434</link>
			<pubDate>Fri, 03 Feb 2012 03:36:06 +0000</pubDate>
			<dc:creator>skyhawk</dc:creator>
			<guid isPermaLink="false">142434@http://www.cocos2d-iphone.org/forum/</guid>
			<description><pre><code>calculate point to tile coordinates
if point = tile point
 change scene / run method</code></pre>
<p>honestly, I don't think you thought about the problem at all or listened to what @<a href='http://www.cocos2d-iphone.org/forum/profile/1643'>slycrel</a> suggested.
</p></description>
		</item>
		<item>
			<title>Mathgeekboo on "Tilemap Help With Tile Actions"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28898#post-142431</link>
			<pubDate>Fri, 03 Feb 2012 03:11:30 +0000</pubDate>
			<dc:creator>Mathgeekboo</dc:creator>
			<guid isPermaLink="false">142431@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks for the reply but I know how to change scenes but I don't know how to change scenes and run methods when you tap a tile on the map.</p>
<p>Thanks
</p></description>
		</item>
		<item>
			<title>slycrel on "Tilemap Help With Tile Actions"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28898#post-142429</link>
			<pubDate>Fri, 03 Feb 2012 03:05:32 +0000</pubDate>
			<dc:creator>slycrel</dc:creator>
			<guid isPermaLink="false">142429@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>What you are asking really doesn't have anything to do with tiles.  You may want to open the cocos2d example project and look at some of the different examples.  Transitions and other related things will be included there.</p>
<p>Here is a link from the forums on scene transitions that you might want to read through.  <a href="http://www.cocos2d-iphone.org/forum/topic/5513" rel="nofollow">http://www.cocos2d-iphone.org/forum/topic/5513</a></p>
<p>Good luck!
</p></description>
		</item>
		<item>
			<title>Mathgeekboo on "Tilemap Help With Tile Actions"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28898#post-142427</link>
			<pubDate>Fri, 03 Feb 2012 02:48:08 +0000</pubDate>
			<dc:creator>Mathgeekboo</dc:creator>
			<guid isPermaLink="false">142427@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi, I am new to cocos2d and I need some help. This might sound like a stupid question but I am making a tilemap game that uses multiple tilemaps, for inside houses and etc, and I am trying to make it so that if a tap a tile it will run a new scene or a method, for example tapping a vending machine and running a buy item scene,but I have no clue how to do this please help. Examples would be very helpful.</p>
<p>Thanks.
</p></description>
		</item>
		<item>
			<title>Birkemose on "Isometric Z Ordering"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28657#post-141181</link>
			<pubDate>Wed, 25 Jan 2012 16:31:06 +0000</pubDate>
			<dc:creator>Birkemose</dc:creator>
			<guid isPermaLink="false">141181@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>If you want to control drawing order, z buffering is what you are looking for.<br />
If you have a large character on a tile map, on tile x he might stand behind a small bush, and two tiles lower, the upper part of him might cover the bush.<br />
If so, you will have to implement a z buffer.</p>
<p>The main problem is, that because your "bushes" are made from sprite sheet A, and your player from sprite sheet B, it is not trivial to insert the player into sheet A objects.<br />
There are clever schemes which accesses the depth buffer directly, but basically this approach does not work well with cocos.</p>
<p>My own approach on this, is to actually have two sheet A. It sounds costly, but it really isn't, because they will use the same texture. Anything behind the player is draw from sheet A1, and anything in front, from sheet A2. The cost is an extra OpenGL draw, but unless you are building Doom4 ( now with tiles ), the difference will be negligible.
</p></description>
		</item>
		<item>
			<title>Yves on "Isometric Z Ordering"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28657#post-141179</link>
			<pubDate>Wed, 25 Jan 2012 16:12:52 +0000</pubDate>
			<dc:creator>Yves</dc:creator>
			<guid isPermaLink="false">141179@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I currently have an Isometric TileMap with Sprites that are larger than one tile. The sizes are not uniform. I need to be able to draw them in the right order. From what I know so far I can either:</p>
<p>Split all the Sprites Up into pieces - making z ordering very easy, but I wish to animate some sprites, and that would be a pain.<br />
Have Uniform sprite sizes - not an option as I already mentioned.</p>
<p>I have heard the term Z-buffering thrown around and iv also seen that you can enable this in cocos2d, but I'm not sure if this is what I'm looking for?</p>
<p>I would be very thankful if you could share how you would approach this.
</p></description>
		</item>
		<item>
			<title>yarmolchuk on "Movement of the isometric map"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28524#post-140426</link>
			<pubDate>Fri, 20 Jan 2012 15:52:44 +0000</pubDate>
			<dc:creator>yarmolchuk</dc:creator>
			<guid isPermaLink="false">140426@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi all<br />
I'm interested in how to make a move when the user is an isometric map to scroll it.<br />
Thank you very much for your reply.
</p></description>
		</item>
		<item>
			<title>MisterHedge on "[Problem] Getting TileMap collision and DPad movement to work together"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28254#post-138997</link>
			<pubDate>Wed, 11 Jan 2012 03:46:48 +0000</pubDate>
			<dc:creator>MisterHedge</dc:creator>
			<guid isPermaLink="false">138997@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Well, never mind! I fixed it. :D It seems rather silly now.</p>
<p>Here's what I change:</p>
<p><code> -(void)update:(ccTime)dt{</p>
<p>    CGPoint playerPos = mage.position;</p>
<p>    if ([[menu getButton:2]isSelected])<br />
    {<br />
        playerPos = ccp(playerPos.x,playerPos.y + 3);<br />
    }<br />
    if ([[menu getButton:8]isSelected])<br />
    {<br />
        playerPos = ccp(playerPos.x,playerPos.y - 3);<br />
    }<br />
    if ([[menu getButton:4]isSelected])<br />
    {<br />
        playerPos = ccp(playerPos.x + 3,playerPos.y);<br />
    }<br />
    if ([[menu getButton:6]isSelected])<br />
    {<br />
        playerPos = ccp(playerPos.x - 4,playerPos.y);<br />
    }<br />
    [self setPlayerPosition:playerPos];<br />
}</code>
</p></description>
		</item>
		<item>
			<title>MisterHedge on "[Problem] Getting TileMap collision and DPad movement to work together"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28254#post-138982</link>
			<pubDate>Wed, 11 Jan 2012 01:04:03 +0000</pubDate>
			<dc:creator>MisterHedge</dc:creator>
			<guid isPermaLink="false">138982@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hey all,</p>
<p>Okay, I've been having a problem. I'm making a simple tiled RPG-like game using Tiled and Cocos2D. Following one of Ray Wenderlich's tutorials (found here: <a href="http://www.raywenderlich.com/1186/collisions-and-collectables-how-to-make-a-tile-based-game-with-cocos2d-part-2" rel="nofollow">http://www.raywenderlich.com/1186/collisions-and-collectables-how-to-make-a-tile-based-game-with-cocos2d-part-2</a> ), I managed to add collision to my tiled map. However, I didn't like the way he implemented movement in the game and instead opted for a directional pad. I found a very nice bit of code called EasyArrows (found here: <a href="http://www.cocos2d-iphone.org/forum/topic/7692" rel="nofollow">http://www.cocos2d-iphone.org/forum/topic/7692</a> ) that accomplished exactly what I was hoping to do. The problem I'm facing is that I can get the two to work separately but not together. Before I add EasyArrows, the collision and movement work just fine. After I add EasyArrows, my character sprite completely ignores the collision, but he moves how I want him to.</p>
<p>As you might have guessed, I'm a bit of a newbie still, but I'm starting to get the hang of things. One of the best ways to learn is to make mistakes, eh? :P</p>
<p>If you'd like to see any specific segments of code, let me know. I'll post them here.</p>
<p>Thanks guys!</p>
<p>EDIT:</p>
<p>I've decided to go ahead and put my code in anyway.</p>
<p>"stLayer" is the collision tile layer in my Tiled map (see Ray's tutorial for details)<br />
"mage" is my player sprite</p>
<p>-----</p>
<p>HelloWorldLayer.m</p>
<pre><code>// This is the part of the EasyArrows code that you place within the HelloWorldLayer
-(void)update:(ccTime)dt{

    if ([[menu getButton:2]isSelected])
    {
        mage.position = ccp(mage.position.x,mage.position.y + 3);
    }
    if ([[menu getButton:8]isSelected])
    {
        mage.position = ccp(mage.position.x,mage.position.y - 3);
    }
    if ([[menu getButton:4]isSelected])
    {
        mage.position = ccp(mage.position.x + 3,mage.position.y);
    }
    if ([[menu getButton:6]isSelected])
    {
        mage.position = ccp(mage.position.x - 4,mage.position.y);
    }
}

// This is Rey&#039;s code for the collision

-(void) setPlayerPosition:(CGPoint)position{
    CGPoint tileCoord = [self tileCoordForPosition:position]; 

    int tileGid = [stLayer tileGIDAt:tileCoord]; 

    if(tileGid){ 

        NSDictionary *properties = [theMap propertiesForGID:tileGid]; 

        if(properties){
            NSString *collision = [properties valueForKey:@&#34;Collidable&#34;];
            if (collision &#38;&#38; [collision compare:@&#34;True&#34;] ==NSOrderedSame) {
                return;
            }
        }

    }

    mage.position = position;
}

// This converts tiles to coordinates
-(CGPoint)tileCoordForPosition:(CGPoint)position{
    int x = position.x/theMap.tileSize.width;
    int y = ((theMap.mapSize.height * theMap.tileSize.height)-position.y)/theMap.tileSize.height;
    return ccp(x,y);
}</code></pre></description>
		</item>
		<item>
			<title>goodeats2009 on "TileMap size, screenSize and coordinates question."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28223#post-138859</link>
			<pubDate>Tue, 10 Jan 2012 05:45:03 +0000</pubDate>
			<dc:creator>goodeats2009</dc:creator>
			<guid isPermaLink="false">138859@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>hi,  i created a tileMap with a size of 480 wide x 640 high.    So I'm only using this for standard display (480 x 320), so the problem is when i pan the tile map vertically to say ccp (0,320), the bottom of the screen will be the middle of the tile map.  but how do i specify the  coordinates for  any touch position above ccp(0,320)?  if i log the touch after panning the screen, i still get the range of ccp(0,0) to ccp(0,320)?  i want to increase the y axis to ccp(0,640) since i want to add sprites from ccp(0,320) to ccp(0,640).  thanks
</p></description>
		</item>
		<item>
			<title>Sorien on "Strange cocos2d camera and tilemap issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28163#post-138819</link>
			<pubDate>Mon, 09 Jan 2012 21:55:38 +0000</pubDate>
			<dc:creator>Sorien</dc:creator>
			<guid isPermaLink="false">138819@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I have found the solution:</p>
<pre><code>-(void) onEnter
{
	[super onEnter];
	[[CCDirector sharedDirector] setProjection:kCCDirectorProjection3D];
}

-(void) onExit
{
	[[CCDirector sharedDirector] setProjection:kCCDirectorProjection2D];
	[super onExit];
}</code></pre></description>
		</item>
		<item>
			<title>Sorien on "Strange cocos2d camera and tilemap issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28163#post-138606</link>
			<pubDate>Sun, 08 Jan 2012 10:13:55 +0000</pubDate>
			<dc:creator>Sorien</dc:creator>
			<guid isPermaLink="false">138606@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Am i the only one who has the problem?</p>
<p>Could it be a problem with the OpenGL transformations from cocos2D?</p>
<p>Please help me.
</p></description>
		</item>
		<item>
			<title>Sorien on "Strange cocos2d camera and tilemap issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28163#post-138528</link>
			<pubDate>Sat, 07 Jan 2012 15:58:49 +0000</pubDate>
			<dc:creator>Sorien</dc:creator>
			<guid isPermaLink="false">138528@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>For the menu background of Nitroman i am using a tile-map with a moved camera. When i start a game-level the tile-map within the game is working like it should, but if i go back to the main screen the Menu-tile-map is messed up.</p>
<p>Here is the working menu background tilemap:<br />
<img src="http://nitroman.alpapps.com/wp-content/uploads/2012/01/IMG_0179.png" /></p>
<p>And here it the messed up background tilemap:<br />
<img src="http://nitroman.alpapps.com/wp-content/uploads/2012/01/IMG_0180.png" /></p>
<p>The MenuScene is completely new initialized and all the positions and settings are the same like the first initialization.</p>
<p>Also the camera positions for center, eye and up are the same in both.</p>
<p>Here is the code:<br />
<pre><code>- (void) initMap{
    // add Background
    CCLayerColor *color = [CCLayerColor layerWithColor:ccc4(0,0,0,255)];
    [self addChild:color z:-1];
    if([DeviceDetector sharedDeviceDetector].isIPad &#38;&#38; [DeviceDetector sharedDeviceDetector].hasRetinaDisplay){
        map = [TMXTiledMapExtended tiledMapWithTMXFile:DOCUMENTS_RESOURCES_PATH(@&#34;levels/default_levels/tilemaps/MainMenu/iNitroMan_MainMenu-hd.tmx&#34;)];
    } else {
        map = [TMXTiledMapExtended tiledMapWithTMXFile:DOCUMENTS_RESOURCES_PATH(@&#34;levels/default_levels/tilemaps/MainMenu/iNitroMan_MainMenu.tmx&#34;)];
    }&#60;/p&#62;
    [self addChild:map z:1];
    for( CCSpriteBatchNode* child in [map children] ) {
        [[child texture] setAntiAliasTexParameters];
    }
    [map setAnchorPoint:ccp(0, 1)];
    DEBUG_LOG(@&#34;MAP-Scale       (%f,%f)&#34;,map.scaleX,map.scaleY);
    DEBUG_LOG(@&#34;MAP-TileSize    (%f,%f)&#34;,map.tileSize.width,map.tileSize.height);
    DEBUG_LOG(@&#34;MAP-MapSize     (%f,%f)&#34;,map.mapSize.width,map.mapSize.height);
}
- (void) initCamera{
    float x, y, z = -100;
    float eye_x, eye_y, eye_z = 1;
    float up_x, up_y, up_z = 1;
    [[map camera] centerX:&#38;x centerY:&#38;y centerZ:&#38;z];
    [[map camera] upX:&#38;up_x upY:&#38;up_y upZ:&#38;up_z];
    [[map camera] eyeX:&#38;eye_x eyeY:&#38;eye_y eyeZ:&#38;eye_z];
    [map getPixelPositionFromGridPoint:CGPointMake(12,1) pX:&#38;x pY:&#38;y];
    [map getPixelPositionFromGridPoint:CGPointMake(12,7) pX:&#38;eye_x pY:&#38;eye_y];
    if([DeviceDetector sharedDeviceDetector].isIPad){
        [[map camera] setEyeX:eye_x eyeY:eye_y eyeZ:500];
    } else {
        eye_z = 1;
        [[map camera] setEyeX:eye_x eyeY:eye_y eyeZ:1];
    }
    z = -100;
    DEBUG_LOG(@&#34;CAM-Eye     (%f,%f,%f)&#34;,eye_x,eye_y,eye_z);
    DEBUG_LOG(@&#34;CAM-Center  (%f,%f,%f)&#34;,x,y,z);
    DEBUG_LOG(@&#34;CAM-Up      (%f,%f,%f)&#34;,up_x,up_y,up_z);
    [[map camera] setCenterX:x centerY:y centerZ:z];
    [[map camera] setUpX:up_x upY:up_y upZ:up_z];
}</code></pre>
<p>Does anyone know why this happens? </p>
<p>Thanks for your help.
</p></description>
		</item>
		<item>
			<title>bigubosu on "Accessing Tilesets in .tmx?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28151#post-138481</link>
			<pubDate>Sat, 07 Jan 2012 03:42:21 +0000</pubDate>
			<dc:creator>bigubosu</dc:creator>
			<guid isPermaLink="false">138481@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Ok I worked it out with the setTileGID:&#60;tilenumber&#62; method. Pretty cool.</p>
<p>Link that helped me work it out for anyone else thats having trouble too.<br />
<a href="http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps#coordinates_and_gids" rel="nofollow">http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps#coordinates_and_gids</a>
</p></description>
		</item>
		<item>
			<title>bigubosu on "Accessing Tilesets in .tmx?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28151#post-138479</link>
			<pubDate>Sat, 07 Jan 2012 03:23:59 +0000</pubDate>
			<dc:creator>bigubosu</dc:creator>
			<guid isPermaLink="false">138479@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I'm skimming over Ray's tutorial for a Tilemap game. Is there a way to access the tileset in the .tmx?</p>
<p>The reason for this is that I want to dynamically create my tilemap in the game rather than having a set map that'll never change.</p>
<p>I read a couple of other threads about dynamic maps about using the GID's to create a dynamic map but nothing about how to access the tiles.</p>
<p>I was thinking I'd have 2 .tmx's. 1 blank and another with the tilemaps drawn off screen which I could reference off. Is that a reasonable way to do it?</p>
<p>I realised that in other game you'd see random textures placed off the map where the player can't see them I guess that's how they did it too perhaps.
</p></description>
		</item>
		<item>
			<title>copy_paste_2011 on "EXC_ARITHMETIC TileSets"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/10824#post-137249</link>
			<pubDate>Thu, 29 Dec 2011 18:46:50 +0000</pubDate>
			<dc:creator>copy_paste_2011</dc:creator>
			<guid isPermaLink="false">137249@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I copied the images that I used in my tile set into resource folder and I modified the tmx file to fix the path of the images. And that works for me.
</p></description>
		</item>
		<item>
			<title>Blackmarq20 on "TMX Map convert tool from HD TMX map to SD .. available?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/11660#post-137245</link>
			<pubDate>Thu, 29 Dec 2011 18:26:38 +0000</pubDate>
			<dc:creator>Blackmarq20</dc:creator>
			<guid isPermaLink="false">137245@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>That worked thanks!
</p></description>
		</item>
		<item>
			<title>windmarble on "TMXTileMap Zoomed View &amp; Zelda style Scolling"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27928#post-137210</link>
			<pubDate>Thu, 29 Dec 2011 14:57:17 +0000</pubDate>
			<dc:creator>windmarble</dc:creator>
			<guid isPermaLink="false">137210@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hmmm... That seems like a lot of work. Adding extra tiles to the tileMap. if you have a huge map, you would always have to go back and add the extra metadata tiles. </p>
<p>It seems that a more programmatic solution would be appropriate. Because you would only need to set how big you want your view to be.</p>
<p>The voices in my head said the following psuedocode:</p>
<pre><code>If the View is 16 x 12 tiles,
break down the entire map into a grid of 16x12. 

So if the map is 256 tiles wide and 96 tiles high, you would have a grid that is a 16 x 8 large collection of boxes of those 16x12 tiles. 

//The player is just a tile inside the view.
What tile is the player on?
What tile is that a member of?
Center us on that grid view. // and let the player move all around it.

But if the player sprites center, touches the boundary of the grids view,
move the player to the new grid and center us on that view.</code></pre>
<p>While that works in theory, the application is a little tricky, because my current view (in landscape) will show the view's width (16 tiles) but not the height (it only shows 10 tiles).
</p></description>
		</item>
		<item>
			<title>aramk on "About gaps between the sprites"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/73#post-137172</link>
			<pubDate>Thu, 29 Dec 2011 08:47:08 +0000</pubDate>
			<dc:creator>aramk</dc:creator>
			<guid isPermaLink="false">137172@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hmm... I still get issues ONLY if I use <code>[CCSprite spriteWithSpriteFrameName:]</code>. However, using <code>[CCSprite spriteWithFile:]</code> and setting <code>[[CCDirector sharedDirector] setProjection:CCDirectorProjection2D];</code> and using power of 2 dimensions. What I found was happening is that the edges of the sprite are bleeding out of their dimensions in the SpriteSheet. I put blue around the defined sprite in said spritesheet and as you can guess, the flickering gap turned blue... If I use my buffer (effectively rounds the pixels) then it works fine. Any suggestions? Also, I'm scaling my layer but it doesn't matter either way, the gap still appears.
</p></description>
		</item>
		<item>
			<title>jhspaybar on "TMXTileMap Zoomed View &amp; Zelda style Scolling"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27928#post-137156</link>
			<pubDate>Thu, 29 Dec 2011 05:44:43 +0000</pubDate>
			<dc:creator>jhspaybar</dc:creator>
			<guid isPermaLink="false">137156@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>well, I'm not saying to deallocate the player sprite or the object that manages it.  Just do a player.visible = false, move the layer, move the player, and then make him visible again.  If you don't want him going invisible, you can still just move him in a certain way that you think works best.  Honestly, I think all you need are CCActions that move to an x,y coord over z time.  This can even be coded into the tilemap if the distances that get moved may vary.  Also, in tiled what you may want to do is have a certain meta tile defined as a warp tile with attributes for where to move to over how much time.  When the player moves onto that spot(the doorway) everything fires up and moves.
</p></description>
		</item>
		<item>
			<title>wasabibit on "TMX Map convert tool from HD TMX map to SD .. available?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/11660#post-137146</link>
			<pubDate>Thu, 29 Dec 2011 04:33:37 +0000</pubDate>
			<dc:creator>wasabibit</dc:creator>
			<guid isPermaLink="false">137146@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@ Blackmarq20,</p>
<p>Please try this when you are in the same directory where you unzipped the files.</p>
<p>./WBTMXTool -in grassmap-hd.tmx -out grassmap-sd.tmx -scale 0.5 -suffixAction remove</p>
<p>Thx
</p></description>
		</item>
		<item>
			<title>windmarble on "TMXTileMap Zoomed View &amp; Zelda style Scolling"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27928#post-137143</link>
			<pubDate>Thu, 29 Dec 2011 03:39:13 +0000</pubDate>
			<dc:creator>windmarble</dc:creator>
			<guid isPermaLink="false">137143@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks for the reply. I see what you are saying, but removing and re-adding your player sprite seems inefficient. I feel that if the room size is calculated, if the player sprite touches the border, then move the player over a few pixels and at the same time move the entire map to the new room. </p>
<p>We know how big the room is, width(16 * 32) &#38; height(12 * 32) and we know how big the map is width(256 * 32) &#38; height(96 * 32) </p>
<p>So we know the border is along the room perimeter. The door would be open space to the border (to allow it to be touched) while the wall tile would prevent the player sprite from ever touching the border. Any thoughts on checking if the player sprite has intersected a border?
</p></description>
		</item>
		<item>
			<title>Blackmarq20 on "TMX Map convert tool from HD TMX map to SD .. available?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/11660#post-137142</link>
			<pubDate>Thu, 29 Dec 2011 03:31:40 +0000</pubDate>
			<dc:creator>Blackmarq20</dc:creator>
			<guid isPermaLink="false">137142@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I would really love to use this tool to convert some tile maps, if anyone could provide assistance it would be greatly appreciated. </p>
<p>thanks,
</p></description>
		</item>
		<item>
			<title>jhspaybar on "TMXTileMap Zoomed View &amp; Zelda style Scolling"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27928#post-137137</link>
			<pubDate>Thu, 29 Dec 2011 03:00:39 +0000</pubDate>
			<dc:creator>jhspaybar</dc:creator>
			<guid isPermaLink="false">137137@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I believe in his tutorials, ray sets up a custom view window and scrolls the layer the tilemap is in rather than messing with the camera?  It's been a while since I read, so correct me if I'm wrong, but maybe what you can do is have a "portal" tile that contains information for where to move your "camera" to, and where the play goes.  When the player hits that tile, you remove their sprite, run a CCAction that moves the tilemap in a way that will center on the proper location, and then respawn the player on the end point of the "portal".  This method wouldn't actually use cameras at all, but instead a tilemap who layer is larger than the screen, and slides itself around based on where it should be focused.
</p></description>
		</item>
		<item>
			<title>windmarble on "TMXTileMap Zoomed View &amp; Zelda style Scolling"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27928#post-137130</link>
			<pubDate>Thu, 29 Dec 2011 00:43:01 +0000</pubDate>
			<dc:creator>windmarble</dc:creator>
			<guid isPermaLink="false">137130@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I playing with tilemaps and attempting to show only one room at a time. I want my player to be able to move all around the room without the tilemap showing other rooms. Once the player enters the door to go into another room, I want to transition from Room A to Room B. The best way I know to describe what I am trying to accomplish is to look at the old NES style Legend of Zelda. When Zelda would move from room to room.</p>
<p>The second thing I am trying to do is Zoom the TileMap to fill just that room. I have played with the camera class and I am failing at understanding what it's asking to do.</p>
<p>While the tilemap is 256 tiles wide, I only want to display 16 x 12 tiles (32pixels * 16 tiles) x (32pixels * 12 tiles)</p>
<p>I am not asking anyone to write the code for me. I have been working off of the Ray Wenderlich's tilemap tutorial which has taught me a lot. Just point me in the direction of where I can learn how to accomplish my task. Or maybe if someone else is working on this we can work together to figure it out. I think that if I can find a way to make the camera stationary, the only thing that should move is the Player while in the room, THEN the tilemap when moving to a new room. Then the play shows up on the other side of the door.</p>
<p>I have tried so many variations of the below code for the zooming.<br />
<pre><code>int viewX = (_tileMap.tileSize.width * 16);
int viewY = (_tileMap.tileSize.height * 12);
[self.camera setEyeX:viewX eyeY:viewY eyeZ:0];</code></pre>
<p>I have tried some promising variations on the transition effect<br />
<pre><code>[_tileMap runAction:[CCMoveBy actionWithDuration:0.6 position:ccp(0,viewY)]; //if moving up
[_tileMap runAction:[CCMoveBy actionWithDuration:0.6 position:ccp(0,-viewY)]; //if moving down</code></pre>
<p>etc…</p>
<p>I just keep coming back to the boundary and view problems</p>
<p>Any thoughts or suggestions or links or youtube videos would be greatly appreciated!!!</p>
<p>Thanks for listening to me plea for help
</p></description>
		</item>
		<item>
			<title>aramk on "About gaps between the sprites"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/73#post-137076</link>
			<pubDate>Wed, 28 Dec 2011 14:21:15 +0000</pubDate>
			<dc:creator>aramk</dc:creator>
			<guid isPermaLink="false">137076@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I know this is old, but the problem still keeps coming up. Thanks to the help on this forum, I think I've figured out a nice way of dealing with this:</p>
<p><a href="http://ak.net84.net/iphone/gap-between-sprites-when-moving-in-cocos2d/" rel="nofollow">http://ak.net84.net/iphone/gap-between-sprites-when-moving-in-cocos2d/</a>
</p></description>
		</item>
		<item>
			<title>Blackmarq20 on "TMX Map convert tool from HD TMX map to SD .. available?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/11660#post-137026</link>
			<pubDate>Tue, 27 Dec 2011 23:51:04 +0000</pubDate>
			<dc:creator>Blackmarq20</dc:creator>
			<guid isPermaLink="false">137026@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi, </p>
<p>I am trying to run this script but I get an error, -in command not found. This is how I ran it from the terminal. </p>
<p>$WBTMXTool -in grassmap-hd.tmx -out -grassmap-sd.tmx -scale 0.5 -suffixAction remove</p>
<p>I have the script on my desktop and my tmx file grassmap-hd.tmx also on my desktop. Would you be able to provide some assistance or an example? </p>
<p>thanks,
</p></description>
		</item>
		<item>
			<title>fabiorodella on "Anyone know a good Tile spritesheet (PNG) splitter that handles transparency?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/4600#post-136971</link>
			<pubDate>Tue, 27 Dec 2011 14:46:22 +0000</pubDate>
			<dc:creator>fabiorodella</dc:creator>
			<guid isPermaLink="false">136971@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hey guys, just found a website that does just what Questor wants for free, and might be useful to others as well: <a href="http://imagesplitter.net/" rel="nofollow">http://imagesplitter.net/</a></p>
<p>You upload an image (not exceeding 20mb), select Splitter and input how many rows and columns of sprites are in the image. It will then spit out a ZIP file containing all the individual frames while also preserving the alpha channel. I just tried it yesterday and it seems to work just fine!
</p></description>
		</item>

	</channel>
</rss>

