<?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: cocos2d - Recent Topics</title>
		<link>http://www.cocos2d-iphone.org/forum/tags/cocos2d</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 04:09:01 +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/cocos2d/topics" rel="self" type="application/rss+xml" />

		<item>
			<title>noodlz on "Moving a sprite across multiple coordinates using CCSequence"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29115#post-143460</link>
			<pubDate>Thu, 09 Feb 2012 16:21:53 +0000</pubDate>
			<dc:creator>noodlz</dc:creator>
			<guid isPermaLink="false">143460@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hello! Long time reader, first time poster.</p>
<p>I have a predefined set of coordinates which form a path stored in two NSMutableArrays (one containing the x values, one for the y values). There are roughly 40 sets of coordinates.</p>
<p>Below is the section of code I am currently using:</p>
<p>    id patrolAction;<br />
    int pat_x1, pat_y1;<br />
    CCSequence *moveSequence;</p>
<p>            for (int x = 0; x&#60;[patrolPathX1 count]; x++){</p>
<p>                pat_x1=[[patrolPathX1 objectAtIndex:x]intValue];<br />
                pat_y1=[[patrolPathY1 objectAtIndex:x]intValue];</p>
<p>                patrolAction = [CCMoveTo actionWithDuration:1.5 position:[self positionForTileCoord:CGPointMake((float) pat_x1, (float) pat_y1)]]; </p>
<p>                moveSequence = [CCSequence actions:patrolAction, nil];</p>
<p>                [enemy2 runAction:moveSequence];<br />
            }</p>
<p>The aim is to get the sprite (enemy2) to move along this predefined path, however the sprite is just moving across to the final set of coordinates straight away. When I take out the for loop and hardcode them individually, it works fine. </p>
<p>(When I put the "runAction" outside of the for loop, the same effect is produced)</p>
<p>I have tried putting in a CCDelayTime in the sequence, yet this doesn't seem to help. </p>
<p>Can anyone help me out with this issue? </p>
<p>Thanks in advance :)
</p></description>
		</item>
		<item>
			<title>Arbel on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-138891</link>
			<pubDate>Tue, 10 Jan 2012 11:50:27 +0000</pubDate>
			<dc:creator>Arbel</dc:creator>
			<guid isPermaLink="false">138891@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I am making a music game and when the user presses a note it will produce a sound. The sound naturally needs to play immediately when the user presses, so they can tell whether they are in time with the music. However, it feels as if the sound is lagging, especially when note presses become quicker.</p>
