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

		<item>
			<title>Bill Hollings on "Animated pod file, objects disappearing."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29023#post-143445</link>
			<pubDate>Thu, 09 Feb 2012 14:24:24 +0000</pubDate>
			<dc:creator>Bill Hollings</dc:creator>
			<guid isPermaLink="false">143445@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/77597'>Mister_Cheese</a></p>
<p><strong>cocos3d</strong> does not cull objects to maintain frame rate.</p>
<p>Translucent objects are drawn in reverse-order of by distance from the camera. If your nodes are large planar objects (which, based on their names, it sounds like they might be), nodes moving from side to side can move ahead or behind other nodes as the straight-line distance to the node from the camera changes.</p>
<p>Read the notes for, and try playing with, the <code>shouldUseOnlyForwardDistance</code> property of the drawing sequencer. The sequencer is found in the <code>drawingSequencer</code> property of your <code>CC3World</code>.</p>
<p>You can also try playing with the <code>shouldDisableDepthMask</code> and <code>shouldDisableDepthTest</code> properties of some of your mesh nodes, to fiddle with how they are compared to other objects during drawing. Again, read the notes for those properties as well.</p>
<p>...Bill
</p></description>
		</item>
		<item>
			<title>Mister_Cheese on "Animated pod file, objects disappearing."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29023#post-143153</link>
			<pubDate>Tue, 07 Feb 2012 22:09:57 +0000</pubDate>
			<dc:creator>Mister_Cheese</dc:creator>
			<guid isPermaLink="false">143153@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Further experimenting may suggest it's a processing problem?   I am running my apps on an iPad 2,  and I have gotten rid of OpenEars and added a few more elements to the scene.    A couple static planes as a backdrop and 2 more planes that move across the screen via an animation in a pod file.  When I do not add the character I talk about in the above post everything loads and animates fine.  But when he is added one of the clouds will disappear, popping in every now and then for a couple of seconds.   </p>