<p>My background .m4a music file is played with AVAudioPlayer. I chose to use this as I have access to the currentTime property. I may be wrong, but I dont think I can access this with CocosDenshion.</p>
<p>I made a .wav file which is extremely short (a few hundred milliseconds). I preload my sound effect on init:</p>
<pre><code>[[SimpleAudioEngine sharedEngine] preloadEffect:@&#34;Assist.wav&#34;];</code></pre>
<p>Then to play the sound effect, in CCTouchesBegan I call:<br />
<pre><code>[[SimpleAudioEngine sharedEngine] playEffect:@&#34;Assist.wav&#34;];</code></pre>
<p>After that it calls my code to determine the users timing and awards points. Any idea why it might be lagging, or a better way to play sound effects in time with music?
</p></description>
		</item>
		<item>
			<title>Buster2000 on "[Game] Hangman Wild West"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29112#post-143431</link>
			<pubDate>Thu, 09 Feb 2012 11:06:17 +0000</pubDate>
			<dc:creator>Buster2000</dc:creator>
			<guid isPermaLink="false">143431@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi Everyone.  I just finished developing Hangman Wild West using the cocos2D engine.  The game was developed for <a href="http://www.fatspanner.com/" rel="nofollow">http://www.fatspanner.com/</a> and <a href="http://www.bluechilligames.co.uk/" rel="nofollow">http://www.bluechilligames.co.uk/</a></p>
<p><strong>iTunes Link :</strong><br />
<a href="http://itunes.apple.com/gb/app/hangman-wild-west/id493921521?mt=8" rel="nofollow">http://itunes.apple.com/gb/app/hangman-wild-west/id493921521?mt=8</a></p>
<p><strong>YouTube Link:</strong><br />
<a href="http://www.youtube.com/watch?v=Nbmmx8OKfAw" rel="nofollow">http://www.youtube.com/watch?v=Nbmmx8OKfAw</a></p>
<p>Description:<br />
Yeeeehaaa!! Can y’all save Johnny from being hung at the Glory Hole Gallows? The classic Hangman Game is back with a wholesome southern twist. All y’all have to do is spell out the word that is being described in the hint, its’s easy! Now y’all can play it at home so there are no excuses not to help Johnny escape Sheriff Shiner.</p>
<p>Game Features:<br />
Fun sound effects and animations.<br />
Game Center Leaderboard<br />
In-App purchase extra content packs.</p>
<p>A few screenies:<br />
<img src="http://www.llanbu.pwp.blueyonder.co.uk/bluechilligames/images/games/large_game_icon/large_game_icon_classic_hangman.jpg" alt="Hangman Wild West" /></p>
<p>We've had some pretty good feedback so far and we have a few updates lined up.  There is a Lite version on the way which is currently in review by Apple.</p>
<p>Coming Soon:<br />
Multiplayer Game Mode<br />
More Content Packs
</p></description>
		</item>
		<item>
			<title>mijator on "Z order(s) and Layers"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29055#post-143322</link>
			<pubDate>Wed, 08 Feb 2012 21:36:09 +0000</pubDate>
			<dc:creator>mijator</dc:creator>
			<guid isPermaLink="false">143322@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Just wondering if I am right about the priority of z orders and layers...</p>
<p>&#62;&#62;&#62;<br />
That is:</p>
<p>Layer 1 : z:0</p>
<p>CCSprite *a-sprite z:100  // a-sprite is contained within Layer 1 so even though it has an individual z order of 100, it stays within the z:0 layer and all objects (on different layers) are above it if the layer they are on is greater than z:0 (see below)</p>
<p>//it also means I can have 99 more sprite "sub layers" within layer 1 before things start to get confusing</p>
<p>Layer 2 z:1  // everything in this layer is above all of the objects in Layer 1</p>
<p>CCSprite *b-sprite z:100 //i.e., even though they have the same z value, b-sprite is NOT in the same layer as a-sprite because it has been created in layer 2...</p>
<p>&#62;&#62;&#62;<br />
Am I right with the above?
</p></description>
		</item>
		<item>
			<title>tiggybouncer on "CCMenuItem Scene transfer help! And some other stuff..."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28958#post-142729</link>
			<pubDate>Sun, 05 Feb 2012 09:48:29 +0000</pubDate>
			<dc:creator>tiggybouncer</dc:creator>
			<guid isPermaLink="false">142729@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi.<br />
For the past few months, on my menus I have been using a piece of code similar to this to go from one scene to another:<br />
<pre><code>-(void)backToMainMenu:(id)sender
{
	MainMenuScene *mms = [MainMenuScene node];
	[[CCDirector sharedDirector]replaceScene:mms];
}</code></pre>
<p>This has worked in many other places inside my app, but it doesn't work now. Can someone please explain this to me.</p>
<p>Here is some more code to help:<br />
<pre><code>CCMenuItemLabel * backToMainMenu = [CCMenuItemLabel itemWithLabel:backToMainMenuLabel target:self selector:@selector(backToMainMenu:)];</code></pre>
<p>I have tried putting 'selector' on the end instead of 'sender'.</p>
<p>Another thing, yesterday, I created more defined colours in the ccTypes file. These all work wonderfully, so now there is a wider choice of colours to use. I would like to upload it to Github, but I can't. Is there anyone who I can send it to so it can be uploaded (I would be most grateful if someone could).</p>
<p>Thanks.</p>
<p>EDIT : I tested my code on the 1.0.1 version :)
</p></description>
		</item>
		<item>
			<title>precious.logic on "Sprite remain on scene in cocos2d"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29048#post-143244</link>
			<pubDate>Wed, 08 Feb 2012 10:44:28 +0000</pubDate>
			<dc:creator>precious.logic</dc:creator>
			<guid isPermaLink="false">143244@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I have a problem with my game the problem is that i have plate sprite which load after some time the plate sprite is is in plate object which have many more objects like 1.percentage sprite 2.item sprite 3.OrdertextSprite</p>
<p>i the game working on the simulator fine but when i played that game on iphone it is doing little bug first after some time (no time is fixed) 1.plate Sprite created and moved but some time it left it's clone back i solved this issue by creating the plate sprite behind the scene but no good sloution 2.when the object moved to the plate then percentage calculated according to the object cooked but some time the percentage sprite left behind on the scene i am destroying and removing child also but the percentage sprite didn't remove can any body have this type of problem the below is the code of the plate create plate,Add Percentage,MovePlate,DestroyPlate so check that<br />
<pre><code>-(CCSprite *)CreatPlate:(Plate *)objPlate
{
    PlistReader *objPlistRead = [[PlistReader alloc] init];
    [objPlistRead initWithFileName:@&#34;Plates&#38;Order&#34;];
    CCSprite *PlateSprite = [[CCSprite alloc]init];
    if(objPlistRead.LengthOfPList&#62;0)
    {
        NSDictionary *PlatesInfo = [objPlistRead GetTheObjectById:@&#34;Plates&#34;]  ;
        NSString *Path = [[CommanMethods GetCompletePath:[PlatesInfo
                                                objectForKey:@&#34;PlateImage&#34;]] copy];
        int PositionX = [[PlatesInfo objectForKey:@&#34;PositionX&#34;] intValue];
        int PositionY = [[PlatesInfo objectForKey:@&#34;PositionY&#34;] intValue];
        PlateSprite = [CCSprite spriteWithFile:Path];
        PlateSprite.scale = .58;
        PlateSprite.position = ccp(PositionX, PositionY);
        [self addChild:PlateSprite];
        Path = [[CommanMethods GetCompletePath:[PlatesInfo
                                                          objectForKey:@&#34;WithImage&#34;]] copy];
        objPlate.WithSprite = [CCSprite spriteWithFile:Path] ;
        objPlate.WithSprite.scale = .58;
        objPlate.WithSprite.position = ccp(PositionX, PositionY);
        objPlate.WithSprite.visible = NO;
        objPlate.WithSound = [[PlatesInfo objectForKey:@&#34;WithSound&#34;] copy];
        [self addChild:objPlate.WithSprite];

        objPlate.PercentageArray = [NSMutableArray arrayWithArray:[PlatesInfo objectForKey:@&#34;Percentage&#34;]]  ;
        //Path = nil;
        //[PlatesInfo release];
        //PlatesInfo = nil;
        //[Path release];

    }
    [objPlistRead release];
    objPlistRead = nil;
    return PlateSprite;

}

-(void)MovePlate:(NSMutableArray *)ObjectsArray
{
    Plate * objPlate = [ObjectsArray objectAtIndex:0];
    CGPoint MovePosition = [[ObjectsArray objectAtIndex:1] CGPointValue];
    float Speed = [[ObjectsArray objectAtIndex:2] floatValue];

    [objPlate.PlateSprite runAction:[CCMoveTo actionWithDuration:Speed position:MovePosition ]];

    if(objPlate.ItemSprite!=NULL)
    {
        if(objPlate.IslectuaseLeave)
        {
            //[ObjItemSprite runAction:[CCRotateTo actionWithDuration:0 angle:90]];
            int x = MovePosition.x+7;
            int y = (MovePosition.y-15);
            [objPlate.ItemSprite runAction:[CCMoveTo actionWithDuration:Speed position:ccp(x,y)] ];
        }
        else
        {
            [objPlate.ItemSprite runAction:[CCMoveTo actionWithDuration:Speed position:MovePosition] ];
        }
    }
    if(objPlate.SecondItemSprite!=NULL)
    {
        if(objPlate.IslectuaseLeave)
        {
            //[ObjItemSprite runAction:[CCRotateTo actionWithDuration:0 angle:90]];
            int x = MovePosition.x+7;
            int y = (MovePosition.y-15);
            [objPlate.SecondItemSprite runAction:[CCMoveTo actionWithDuration:Speed position:ccp(x,y)] ];
        }
        else
        {
            [objPlate.SecondItemSprite runAction:[CCMoveTo actionWithDuration:Speed position:MovePosition] ];
        }
    }
    if(objPlate.WithSprite!=NULL &#38;&#38; objPlate.WithSprite.visible!=NO)
    {
         [objPlate.WithSprite runAction:[CCMoveTo actionWithDuration:Speed position:MovePosition] ];
    }
    if(objPlate.SecondOrderSprite!=NULL &#38;&#38; objPlate.SecondOrderSprite.visible)
    {
        float x = MovePosition.x;
        float y = MovePosition.y;
        if(objPlate.OrderTextSprite.visible)
        {
            [objPlate.OrderTextSprite runAction:[CCMoveTo actionWithDuration:Speed position:CGPointMake(x, y+15)] ];
            [objPlate.SecondOrderSprite runAction:[CCMoveTo actionWithDuration:Speed position:CGPointMake(x, y-15)] ];
        }
        else
        {
            [objPlate.SecondOrderSprite runAction:[CCMoveTo actionWithDuration:Speed position:MovePosition] ];

        }
    }
    else
    {
        [objPlate.OrderTextSprite runAction:[CCMoveTo actionWithDuration:Speed position:MovePosition] ];
    }
    if(objPlate.PercentageSprite!=NULL)
    {
         [objPlate.PercentageSprite runAction:[CCMoveTo actionWithDuration:Speed position:MovePosition] ];
    }
    else
    {
        objPlate.PercentageSprite.visible = NO;
    }
    [ObjectsArray removeAllObjects];
   // [ObjectsArray release];

}

-(void)showPercentage:(Plate *)objPlate
{
    NSString *FileName = @&#34;nill&#34;;
    NSString *Path;
    if(objPlate.TotalPlatePercentage&#62;=99)
    {
        FileName = [objPlate.PercentageArray objectAtIndex:3];
    }
    else if(objPlate.TotalPlatePercentage&#62;=95)
    {
         FileName = [objPlate.PercentageArray objectAtIndex:2];
    }
    else if(objPlate.TotalPlatePercentage&#62;=80)
    {
        FileName = [objPlate.PercentageArray objectAtIndex:1];
    }
    else if(objPlate.TotalPlatePercentage&#62;=70)
    {
        FileName = [objPlate.PercentageArray objectAtIndex:0];
    }
    if(![FileName isEqualToString:@&#34;nill&#34;])
    {
        Path = [[CommanMethods GetCompletePath:FileName] copy];
        objPlate.PercentageSprite = [CCSprite spriteWithFile:Path] ;
        objPlate.PercentageSprite.position = objPlate.Position;
        objPlate.PercentageSprite.scale = .58;
        [self addChild:objPlate.PercentageSprite];
    }
}

-(void)DestroyPlateObject:(NSMutableArray *)ObjectsArray
{

    [self CheckLevelUp];
    if([PlatesArray count]&#60;=0 &#38;&#38; topSeekBarStage &#62;2)
    {
        topSeekBarStage = 2;
    }
    if(Sound)
    {
        [[SimpleAudioEngine sharedEngine] playEffect:[[CommanMethods GetCompleteSoundPath:@&#34;ordercomplete.wav&#34;]copy]];

    }
    CompletedOrders += 1;
    if(CompletedOrders%10==0)
    {
        [self  CheckAcheivement];
    }
    [CompleteOrderLable setString:[NSString stringWithFormat:@&#34;%d&#34;,CompletedOrders ]];
    [CurrentEarningLable setString:[NSString stringWithFormat:@&#34;%.2f&#34;,CurrentEarning]];
    Plate  *objPlate =[[ObjectsArray objectAtIndex:0] retain];

    [self removeChild:objPlate.PlateSprite cleanup:YES];
    [self removeChild:objPlate.ItemSprite cleanup:YES];
    [self removeChild:objPlate.OrderTextSprite cleanup:YES];
    [self removeChild:objPlate.WithSprite cleanup:YES];

    if(objPlate.SecondOrderSprite!=NULL)
    {
        [self removeChild:objPlate.SecondOrderSprite cleanup:YES];
        [self removeChild:objPlate.SecondItemSprite cleanup:YES];
    }
    if(objPlate.PercentageSprite!=NULL)
    {
        [self removeChild:objPlate.PercentageSprite cleanup:YES];
    }
    //[objPlate.PercentageArray removeAllObjects];
    objPlate.PercentageArray = nil;
    [objPlate.PercentageArray release];

    [objPlate release];
    objPlate = nil;

    SelectedItemIndex = -1;
    PaneSelected = -1;
    //[ObjectsArray release];
    [ObjectsArray removeAllObjects];
    //[self ReArrangePlates];

}</code></pre></description>
		</item>
		<item>
			<title>Garfeild on "[GAME] Virus Wars™ + Promo codes"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28986#post-142850</link>
			<pubDate>Mon, 06 Feb 2012 12:50:04 +0000</pubDate>
			<dc:creator>Garfeild</dc:creator>
			<guid isPermaLink="false">142850@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hello cocos2d forum!</p>
<p>I'm a team leader and iOS developer in small indie game studio Dash &#38; Dot.</p>
<p>I want to introduce our debut game Virus Wars™ powered by cocos2d engine.</p>
<p>Virus Wars™ is a board game that imitates evolution of several hostile colonies of viruses.</p>
<p>Key features:<br />
• Up to 4 players on one iPhone/iPod.<br />
• Unique and smart AI.<br />
• Online multiplayer through GameCenter or bluetooth.<br />
• Clear interactive tutorial for fast start.<br />
• Natural graphics, sounds and feel.</p>
<p>Game rules:<br />
Each player can make 3 steps per 1 turn from his corner. Next step can be done in the cell, which is in contact with previous cell occupied by player's cross (virus), or through a chain of enemy's killed viruses. The main goal is to kill all enemy's viruses or to bring to the situation when your enemy cannot make a move.</p>
<p>Screen shots:<br />
<img src="http://a1.mzstatic.com/us/r1000/068/Purple/02/68/a7/mzl.qgooysot.320x480-75.jpg" /><br />
<img src="http://a4.mzstatic.com/us/r1000/096/Purple/10/7c/a4/mzl.qlsebfdl.320x480-75.jpg" /><br />
<img src="http://a1.mzstatic.com/us/r1000/064/Purple/22/5f/5e/mzl.ovspradq.320x480-75.jpg" /><br />
<img src="http://a2.mzstatic.com/us/r1000/087/Purple/b1/1d/43/mzl.ritxlgpz.320x480-75.jpg" /><br />
<img src="http://a5.mzstatic.com/us/r1000/109/Purple/ed/11/c9/mzl.bufscpgw.320x480-75.jpg" /></p>
<p>And as a present for cocos2d community here is several promo codes. If you will use any, please, leave a message in this thread.<br />
TK3NKEXR74AY<br />
77RF3A3XWXP7<br />
P6H7YA4AYNEF<br />
4H6RNKRMAANF<br />
KFL6XPXM4FPM</p>
<p><a href="http://bit.ly/AhT1F2">iTunes download link</a><br />
<a href="http://dash-and-dot.com">Dash &#38; Dot home site</a>
</p></description>
		</item>
		<item>
			<title>precious.logic on "error on removing imagePathComponents in cocos2d"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29042#post-143210</link>
			<pubDate>Wed, 08 Feb 2012 05:52:05 +0000</pubDate>
			<dc:creator>precious.logic</dc:creator>
			<guid isPermaLink="false">143210@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>i developed a game and i am using the xcode 4 after playing some time the game crash and the IDE point to this function<br />
<pre><code>+(NSString*) fullPathFromRelativePath:(NSString*) relPath
{
    // do not convert an absolute path (starting with &#039;/&#039;)
    if(([relPath length] &#62; 0) &#38;&#38; ([relPath characterAtIndex:0] == &#039;/&#039;))
    {
        return relPath;
    }

    NSMutableArray *imagePathComponents = [NSMutableArray arrayWithArray:[relPath pathComponents]];
    NSString *file = [imagePathComponents lastObject];

    [imagePathComponents removeLastObject];
    NSString *imageDirectory = [NSString pathWithComponents:imagePathComponents];

    NSString *fullpath = [[NSBundle mainBundle] pathForResource:file ofType:nil inDirectory:imageDirectory];
    if (fullpath == nil)
        fullpath = relPath;

    return fullpath;
}</code></pre>
<p>and trying to remove the<br />
<pre><code>[imagePathComponents removeLastObject];</code></pre>
<p>but got error b/c it is not available it is in the "CocosDenshion.h" Class so can any body tell me that what type of thing this function is removing so i fixed that thing in my code thanks
</p></description>
		</item>
		<item>
			<title>kingappdesigns on "How to Make Multiple levels"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29016#post-143046</link>
			<pubDate>Tue, 07 Feb 2012 16:05:18 +0000</pubDate>
			<dc:creator>kingappdesigns</dc:creator>
			<guid isPermaLink="false">143046@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>i want have multiple levels in make game such as different backgrounds sprites moving quicker and more does anybody have examples or something i can learn from
</p></description>
		</item>
		<item>
			<title>kbaren on "Complex shape and Prismatic Joint"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29011#post-143006</link>
			<pubDate>Tue, 07 Feb 2012 09:41:16 +0000</pubDate>
			<dc:creator>kbaren</dc:creator>
			<guid isPermaLink="false">143006@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I have a dynamic body created by polygon shape with 15 edges, when i try to create a prismatic joint , for body movement restriction on x axis it does not work(i can drag it in whole screen) but when i change complex shape to simple rectangle shape it works fine, and after when i create complex shape and inside it rectangle shape another dynamic (not all bodies ) bodies collides only with rectangle   what i do wrong? is there problem with body mass center or something else?
</p></description>
		</item>
		<item>
			<title>masse on "How to load part of tmx map"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28984#post-142842</link>
			<pubDate>Mon, 06 Feb 2012 11:01:57 +0000</pubDate>
			<dc:creator>masse</dc:creator>
			<guid isPermaLink="false">142842@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>i have big map 100 by 100.<br />
so i want to load part of map(10*10).</p>
<p>can i do that? or do you have any idea?</p>
<p>I would like to implement features that extend the map.
</p></description>
		</item>
		<item>
			<title>FJ on "100% working solution for the pinch-zoom &amp; pan-move with boundaries control??"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/19178#post-107524</link>
			<pubDate>Thu, 28 Jul 2011 06:08:10 +0000</pubDate>
			<dc:creator>FJ</dc:creator>
			<guid isPermaLink="false">107524@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi everybody,</p>
<p>I decide to create this thread because after going through a lot of threads I'm still stuck with this problem:<br />
I want to be able to pinch and zoom in/out (anywhere on the screen) and pan-move my layer (bigger than the screen size: 960x640) but keeping it within the limits, thus is no showing any "black background".<br />
I would like to achieve this using gesture recognizers.</p>
<p>Anybody has a 100% working code? So far I couldn't find a solution that works 100%.<br />
Just to be sure that we have the same image about what I would like to achieve, think about the "angry birds" interface and how it works.</p>
<p>Thanks to everybody in advance! :)
</p></description>
		</item>
		<item>
			<title>Panajev on "Shader effects on low resolution buffers and then upscale."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28971#post-142793</link>
			<pubDate>Sun, 05 Feb 2012 23:01:05 +0000</pubDate>
			<dc:creator>Panajev</dc:creator>
			<guid isPermaLink="false">142793@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hello everyone,</p>
<p>There is an idea I would like to discuss here and get some advice.</p>
<p>I am currently testing it out here:</p>
<p><a href="https://github.com/Panajev/rippleDemo" rel="nofollow">https://github.com/Panajev/rippleDemo</a></p>
<p>Every platform needs its optimizations, often on iPad 1 you tend to pour more work on the VS stage rather than on each fragment due to the low number of operation the iPad can do per screen pixel, but sometimes you might need or want to keep geometry simple and do more and more per fragment operations. Often, many effects look more than good enough if you do them on a low resolution image and then scale them up with a bi-linear filter.</p>
<p>Ideally you would want a CCSprite or CCRenderTexture subclass (or do you think a CCLayer would be better?) which you could initialize with an image or a CCTexture2D object maybe and a scaling factor.</p>
<p>So, to be clearer... the idea would be to do image processing (run custom shaders) on an arbitrarily small surface and then scale it up (activating bi-linear filtering for that texture) without running into tricky positioning issues when the image is going to be used as a normal sprite/node.</p>
<p>1.) take source CCTexture2D.<br />
2.) create a low resolution surface (CCRenderTexture? CCLayer? CCSprite? CCMutableTexture2D?) and render/init it with the source texture (scaled and positioned correctly [centered]).<br />
4.) pass custom CCGLProgram to the object containing the low resolution surface.<br />
5.) run the custom shaders (they run when the draw command for the custom low resolution surface is invoked).<br />
6.) composite the low resolution surface with your regular scene setting an appropriate scaling factor and bi-linearly filtering the surface when it is scaled up (magnified).</p>
<p>What I want to avoid, maybe it is OCD behavior lol, is to run the shaders on the scaled up surface... if it runs on the scaled and blurred image it is still processing too many pixels (think about a full-screen shader).</p>
<p>The question mainly centers around the way Cocos2D internally handles drawing sprites and the operations you can do on them: if -draw/visit is used to render the contents of the surface, but then the translations, rotations, scaling, and skew operations were performed as a second pass using the contents of the surface filled by the draw command... well, using a custom shader for the sprite and then setting sprite.scale = scaleFactor; should do the trick (the shader would only run on a "handful" of pixels and the image will be scaled up to fill a bigger area... it could allow for cheaper or more complex full screen effects). Is this what happens?</p>
<p>Looking at "-updateTransform" (scale and other operations set the sprite's dirty flag which causes the updateTransform method to do work and update the sprite accordingly), I see that after a scale operation the sprite's geometry is changed. So, if I create a small sprite, attach a custom shader to it, and then scale it up, I will get a benefit only for 1 frame at most. After the sprite has been scaled, the shader will run across the increased surface.</p>
<p>What hierarchy do you think would be best to achieve this?
</p></description>
		</item>
		<item>
			<title>Gamer on "To move the object (sprite) in all direction with constant speed in touch direct"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28907#post-142474</link>
			<pubDate>Fri, 03 Feb 2012 09:41:42 +0000</pubDate>
			<dc:creator>Gamer</dc:creator>
			<guid isPermaLink="false">142474@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi,<br />
I am developing this game in cocos2d.<br />
    I want to move a object(airplane) in all direction with constant speed and it should move and flip in the direction of touch point and it should follow path make by touches like if we make a circle then the object should follow that path and it should flip so that it look like that its moving like real airplane,<br />
and i want it should move from one side of screen to other side and again it will come from other side and move towards other side and if we touch the screen then it should move in the touch direction.<br />
i have use the code to follow the path but its not working good in my coding object is not moving and not flipping its just appear like that we dragging any object from one position to other,<br />
Please any one help me to solve this issue any idea or sample code please provide so that i can make my object to move in all direction with touch.</p>
<p>Thanks in advance.<br />
''
</p></description>
		</item>
		<item>
			<title>andi on "[Game] Tweet Land: Route 140"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28914#post-142515</link>
			<pubDate>Fri, 03 Feb 2012 15:22:12 +0000</pubDate>
			<dc:creator>andi</dc:creator>
			<guid isPermaLink="false">142515@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Introduction:<br />
What would happen if what people share on Twitter turns real? And best of all, if you could play with that? Welcome to the first game that turns tweets into reality. Get ready to jump into your race-car, drive on Route 140 and live the most innovative adventure of the moment, escape from tsunamis, zombies, meteorites, motorcycle gangs, and many more events that are really happening on this precise moment. </p>
<p>But, you are not alone!<br />
You will also be able to defend yourself with powerful weapons and cool events that will get you out of trouble and let you arrive safely to your destination. All of the events will be generated by people around the world that will create a new experience every time you play!</p>
<p>Why developers will find my game interesting:<br />
Very interesting way to create events based on real tweets.</p>
<p>Why gamers will find my game interesting:<br />
It uses real life tweets to schedule content, so it's pretty cool when you can see social networking being used as an input to a game.</p>
<p>Screenshots:<br />
<img src="http://i.imgur.com/RhzNw.png" /><br />
<img src="http://i.imgur.com/UqWAq.png" /><br />
<img src="http://i.imgur.com/CSn8a.png" /><br />
<img src="http://i.imgur.com/qjv8Y.png" /><br />
<img src="http://i.imgur.com/ctF0U.png" /><br />
<img src="http://i.imgur.com/zWtyd.png" /><br />
<img src="http://i.imgur.com/EgAwe.png" /><br />
<img src="http://i.imgur.com/PKlS2.png" /></p>
<p>Tweet Land Trailer:<br />
<a href="http://www.youtube.com/watch?v=6PXibEMngTM" rel="nofollow">http://www.youtube.com/watch?v=6PXibEMngTM</a></p>
<p>You can read more about Tweet Land here:<br />
<a href="http://www.tweetlandgame.com" rel="nofollow">http://www.tweetlandgame.com</a></p>
<p>Development: Tree Interactive</p>
<p>Publishing: Why Ideas</p>
<p>You can download Tweet Land from iTunes here:<br />
<a href="http://itunes.apple.com/app/tweet-land/id491102570?mt=8" rel="nofollow">http://itunes.apple.com/app/tweet-land/id491102570?mt=8</a></p>
<p>Please write an honest review on the app store and report directly back here about any bugs.
</p></description>
		</item>
		<item>
			<title>atash55 on "Game crashing on iOS lower than 4.3 . &#039;NSInvalidArgumentException&#039; exception."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28983#post-142836</link>
			<pubDate>Mon, 06 Feb 2012 09:33:55 +0000</pubDate>
			<dc:creator>atash55</dc:creator>
			<guid isPermaLink="false">142836@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>My game is running without problem on devices with ios 4.3 and above. When i first launched the game it only ran on ios 4.3 and above.<br />
I added the armv6 architecture manually by typing it out, to make the game run on ios below 4.3. The game is launching on devices with ios lower than 4.3 but it crashes when you select play. </p>
<p>It is throwing the following exception</p>
<p>"Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSMutableArray insertObject:atIndex:]: attempt to insert nil object at 0'"</p>
<p>at this code block on the fifth line.</p>
<p>'<br />
 [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"bushesfrontSheet.plist"];<br />
trees1 = [CCSprite spriteWithSpriteFrameName:@"bushesFront1.png"];<br />
trees2 = [CCSprite spriteWithSpriteFrameName:@"bushesFront2.png"];<br />
NSMutableArray *bushesFrames=[NSMutableArray array];<br />
[bushesFrames addObject: [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:@"bushesFront1.png"]];<br />
[bushesFrames addObject: [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:@"bushesFront2.png"]];<br />
CCAnimation * sketchAnimationBushesFront=[CCAnimation animationWithFrames:bushesFrames delay:0.2f];<br />
CCAction *sketchActionBushesFront1=[CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:sketchAnimationBushesFront restoreOriginalFrame:NO]];<br />
CCAction *sketchActionBushesFront2=[CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:sketchAnimationBushesFront restoreOriginalFrame:NO]];</p>
<p>[trees1 runAction:sketchActionBushesFront1];<br />
[trees2 runAction:sketchActionBushesFront2];<br />
'</p>
<p>When running on ios 4.3 and above it has no problem and runs smoothly. Could some one tell me where i am going wrong please?
</p></description>
		</item>
		<item>
			<title>bhaskarchem on "Hit The Box (New Game in App Store)"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/25498#post-132691</link>
			<pubDate>Sun, 11 Dec 2011 06:05:21 +0000</pubDate>
			<dc:creator>bhaskarchem</dc:creator>
			<guid isPermaLink="false">132691@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Check out my new game that was released on app store this week. Promo codes are not required as I have kept it free for a limited period post which the price will be back to $ 0.99. Thanks to Scott, Riq for a wonderful platform and Cocos2d forums that were of great help during the development phase.<br />
I am new to app development and this is my 1st app that I have developed using Cocos2d/Chipmunk.<br />
Let me know your comments.</p>
<p>Link to my app : <a href="http://itunes.apple.com/in/app/hit-the-box/id485881379?mt=8" rel="nofollow">http://itunes.apple.com/in/app/hit-the-box/id485881379?mt=8</a></p>
<p>------------------------------------------<br />
Bhaskar &#124; McBook Air &#124; iPhone 1st gen &#124; iPhone 4
</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>Allen Walker on "CCLabelTTF print two time"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28928#post-142594</link>
			<pubDate>Fri, 03 Feb 2012 23:07:45 +0000</pubDate>
			<dc:creator>Allen Walker</dc:creator>
			<guid isPermaLink="false">142594@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi all! i'm new in the forum :)<br />
I'm programming a Visual Novel engine in obj-c with cocos2d. Now, i'm writing the class for drawing text messages, but i'm a problem with one method...<br />
When I init this class with string message, I split the message in a NSMutableArray witch contain one single words in each element of the array.<br />
At beginning my class scheduled a selector each 0.02 sec and print a single letter of the word in the position 0 in the NSMutableArray.<br />
When i get the touch input and the message is not finished, I unscheduled the last method and call a new method that write all message in one time.<br />
But, this method print two times the same word and i don't understand why...<br />
I post the two methods..<br />
<a href="http://pastebin.com/xaZSjvn1" rel="nofollow">http://pastebin.com/xaZSjvn1</a>
</p></description>
		</item>
		<item>
			<title>Seerex on "[SOLVED] Only display 1 of 2 layers on scene?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28936#post-142629</link>
			<pubDate>Sat, 04 Feb 2012 07:40:46 +0000</pubDate>
			<dc:creator>Seerex</dc:creator>
			<guid isPermaLink="false">142629@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>[ANSWER]</p>
<p>Oh well, i actually send the shared directer runWithScene: and passed in a layer, not a scene. To my surprise, this actually worked? So, the sharedDirector can't tell the difference between a scene or layer i guess? </p>
<p>Hi all,</p>
<p>I'm reading through a book on cocos2d, and the second chapter puzzles me. I created 2 layers, one containing a sprite as a character, the other a sprite as background. I then create a game scene that adds the 2 layers as childs in the init method. I then redirect the CCDirecter sharedDirector in the appDelegate.m to load in the gameScene. Now, i get displayed the layer showing the game scene, but not the background? any particular reason for this? Here are the code:</p>
<p>@implementation BackgroundLayer</p>
<p>-(id) init {<br />
    self = [super init];<br />
    if (self) {<br />
        CCSprite *backgroundImage;<br />
        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {<br />
            // Indicate game is running on ipad<br />
            backgroundImage = [CCSprite spriteWithFile:@"background.png"];<br />
        } else {<br />
            backgroundImage = [CCSprite spriteWithFile:@"backgroundiPhone.png"];<br />
        }</p>
<p>        CGSize screenSize = [[CCDirector sharedDirector] winSize];<br />
        [backgroundImage setPosition:CGPointMake(screenSize.width/2, screenSize.height/2)];</p>
<p>        [self addChild:backgroundImage z:0 tag:0];<br />
    }</p>
<p>    return self;<br />
}</p>
<p>@implementation GameplayLayer</p>
<p>-(id) init {<br />
    self = [super init];<br />
    if (self) {<br />
        CGSize screenSize = [CCDirector sharedDirector].winSize;<br />
        // enable touches<br />
        self.isTouchEnabled = YES;<br />
        vikingSprite = [CCSprite spriteWithFile:@"sv_anim_1.png"];<br />
        [vikingSprite setPosition:CGPointMake(screenSize.width/2, screenSize.height*0.17f)];</p>
<p>        [self addChild:vikingSprite];</p>
<p>        if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad) {<br />
            // if NOT for the ipad, scale down ole<br />
            // in games, use this to load art sized for the device<br />
            [vikingSprite setScaleX:screenSize.width/1024.0f];<br />
            [vikingSprite setScaleY:screenSize.height/768.0f];<br />
        }<br />
    }</p>
<p>    return self;<br />
}</p>
<p>@implementation GameScene</p>
<p>-(id) init {<br />
    self = [super init];<br />
    if (self) {<br />
        // bacground layer<br />
        BackgroundLayer *backgroundLayer = [BackgroundLayer node];<br />
        [self addChild:backgroundLayer z:0];<br />
        // Gameplay layer<br />
        GameplayLayer *gameplayLayer = [GameplayLayer node];<br />
        [self addChild:gameplayLayer z:5];<br />
    }</p>
<p>    return self;<br />
}</p>
<p>Thanks on advance
</p></description>
		</item>
		<item>
			<title>kingappdesigns on "Can you show me my mistake please"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28919#post-142535</link>
			<pubDate>Fri, 03 Feb 2012 18:26:50 +0000</pubDate>
			<dc:creator>kingappdesigns</dc:creator>
			<guid isPermaLink="false">142535@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>2012-02-03 13:12:07.470 DuckHunting[174:707] cocos2d: cocos2d v1.0.1<br />
2012-02-03 13:12:07.475 DuckHunting[174:707] cocos2d: Using Director Type:CCDirectorDisplayLink<br />
2012-02-03 13:12:07.979 DuckHunting[174:707] cocos2d: OS version: 5.0.1 (0x05000100)<br />
2012-02-03 13:12:07.981 DuckHunting[174:707] cocos2d: GL_VENDOR:   Imagination Technologies<br />
2012-02-03 13:12:07.982 DuckHunting[174:707] cocos2d: GL_RENDERER: PowerVR SGX 543<br />
2012-02-03 13:12:07.984 DuckHunting[174:707] cocos2d: GL_VERSION:  OpenGL ES-CM 1.1 IMGSGX543-63.14.2<br />
2012-02-03 13:12:07.987 DuckHunting[174:707] cocos2d: GL_MAX_TEXTURE_SIZE: 4096<br />
2012-02-03 13:12:07.988 DuckHunting[174:707] cocos2d: GL_MAX_MODELVIEW_STACK_DEPTH: 16<br />
2012-02-03 13:12:07.989 DuckHunting[174:707] cocos2d: GL_MAX_SAMPLES: 4<br />
2012-02-03 13:12:07.991 DuckHunting[174:707] cocos2d: GL supports PVRTC: YES<br />
2012-02-03 13:12:07.992 DuckHunting[174:707] cocos2d: GL supports BGRA8888 textures: YES<br />
2012-02-03 13:12:07.994 DuckHunting[174:707] cocos2d: GL supports NPOT textures: YES<br />
2012-02-03 13:12:07.995 DuckHunting[174:707] cocos2d: GL supports discard_framebuffer: YES<br />
2012-02-03 13:12:07.997 DuckHunting[174:707] cocos2d: compiled with NPOT support: NO<br />
2012-02-03 13:12:07.998 DuckHunting[174:707] cocos2d: compiled with VBO support in TextureAtlas : YES<br />
2012-02-03 13:12:07.999 DuckHunting[174:707] cocos2d: compiled with Affine Matrix transformation in CCNode : YES<br />
2012-02-03 13:12:08.001 DuckHunting[174:707] cocos2d: compiled with Profiling Support: NO<br />
2012-02-03 13:12:08.204 DuckHunting[174:707] cocos2d: surface size: 480x320<br />
2012-02-03 13:12:08.391 DuckHunting[174:707] *** Assertion failure in -[CCTimer initWithTarget:selector:interval:], /Users/mouthofhands/Desktop/DuckHunting/DuckHunting/libs/cocos2d/CCScheduler.m:110<br />
2012-02-03 13:12:08.393 DuckHunting[174:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Signature not found for selector - does it have the following form? -(void) name: (ccTime) dt'<br />
*** First throw call stack:<br />
(0x36ff88bf 0x316c61e5 0x36ff87b9 0x31a363b3 0x46f2d 0x48e07 0x349f5 0x92e21 0x32c11 0x92a3d 0x32c11 0x91fdf 0x325ca845 0x325c43bd 0x32592921 0x325923bf 0x32591d2d 0x31105df3 0x36fcc553 0x36fcc4f5 0x36fcb343 0x36f4e4dd 0x36f4e3a5 0x325c3457 0x325c0743 0x91c8f 0x2cc8)<br />
terminate called throwing an exception</p>
<pre><code>#<a href='http://www.cocos2d-iphone.org/forum/tags/import'>import</a> &#34;GameplayLayer.h&#34;

@implementation GameplayLayer
-(id)init {
    [self scheduleUpdate];
    self = [super init];
    CGSize size =[[CCDirector sharedDirector] winSize];
    if (self != nil) {

        screenHeight = size.height;
        srceenWidth = size.width;

        // enable touches
               duckSprite = [CCSprite spriteWithFile:@&#34;duck1.png&#34;
        rect:CGRectMake(0, 0, 20, 20)];
        duckSprite.position = ccp(100, screenHeight/2);

        [self addChild:duckSprite];

        CCAnimation *duckAnim = [CCAnimation animation];
        [duckAnim addFrameWithFilename:@&#34;duck1.png&#34;];
        [duckAnim addFrameWithFilename:@&#34;duck2.png&#34;];
        id duckAnimationAction =
        [CCAnimate actionWithDuration:0.5f
                            animation:duckAnim
        restoreOriginalFrame:YES];
        id repeatduckAnimation =
        [CCRepeatForever actionWithAction:duckAnimationAction];
        [duckSprite runAction:repeatduckAnimation];

        crosshair = [CCSprite spriteWithFile:@&#34;crosshair.png&#34;
                  rect:CGRectMake(0, 0, 125, 125)];
        [self addChild:crosshair];

        crosshair.position = CGPointMake( size.width / 2, size.height / 2);
        self.isAccelerometerEnabled = YES;

        [self schedule:@selector(updatecrosshair:) interval:1.0/60.f];

        CCMenuItem *shoot = [CCMenuItemImage itemFromNormalImage:@&#34;Shootbutton.png&#34; selectedImage:@&#34;Shootbuttons.png&#34; target:self selector:@selector(shootbuttonin:)];

        shoot.position = ccp(450,30);
        [self addChild:shoot];

    }

    return self;

}

- (void)shootbuttonin:(id)sender {
    [[CCDirector sharedDirector] winSize];
    CGRect duckRect = CGRectMake(
                                 duckSprite.position.x - (duckSprite.contentSize.width/2),
                                 duckSprite.position.y - (duckSprite.contentSize.height/2),
                                 duckSprite.contentSize.width,
                                 duckSprite.contentSize.height);

    CGRect crosshairRect = CGRectMake(
                                      crosshair.position.x - (crosshair.contentSize.width/2),
                                      crosshair.position.y - (crosshair.contentSize.height/2),
                                      crosshair.contentSize.width,
                                      crosshair.contentSize.height);
    if (CGRectIntersectsRect(duckRect, crosshairRect)) {
        CCLOG(@&#34;Collision!&#34;);

}
}
-(void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration{
CCLOG(@&#34;Acceleration Values are x:%f y:%f z:%f&#34;, acceleration.x , acceleration.y, acceleration.z );

    tiltHorizontal = acceleration.y * 20;
    tiltVertically = (acceleration.x + .4) *20;
    CCLOG(@&#34;tiltHorizontal is %i&#34;, tiltHorizontal );

}
- (void) dealloc
{
	// in case you have something to dealloc, do it in this method
	// in this particular example nothing needs to be released.
	// cocos2d will automatically release all the children (Label)

	// don&#039;t forget to call &#34;super dealloc&#34;
	[super dealloc];
}

@end</code></pre></description>
		</item>
		<item>
			<title>Tough Guy on "cocos2D CCLayerColor Opacity to all Child Objects"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28910#post-142491</link>
			<pubDate>Fri, 03 Feb 2012 11:40:57 +0000</pubDate>
			<dc:creator>Tough Guy</dc:creator>
			<guid isPermaLink="false">142491@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I'm trying to change the opacity of a CCLayerColor and everything what it contains (its children) and here are my efforts so far.</p>
<p>        retryMenuLayer = [CCLayerColor node];</p>
<p>        ccColor4B myColor = ccc4(0, 0, 0, 0);</p>
<p>        [retryMenuLayer initWithColor:myColor];</p>
<p>        [self addChild:retryMenuLayer z:5];</p>
<p>and when animating.</p>
<p>[retryMenuLayer runAction:[CCFadeIn actionWithDuration:0.5]];</p>
<p>The layer animates twice from to 0 to 255 opacity and the children remains opaque while it fades in.
</p></description>
		</item>
		<item>
			<title>CSharpToOC on "cocos2d Hexagon Tilemaps"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/16435#post-92661</link>
			<pubDate>Tue, 10 May 2011 23:39:17 +0000</pubDate>
			<dc:creator>CSharpToOC</dc:creator>
			<guid isPermaLink="false">92661@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I'm having issues with retrieving the correct coordinates for a selected hex tile.  The initial 2 or 3 left most columns are register fine.  As I select those further to the right of the map, the coordinates returned are off.  For testing I toggle the registered tiles visibility which allows me to visualize the tile coordinates it's registered.</p>
<p>To simplify further, I'm not adjusting the scale of the tilemap; although I will eventually.  Does anyone have a method that accurately converts touch location to hex tile coordinates?
</p></description>
		</item>
		<item>
			<title>azamsharp on "Horizontal Scrolling Just like UIScrollView"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28897#post-142426</link>
			<pubDate>Fri, 03 Feb 2012 02:47:31 +0000</pubDate>
			<dc:creator>azamsharp</dc:creator>
			<guid isPermaLink="false">142426@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I want to simply scroll throw few elements in my Cocos2d app. Each element will be displayed individually on the screen and then the user can swipe to change to the next element. Is this a job for CCParrallaxNode?
</p></description>
		</item>
		<item>
			<title>tiffanyPea on "confuusing method"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28735#post-141618</link>
			<pubDate>Sat, 28 Jan 2012 07:32:05 +0000</pubDate>
			<dc:creator>tiffanyPea</dc:creator>
			<guid isPermaLink="false">141618@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>hai guys, haven't talked in a while, been suuuper busy.</p>
<p>Anywayz, I've been trying to write an accessor for my BulletCache class, but I've been trying to figure out where to put it in this game kit I've been playing with &#62;&#60;<br />
The game class files include a GameScene, a GameLayer, and a LevelObject class. </p>
<p>Here's the intended accessor:<br />
<pre><code>-(BulletCache*) bulletCache
{
	CCNode *node = [self getChildByTag:kTagBulletCache];
	NSAssert([node isKindOfClass:[BulletCache class]], @”not a 	BulletCache”);
	return (BulletCache*)node;
}</code></pre>
<p>I am tempted to put the BulletCache accessor in the GameScene, because I have seen conventional small game code put it there before. On the other hand, a small part of me wants to put it in the LevelObject, because this is the superclass of the Characters, Players, Enemies, and Items classes.
</p></description>
		</item>
		<item>
			<title>azamsharp on "Swiping Using UIGestureRecognizer"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28895#post-142414</link>
			<pubDate>Fri, 03 Feb 2012 01:18:55 +0000</pubDate>
			<dc:creator>azamsharp</dc:creator>
			<guid isPermaLink="false">142414@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I am trying to detect swipes in my application. I have the following code but swipes are not detected at all.</p>
<p>-(void) setupGestureRecognizers<br />
{<br />
    UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft)];</p>
<p>    [swipeLeft setDirection:UISwipeGestureRecognizerDirectionLeft];</p>
<p>    [swipeLeft setNumberOfTouchesRequired:1];</p>
<p>    [[[[CCDirector sharedDirector] openGLView] window] setUserInteractionEnabled:YES];</p>
<p>    [[[CCDirector sharedDirector] openGLView] setUserInteractionEnabled:YES];<br />
    [[[CCDirector sharedDirector] openGLView] addGestureRecognizer:swipeLeft];</p>
<p>}
</p></description>
		</item>
		<item>
			<title>ader42 on "99.5 rc0 ccTouchesBegan issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/11186#post-63487</link>
			<pubDate>Wed, 17 Nov 2010 14:01:27 +0000</pubDate>
			<dc:creator>ader42</dc:creator>
			<guid isPermaLink="false">63487@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I don't seem to be able to get ccTouchesXXX working in a CCLayer</p>
<p>although ccTouchXXX works fine.</p>
<p>any ideas?</p>
<pre><code>-(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
	NSLog(@&#34; ccTouchesBegan game layer&#34; );
}

-(BOOL) ccTouchBegan:(UITouch*)touch withEvent:(UIEvent *)event
{
	NSLog(@&#34; ccTouchBegan game layer&#34; );
	return YES;
}</code></pre></description>
		</item>
		<item>
			<title>Tough Guy on "CCLayerColor setOpacity not working"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28876#post-142297</link>
			<pubDate>Thu, 02 Feb 2012 11:59:55 +0000</pubDate>
			<dc:creator>Tough Guy</dc:creator>
			<guid isPermaLink="false">142297@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi,</p>
<p>I have a menu inside a layer and I want to change the opacity of the layer over time. Here are my efforts so far.</p>
<p>in .h </p>
<p><code>CCLayerColor *retryMenuLayer;</code></p>
<p>and in .m file</p>
<p>	`retryMenuLayer = [CCLayer node];<br />
        [self addChild:retryMenuLayer z:5];</p>
<p>        retryMenuLayer.scale = 0.5;</p>
<p>        [retryMenuLayer setOpacity:0];`</p>
<p>and while animating I'm trying to to this.</p>
<p><code>[retryMenuLayer runAction:[CCFadeIn actionWithDuration:0.3]];</code></p>
<p>Any help would be much appreciated.
</p></description>
		</item>
		<item>
			<title>RishabhShah on "level making in cocos2d"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28647#post-141120</link>
			<pubDate>Wed, 25 Jan 2012 09:59:15 +0000</pubDate>
			<dc:creator>RishabhShah</dc:creator>
			<guid isPermaLink="false">141120@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>hello Friends,</p>
<p>Is anyone here familiar with "adding game levels"?</p>
<p>i want to make game with different levels. In game i have sprites at some specific position. now i want to change the position of sprites for each level and i want the logic(action) on sprite will remain same for all level. how is it possible? any ideas?</p>
<p>Is there any example or logic? and guys please explain me in details because i am new to cocos2d.
</p></description>
		</item>
		<item>
			<title>callispo on "Cut the Rope style intro video"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28851#post-142149</link>
			<pubDate>Wed, 01 Feb 2012 14:55:45 +0000</pubDate>
			<dc:creator>callispo</dc:creator>
			<guid isPermaLink="false">142149@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I was wondering, the intro animation of Cut the Rope, in which theres a knock on the door, and Om Nom appears in a box, etc. How is this made? Is there any way I can embed videos in my game like that, because making a video like that, by using CCSprites and CCAnimation would consume a lot of memory.
</p></description>
		</item>

	</channel>
</rss>