<p>I can get everything to appear on the screen using by lowering the frame rate to 20 FPS (from 60) with [director setAnimationInterval:1.0/20].  Me scene seems less complex then the CC3DemoMashUp,  which runs smoothly on the iPad.  Though maybe my complexity is hidden in my 1 character.    I suppose this is the reason for parts of my character disappearing when using OpenEars. </p>
<p>Is this correct that objects don't get drawn in order to maintain the frame rate?  Also I have a few CC3Layers,  would combining everything into a single layer give a good performance boost?  </p>
<p>I am loading the models with the following code<br />
<pre><code>CC3MeshNode* mn;
    CC3ResourceNode* rezNode;
    rezNode = [CC3PODResourceNode nodeFromResourceFile:@&#34;Page01_backdrop.POD&#34;];
    mn = (CC3MeshNode*)[rezNode getNodeNamed: @&#34;Page01_Backdrop&#34;];
    mn.isOpaque = NO;
    [mn alignInvertedTextures];
    [self addChild:mn];

    rezNode = [CC3PODResourceNode nodeFromResourceFile:@&#34;Page01_SkyGradient.POD&#34;];
    mn = (CC3MeshNode*)[rezNode getNodeNamed: @&#34;Page01SkyGradient&#34;];
    mn.isOpaque = NO;
    [mn alignInvertedTextures];
    [self addChild:mn];

    rezNode = [CC3PODResourceNode nodeFromResourceFile:@&#34;Page01_Cloud01.POD&#34;];
    mn = (CC3MeshNode*)[rezNode getNodeNamed: @&#34;Cloud01&#34;];
    [mn remove];
    mn.isOpaque = NO;
    [mn alignInvertedTextures];
    [self addChild:mn];
    CCActionInterval* LCLoop = [CC3Animate actionWithDuration: 10 limitFrom: 0.0 to: 1.0];
    [mn runAction: [CCRepeatForever actionWithAction:LCLoop]];

    rezNode = [CC3PODResourceNode nodeFromResourceFile:@&#34;Page01_Cloud02.POD&#34;];
    mn = (CC3MeshNode*)[rezNode getNodeNamed: @&#34;Cloud02&#34;];
    [mn remove];
    mn.isOpaque = NO;
    [mn alignInvertedTextures];
    [self addChild:mn];
    LCLoop = [CC3Animate actionWithDuration: 14 limitFrom: 0.0 to: 1.0];
    [mn runAction: [CCRepeatForever actionWithAction:LCLoop]];</code></pre>
<p>And the character is loaded with the code in my above post in a different layer.</p>
<p>Andrew
</p></description>
		</item>
		<item>
			<title>Mister_Cheese on "Animated pod file, objects disappearing."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29023#post-143098</link>
			<pubDate>Tue, 07 Feb 2012 18:23:39 +0000</pubDate>
			<dc:creator>Mister_Cheese</dc:creator>
			<guid isPermaLink="false">143098@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I have an pod file of an animated character created in max and have been having an issue where parts of his body will disappear, or the animation will go funky.  ie His hat will at his neck instead of on his head.</p>
<p>I use the following code to load the model and start the animation.<br />
<pre><code>CC3MeshNode* mn;
CC3ResourceNode* rezNode;
rezNode = [CC3PODResourceNode nodeFromResourceFile:@&#34;Learning_Companion_Anim_Ambient01.POD&#34;];
mn = (CC3MeshNode*)[rezNode getNodeNamed: @&#34;Dummy01&#34;];
mn.isOpaque = NO;
[self addChild:mn];
CCActionInterval* LCLoop = [CC3Animate actionWithDuration: kAnimationTime limitFrom: 0.0 to: 1.0];
[mn runAction: [CCRepeatForever actionWithAction:LCLoop]];</code></pre>
<p>After some messing around, I have discovered that using OpenEars, an open source library for voice recognition <a href="http://www.politepix.com/openears" rel="nofollow">http://www.politepix.com/openears</a>   It seems to be the cause for parts of the body disappearing.  If I never start openears from listening for audio input the model animates fine.  If the animation is never started with runAction, then the model appears correctly and none of his body parts are missing.</p>
<p>I was hoping someone might have some insight as to why this library would be messing up the animations running in cocos3d.  I also realize my chances at getting help on this are slim to none as the problem is stemming from conflicting libaries, so I would really appreciate any insight.</p>
<p>Thanks,<br />
Andrew
</p></description>
		</item>
		<item>
			<title>Omegas7 on "[ShinyCocos] First public release: 0.1.0 (Birthday Pinata)"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/1163/page/2#post-141652</link>
			<pubDate>Sat, 28 Jan 2012 19:03:06 +0000</pubDate>
			<dc:creator>Omegas7</dc:creator>
			<guid isPermaLink="false">141652@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hello there! I am also wondering if this is still alive. I find it very interesting!
</p></description>
		</item>
		<item>
			<title>Bill Hollings on "Cocos3d:General Performance Improvement Tips"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28585#post-140921</link>
			<pubDate>Mon, 23 Jan 2012 22:56:48 +0000</pubDate>
			<dc:creator>Bill Hollings</dc:creator>
			<guid isPermaLink="false">140921@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/16592'>flagman</a></p>
<p>Performance in a 3D game is affected by the amount of CPU operations (updating models, etc), the number of GL configuration and drawing operations, and the number of mesh faces you are trying to draw.</p>
<p>Different devices have different characteristics, that affect all three of these.</p>
<p>You can play with the <code>CC3Performance</code> demo app to see the affect on any particular device of changing these aspects (small/large meshes, number of nodes, etc).</p>
<p>You can also make use of a <code>CC3PerformanceStatistics</code> instance to track performance stats in your own app. See the <code>CC3PerformanceDemo</code> for how to set this up.</p>
<p>In general, the more faces you have in your models, the harder it is on performance. On slower devices, you can look to reduce the number of models being displayed, or the number of faces in each model.</p>
<p><strong>cocos3d&#62;/strong&#62; does perform efficient culling of objects that are not in the camera's field of view, so it's not really about how many models you have, but how many are in the camera's field of view at any one time that is most critical.</p>
<p>...Bill</strong>
</p></description>
		</item>
		<item>
			<title>flagman on "Cocos3d:General Performance Improvement Tips"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28585#post-140782</link>
			<pubDate>Mon, 23 Jan 2012 06:16:02 +0000</pubDate>
			<dc:creator>flagman</dc:creator>
			<guid isPermaLink="false">140782@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I implemented simple 3d shooter using cocos3d and very impressed by this engine. Many thanks to its creators.<br />
I used iphone 4 as target development device, and my code works fine on this device.<br />
But when i tried to run this code on iphone 3, i faced with bad performance. </p>
<p>Is there any general tips to improve performance?<br />
For example in cocos2d -  I have to use sprites sheet to get huge performance boost.</p>
<p>Thank you.
</p></description>
		</item>
		<item>
			<title>Tone on "Performance tips"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/9910#post-139244</link>
			<pubDate>Thu, 12 Jan 2012 15:21:09 +0000</pubDate>
			<dc:creator>Tone</dc:creator>
			<guid isPermaLink="false">139244@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Regarding this link </p>
<p><a href="http://getsetgames.com/2009/08/05/improving-the-performance-of-animating-sprites-in-cocos2d/" rel="nofollow">http://getsetgames.com/2009/08/05/improving-the-performance-of-animating-sprites-in-cocos2d/</a></p>
<p>I made some changes based on it and from what I can tell it has made a huge impact on some performance issues I was having with jittery-ness.
</p></description>
		</item>
		<item>
			<title>ksjogo on "Performance tips"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/9910#post-139224</link>
			<pubDate>Thu, 12 Jan 2012 10:52:18 +0000</pubDate>
			<dc:creator>ksjogo</dc:creator>
			<guid isPermaLink="false">139224@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I would not use CCArray, it complicates code and is not really faster.<br />
If you need an index you can still use fast enumeration with this style:<br />
<pre><code>int index = 0;
for(id obj in collection{
++index;
//do something
}</code></pre></description>
		</item>
		<item>
			<title>Tone on "Performance tips"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/9910#post-139187</link>
			<pubDate>Thu, 12 Jan 2012 04:52:33 +0000</pubDate>
			<dc:creator>Tone</dc:creator>
			<guid isPermaLink="false">139187@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I tried profiling my app with the device and I must admit I am having issues of it not even starting. </p>
<p>I would like get people's opinion about this post:</p>
<p><a href="http://getsetgames.com/2009/08/05/improving-the-performance-of-animating-sprites-in-cocos2d/" rel="nofollow">http://getsetgames.com/2009/08/05/improving-the-performance-of-animating-sprites-in-cocos2d/</a> </p>
<p>Is this still relevant to 1.0 or 1.1 codebase?
</p></description>
		</item>
		<item>
			<title>slembcke on "Performance tips"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/9910#post-139181</link>
			<pubDate>Thu, 12 Jan 2012 03:37:03 +0000</pubDate>
			<dc:creator>slembcke</dc:creator>
			<guid isPermaLink="false">139181@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Just remember to run the profiler before starting to micro-optimize for loops and things like that. Spend your time optimizing where you can make the most difference instead of guessing. If you improve one line of code in a method that uses 50% of your CPU time, that's generally a lot better than changing 50 that barely use any CPU time at all.
</p></description>
		</item>
		<item>
			<title>Tone on "Performance tips"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/9910#post-139175</link>
			<pubDate>Thu, 12 Jan 2012 01:40:37 +0000</pubDate>
			<dc:creator>Tone</dc:creator>
			<guid isPermaLink="false">139175@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>These are great. I am looking at performance right now in the game I am working on.
</p></description>
		</item>
		<item>
			<title>neigaard on "Optimizing CCParticleSystemQuad"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28232#post-139119</link>
			<pubDate>Wed, 11 Jan 2012 20:04:46 +0000</pubDate>
			<dc:creator>neigaard</dc:creator>
			<guid isPermaLink="false">139119@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi araker,</p>
<p>I never looked into the release notes of beta versions, I have only ever used the stable versions. Thank you for the heads up! I have now upgraded to 1.1 and that has given me much better performance when using the CCParticleBatchNode.</p>
<p>Thank you<br />
Søren
</p></description>
		</item>
		<item>
			<title>araker on "Optimizing CCParticleSystemQuad"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28232#post-138903</link>
			<pubDate>Tue, 10 Jan 2012 14:21:28 +0000</pubDate>
			<dc:creator>araker</dc:creator>
			<guid isPermaLink="false">138903@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>That functionality is already implemented in v1.1. Look for the class called CCParticleBatchNode, the <a href="http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:1_1_0">release notes</a> contain more information about it.
</p></description>
		</item>
		<item>
			<title>neigaard on "Optimizing CCParticleSystemQuad"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28232#post-138897</link>
			<pubDate>Tue, 10 Jan 2012 13:55:46 +0000</pubDate>
			<dc:creator>neigaard</dc:creator>
			<guid isPermaLink="false">138897@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi,</p>
<p>I have been looking for a way to optimized my use of particles. I have many CCParticleSystemQuad emitters that display the same at the same time, and I found this thread:</p>
<p><a href="http://www.cocos2d-iphone.org/forum/topic/177" rel="nofollow">http://www.cocos2d-iphone.org/forum/topic/177</a></p>
<p>This seems to be exactly what I need, but I can not figure out how to get it to work with CCParticleSystemQuad. So this thread is an attempt to get some new attention to that older thread and get some help getting my many emitters to perform well.</p>
<p>Thank you<br />
Søren
</p></description>
		</item>
		<item>
			<title>neigaard on "Optimize ParticleSystems"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/177/page/3#post-138358</link>
			<pubDate>Fri, 06 Jan 2012 09:59:20 +0000</pubDate>
			<dc:creator>neigaard</dc:creator>
			<guid isPermaLink="false">138358@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hello,</p>
<p>This is a old thread and the code seems out of sync with the latest release of cocos2d-iphone. Does anybody know how to make this sharing/reusing of a ParticleSystem work with the "new" CCParticleSystemQuad class?</p>
<p>I really hope one of you wizards can help me here, I could really need some performance boost in my game particles.</p>
<p>Best regards and high hopes<br />
Søren
</p></description>
		</item>
		<item>
			<title>cocos on "CCArray: Performance and usability"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/6793/page/2#post-137810</link>
			<pubDate>Tue, 03 Jan 2012 20:03:24 +0000</pubDate>
			<dc:creator>cocos</dc:creator>
			<guid isPermaLink="false">137810@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Inserting at 0 index:</p>
<pre><code>testCount  = 10000; // size of the array
NSMutableArray: insert time at index 0 is about      85 ms
CCArray:        insert time at index 0 is about    3553 ms	&#60;-- 3.5sec !!!! 3553/85 = 41.8</code></pre>
<p>I hope it can be easily optimized - I did not look deeper into it yet.
</p></description>
		</item>
		<item>
			<title>Lonzz on "CCRenderTexture has big performance hit"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27867#post-137767</link>
			<pubDate>Tue, 03 Jan 2012 13:33:34 +0000</pubDate>
			<dc:creator>Lonzz</dc:creator>
			<guid isPermaLink="false">137767@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Sorry it took a while. Got around to test everything on the iPad 1 today. Result is I gained 10-15 frames by switching off blending. Big improvement, as it was mentioned here was to reorganize how my elements are setup and thus reducing the amount of pixels that are drawn. I restructured my setup, halfed the amount of pixels that are drawn by removing overlaying elements and am now running very comfortably on 60 frames.</p>
<p>Thanks guys!
</p></description>
		</item>
		<item>
			<title>Birkemose on "CCRenderTexture has big performance hit"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27867#post-136917</link>
			<pubDate>Mon, 26 Dec 2011 15:21:15 +0000</pubDate>
			<dc:creator>Birkemose</dc:creator>
			<guid isPermaLink="false">136917@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/67064'>Lonzz</a><br />
It is hard to judge from your post, and I haven't a lot of experience with iPad1, but it renders quite a few pixels, and if your scene ex renders every pixel on the screen twice, I would not be surprised if it dropped to 40.<br />
To give you an example on how important pixelcount is.<br />
On a 3G, if I render the entire screen twice, using two full screen sprites, framerate drops into the 40'es.<br />
If I render the screen only once, but breaks the sprite onto 30 triangle strips, with 40 trianges each ( 1200 triangles in total ) it renders faster.
</p></description>
		</item>
		<item>
			<title>abitofcode on "CCRenderTexture has big performance hit"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27867#post-136914</link>
			<pubDate>Mon, 26 Dec 2011 14:28:52 +0000</pubDate>
			<dc:creator>abitofcode</dc:creator>
			<guid isPermaLink="false">136914@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>There's also the mothership background thread to consider for other ideas <a href="http://www.cocos2d-iphone.org/forum/topic/5196" rel="nofollow">http://www.cocos2d-iphone.org/forum/topic/5196</a></p>
<p>I'm using the techniques above to drag back one frame at a time on my current app but as @<a href='http://www.cocos2d-iphone.org/forum/profile/20192'>Birkemose</a> points out reducing the number of pixels you render is the key (especially on the first gen iPad).
</p></description>
		</item>
		<item>
			<title>Lonzz on "CCRenderTexture has big performance hit"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27867#post-136906</link>
			<pubDate>Mon, 26 Dec 2011 12:39:18 +0000</pubDate>
			<dc:creator>Lonzz</dc:creator>
			<guid isPermaLink="false">136906@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/20192'>Birkemose</a> thank you for your reply.I did only see the big framerate drop on iPad 1. While I am not doing any manual OpenGL drawing I need to use 2 half screen size rectangles plus 2 rectangles that are 1/3 of the screen size and using opacity. Does it seem like normal behavior to you to see a framerate drop to 40fps on iPad 1? When I disable the backgrounds I am back to 60fps. It seems like a very common task to me and I was surprised to have that issue...</p>
<p>Many thanks,</p>
<p>Christoph
</p></description>
		</item>
		<item>
			<title>Birkemose on "CCRenderTexture has big performance hit"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27867#post-136900</link>
			<pubDate>Mon, 26 Dec 2011 11:10:36 +0000</pubDate>
			<dc:creator>Birkemose</dc:creator>
			<guid isPermaLink="false">136900@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/67064'>Lonzz</a><br />
There isnt any performance difference.</p>
<p>As to what has been suggested, disabling blending and reducing pixelformat, will only have very little impact of performance. If any at all. The main issue will always be how many pixels you render, plus if you make really really many OpenGL draw calls, or if you mess with OpenGL, and stalls the render pipeline.<br />
While it certainly makes perfect sense to use batch nodes, it in most cases is not such a huge performance gain, as many might think.  </p>
<p>In simulator - locked to 60 fps on an LCD screen - fps will almost immediately drop to 30 fps, and starting to drop towards 20 fps. But this is to be expected. FPS will be higher on device, if graphics is the main load. If CPU is the main load - as ex in intense physics simulations - fps will stay high on simulator, but drop significantly on device. Especially on older devices.
</p></description>
		</item>
		<item>
			<title>Lonzz on "CCRenderTexture has big performance hit"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27867#post-136899</link>
			<pubDate>Mon, 26 Dec 2011 10:36:22 +0000</pubDate>
			<dc:creator>Lonzz</dc:creator>
			<guid isPermaLink="false">136899@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi guys,</p>
<p>Thanks a lot for the quick response. That works! In general, would you use CCLayerColor or CCSprite with the mentioned optimization techniques?</p>
<p>Many thanks,</p>
<p>Christoph
</p></description>
		</item>
		<item>
			<title>abitofcode on "CCRenderTexture has big performance hit"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27867#post-136864</link>
			<pubDate>Sun, 25 Dec 2011 17:10:45 +0000</pubDate>
			<dc:creator>abitofcode</dc:creator>
			<guid isPermaLink="false">136864@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Are you experiencing a slowdown on the device, the simulator (to be expected) or both?</p>
<p>Some things to try;</p>
<p>As @<a href='http://www.cocos2d-iphone.org/forum/profile/35639'>Bananni</a> mentioned</p>
<pre><code>background.blendFunc = (ccBlendFunc){GL_ONE, GL_ZERO}; // switch off blending</code></pre>
<p>If you need to display a sprite;</p>
<pre><code>// Maybe it doesn&#039;t need to be full 32 bit
[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGB565];

[background.sprite.texture setAliasTexParameters]; // disable antialiasing if it&#039;s a sprite

// Use this to restore normal mode afterwards
[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_Default];</code></pre></description>
		</item>
		<item>
			<title>Bananni on "CCRenderTexture has big performance hit"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27867#post-136848</link>
			<pubDate>Sun, 25 Dec 2011 15:22:20 +0000</pubDate>
			<dc:creator>Bananni</dc:creator>
			<guid isPermaLink="false">136848@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>-you want to create a background with only 1 color? <code>CCLayerColor</code><br />
-do you want a gradient in it? <code>CCLayerGradient</code> (requires GL_SMOOTH on)<br />
-do you want to create a textured background? i use ONLY CCSprite without any problems.</p>
<p>Use the lowest possible pixelformat, saves performance and memory.<br />
Your background is may non transparent so you can disable GL_BLEND.
</p></description>
		</item>
		<item>
			<title>Lonzz on "CCRenderTexture has big performance hit"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/27867#post-136846</link>
			<pubDate>Sun, 25 Dec 2011 15:06:53 +0000</pubDate>
			<dc:creator>Lonzz</dc:creator>
			<guid isPermaLink="false">136846@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi guys,</p>
<p>I am currently working on a simple game that is using single color backgrounds. So far I have been using CCRenderTexture to draw the background once and then use it as a CCSprite. I have several backgrounds overlaying each other with the bottom one being fullscreen. But even if I am only using my smallest background which is half the screen, my framerate drops significantly.<br />
From your experience what would be your way of choice to create one color backgrounds/sprites? </p>
<p>Many thanks,</p>
<p>Christoph
</p></description>
		</item>
		<item>
			<title>clarus on "uialertview"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/21008#post-133450</link>
			<pubDate>Thu, 15 Dec 2011 07:37:31 +0000</pubDate>
			<dc:creator>clarus</dc:creator>
			<guid isPermaLink="false">133450@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Looking around the web, it sounds like you're hitting a bug that appeared in iOS4. You might be able to use/modify this instead:</p>
<p><a href="https://github.com/digdog/DDAlertPrompt" rel="nofollow">https://github.com/digdog/DDAlertPrompt</a>
</p></description>
		</item>
		<item>
			<title>woaicocos2d on "uialertview"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/21008#post-133436</link>
			<pubDate>Thu, 15 Dec 2011 05:02:35 +0000</pubDate>
			<dc:creator>woaicocos2d</dc:creator>
			<guid isPermaLink="false">133436@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>the uikit i mean ,is just a object that the APPLE provide for us.such as uiview,uitextfield ,not the cocos2d provided.<br />
the above want to say: if put a uiview on an alertview,then put a uitextfield on the uiview.then i set the textfield  first focus, but i can not put a word on the uitextfield. i guess it maybe the alertiview had swallow the focus, but i donnt know the real answer,or how to solve it.<br />
                              forgive my poor expression.
</p></description>
		</item>
		<item>
			<title>mayaz7_ayaz on "CCDraw Cubic Curve Line."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/25528#post-132847</link>
			<pubDate>Mon, 12 Dec 2011 09:26:17 +0000</pubDate>
			<dc:creator>mayaz7_ayaz</dc:creator>
			<guid isPermaLink="false">132847@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I am creating a game in cocos2d. in my game i am draw Multiple CubicBezier Lines, like a lace. on touches move i want to curve this lines. This is complete dynamically.
</p></description>
		</item>
		<item>
			<title>clarus on "uialertview"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/21008#post-132103</link>
			<pubDate>Wed, 07 Dec 2011 17:01:55 +0000</pubDate>
			<dc:creator>clarus</dc:creator>
			<guid isPermaLink="false">132103@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I want to help, but I'm not understanding. I don't know what you mean by putting "a uikit on an alertview" or putting a "textview on the uikit". I think you mean something other than "uikit" since uikit is not an object.
</p></description>
		</item>
		<item>
			<title>galenzo17 on "Performance on Ipad, load sprite´s (StoryBook)"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/25377#post-132051</link>
			<pubDate>Wed, 07 Dec 2011 12:45:08 +0000</pubDate>
			<dc:creator>galenzo17</dc:creator>
			<guid isPermaLink="false">132051@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi!</p>
<p>My code:</p>
<p>/////////////////////////////////  nandu.h    /////////////////////////////////////////</p>
<p>@interface nandu : CCLayer<br />
{<br />
	CCSprite *fondo;<br />
	//CCParticleRain *lluvialenguad;<br />
}</p>
<p>+(CCScene *) scene;</p>
<p>@end</p>
<p>///////////////////////////////********************/////////////////////////<br />
///////////////////////////////********************/////////////////////////<br />
///////////////////////////////********************/////////////////////////<br />
///////////////////////////////********************/////////////////////////<br />
///////////////////////////////********************/////////////////////////</p>
<p>/////////////////////////////////  nandu.m    /////////////////////////////////////////</p>
<p>#<a href='http://www.cocos2d-iphone.org/forum/tags/import'>import</a> "nandu.h"</p>
<p>@implementation nandu</p>
<p>+(CCScene *) scene<br />
{<br />
	// 'scene' is an autorelease object.<br />
	CCScene *scene = [CCScene node];</p>
<p>	// 'layer' is an autorelease object.<br />
	nandu *layer = [nandu node];</p>
<p>	// add layer as a child to scene<br />
	[scene addChild: layer];</p>
<p>	// return the scene<br />
	return scene;<br />
}</p>
<p>-(void)starButtonTapped{</p>
<p>	[[bookmanager sharedbookmanager] runSceneWithID:kcuruscene];</p>
<p>}</p>
<p>// on "init" you need to initialize your instance<br />
-(id) init<br />
{<br />
	// always call "super" init<br />
	// Apple recommends to re-assign "self" with the "super" return value<br />
	if( (self=[super init])) {</p>
<p>                isTouchEnabled_=YES;</p>
<p>		[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"curunandu.plist"];</p>
<p>		fondo =[CCSprite spriteWithFile:@"fondonandu.png"];<br />
		fondo.position=ccp(384,514);</p>
<p>		[self addChild:fondo z:-2];</p>
<p>		CCSprite *nandiu=[CCSprite spriteWithSpriteFrameName:@"nandusinfondo.png"];<br />
		//lenguado.anchorPoint=ccp(0,0);<br />
		nandiu.position= ccp(391, 637);<br />
		nandiu.tag=100;<br />
		[self addChild:nandiu];</p>
<p>		CCMenuItem *adelante = [CCMenuItemImage<br />
								itemFromNormalImage:@"1.png" selectedImage:@"1.png"<br />
								target:self selector:@selector(starButtonTapped)];<br />
		adelante.position = ccp(640, 60);</p>
<p>		CCMenuItem *atras = [CCMenuItemImage<br />
							 itemFromNormalImage:@"3.png" selectedImage:@"3.png"<br />
							 target:self selector:@selector(starButtonTapped)];<br />
		atras.position = ccp(130, 60);</p>
<p>		CCMenuItem *indice = [CCMenuItemImage<br />
							  itemFromNormalImage:@"2.png" selectedImage:@"2.png"<br />
							  target:self selector:@selector(starButtonTapped)];<br />
		indice.position = ccp(388, 100);</p>
<p>		CCMenuItem *ficha = [CCMenuItemImage<br />
							 itemFromNormalImage:@"botonfichatransparente.png" selectedImage:@"botonfichatransparente.png"<br />
							 target:self selector:@selector(starButtonTapped)];<br />
		ficha.position = ccp(189, 254);</p>
<p>		CCMenuItem *texto = [CCMenuItemImage<br />
							 itemFromNormalImage:@"botontransparentetexto.png" selectedImage:@"botontransparentetexto.png"<br />
							 target:self selector:@selector(starButtonTapped)];<br />
		texto.position = ccp(583, 305);</p>
<p>		CCMenu *starMenu = [CCMenu menuWithItems:adelante,atras,indice,ficha,texto, nil];<br />
		starMenu.position = CGPointZero;<br />
		[self addChild:starMenu];<br />
	}<br />
	return self;<br />
}</p>
<p>////Is this OK? mmmmm, I think maybe not, but work///////</p>
<p>-(void) ccTouchesBegan :(NSSet *) touches withEvent :(UIEvent *)event<br />
{<br />
	UITouch *touch =[touches anyObject];<br />
	CGPoint location= [touch locationInView:[touch view]];<br />
	location=[[CCDirector sharedDirector]convertToGL:location];</p>
<p>	CCSprite *nandusinfondo=(CCSprite *)[self getChildByTag:100];</p>
<p>	id effect = [CCWaves actionWithWaves:10 amplitude:10 horizontal:YES vertical:YES grid:ccg(10, 10) duration:3];<br />
	[nandusinfondo runAction:effect];</p>
<p>}</p>
<p>- (void) dealloc<br />
{<br />
	[[CCSpriteFrameCache sharedSpriteFrameCache] removeUnusedSpriteFrames];</p>
<p>	// don't forget to call "super dealloc"<br />
	[super dealloc];<br />
}</p>
<p>@end</p>
<p>///////////////////////////////********************/////////////////////////<br />
///////////////////////////////********************/////////////////////////<br />
///////////////////////////////********************/////////////////////////<br />
///////////////////////////////********************/////////////////////////<br />
///////////////////////////////********************/////////////////////////<br />
My  code works at 15 fps</p>
<p>And I have a BookManager and constant</p>
<p>My questions:</p>
<p>-How i can change my code for better performance?  Any Ideas? :)<br />
-I have 65 page to do; Is this the best way?<br />
-15 fps on device is ok? or crash all the time?<br />
-is this  the best way for sprites load?<br />
-All my art work is in .png; I have to change to .pvr?</p>
<p>i'm new on cocos2d and I almost finished my work and i need from the experience voice</p>
<p>and a study a lot before ask</p>
<p>sorry for my english i´m from Argentina like Riq!</p>
<p>best regards
</p></description>
		</item>

	</channel>
</rss>

