<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: AngelCodeFont Class Performance Update</title>
	<atom:link href="http://www.71squared.com/2009/06/angelcodefont-class-performance-update/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/</link>
	<description>iPhone Game Development - Web Development</description>
	<lastBuildDate>Sat, 04 Feb 2012 20:13:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: Ricardo Quesada</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-2/#comment-1275</link>
		<dc:creator>Ricardo Quesada</dc:creator>
		<pubDate>Mon, 20 Jul 2009 19:29:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1275</guid>
		<description>Hi,

I tried to use uthash in cocos2d, but uthash has an strange bug.
When you include uthash.h in your project (you don&#039;t need to use it), your game will perform ~5% worse.
I don&#039;t think it&#039;s a uthash bug. Instead I think it&#039;s a gcc, but anyway, it&#039;s a nasty bug.
Now, in cocos2d, I&#039;m using a modified version of Chipmunk&#039;s cpHashSet.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I tried to use uthash in cocos2d, but uthash has an strange bug.<br />
When you include uthash.h in your project (you don&#8217;t need to use it), your game will perform ~5% worse.<br />
I don&#8217;t think it&#8217;s a uthash bug. Instead I think it&#8217;s a gcc, but anyway, it&#8217;s a nasty bug.<br />
Now, in cocos2d, I&#8217;m using a modified version of Chipmunk&#8217;s cpHashSet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-2/#comment-1093</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Wed, 01 Jul 2009 18:43:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1093</guid>
		<description>Hi Jamie

I am experimenting with this myself at the moment.  One way to do this is to load an images vertices, tex coords and colour info into an Interleaved vertex array.  Then when updating the location of the image, you just change the vertices for that image in the IVA, you don&#039;t change the tex coords.  I&#039;m doing this in a skunk works I&#039;ve got going by registering every new Image with my Render Manager which returns to the Image class a pointer to an entry in the IVA.  This entry contains a structure which holds the vertices, tex coords and colour info.

In the Image then I can make changes directly to the data in the IVA, say vertices only and leave the tex coords and colour info untouched.

It also means I keep a copy of the original vertices, tex coords and colour info within the image as well, so I can transform the original i.e. translate or rotate and put the results straight into the pointer into the IVA.  At the moment this is given me around 500 quads with blending on the screen at 30fps, which I don&#039;t think is that bad.

Mike</description>
		<content:encoded><![CDATA[<p>Hi Jamie</p>
<p>I am experimenting with this myself at the moment.  One way to do this is to load an images vertices, tex coords and colour info into an Interleaved vertex array.  Then when updating the location of the image, you just change the vertices for that image in the IVA, you don&#8217;t change the tex coords.  I&#8217;m doing this in a skunk works I&#8217;ve got going by registering every new Image with my Render Manager which returns to the Image class a pointer to an entry in the IVA.  This entry contains a structure which holds the vertices, tex coords and colour info.</p>
<p>In the Image then I can make changes directly to the data in the IVA, say vertices only and leave the tex coords and colour info untouched.</p>
<p>It also means I keep a copy of the original vertices, tex coords and colour info within the image as well, so I can transform the original i.e. translate or rotate and put the results straight into the pointer into the IVA.  At the moment this is given me around 500 quads with blending on the screen at 30fps, which I don&#8217;t think is that bad.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Hill</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-2/#comment-1092</link>
		<dc:creator>Jamie Hill</dc:creator>
		<pubDate>Wed, 01 Jul 2009 18:38:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1092</guid>
		<description>@mike. I&#039;ve just noticed something interesting. It seems to be common knowledge that interleaving vertex and texture is faster, however, doing that there is no easy way of saying &quot;I already have the texture coords for this so don&#039;t bother calculating again and instead use pointer to existing&quot; whereas there is with keeping them separate. So I am actually getting better performance storing them as two separate arrays due to being able to reference the same data when possible.

I&#039;m sure there must be a way of doing this with interleaved data, but I can&#039;t see anything obvious with my very limited experience of this stuff.</description>
		<content:encoded><![CDATA[<p>@mike. I&#8217;ve just noticed something interesting. It seems to be common knowledge that interleaving vertex and texture is faster, however, doing that there is no easy way of saying &#8220;I already have the texture coords for this so don&#8217;t bother calculating again and instead use pointer to existing&#8221; whereas there is with keeping them separate. So I am actually getting better performance storing them as two separate arrays due to being able to reference the same data when possible.</p>
<p>I&#8217;m sure there must be a way of doing this with interleaved data, but I can&#8217;t see anything obvious with my very limited experience of this stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-2/#comment-1084</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Wed, 01 Jul 2009 08:34:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1084</guid>
		<description>@A Person, absolutely.  There is an overhead in using objects in Objective-C.  The original idea was to keep the code as much Objective-C as possible to start off with.  This is so people could see the concepts using clear OO rather than things being hidden inside a more procedural approach.

For some things though, games being one of them, there are good reasons for using structures and its something I&#039;ll go back and change. 

I&#039;m planning once I&#039;ve got all of the core topics covered to go back and work on enhancing the code to improve performance.  I&#039;ve already created a new render manager which batches up geometry, texture and colours into a single Interleaved Vertex Array and loads that into a Vertex Buffer Object from where it renders.  I&#039;m not going to be releasing that code just yet as I&#039;ve got more work I want to do on it, but it will find its way into a tutorial at some point :o)

In the mean time, if anyone has made changes to the code from the blog which has improved performance and wants to share, please feel free :o).  Some have already been sharing their findings and its great to see what ingenious ideas people have around common problems.

Mike</description>
		<content:encoded><![CDATA[<p>@A Person, absolutely.  There is an overhead in using objects in Objective-C.  The original idea was to keep the code as much Objective-C as possible to start off with.  This is so people could see the concepts using clear OO rather than things being hidden inside a more procedural approach.</p>
<p>For some things though, games being one of them, there are good reasons for using structures and its something I&#8217;ll go back and change. </p>
<p>I&#8217;m planning once I&#8217;ve got all of the core topics covered to go back and work on enhancing the code to improve performance.  I&#8217;ve already created a new render manager which batches up geometry, texture and colours into a single Interleaved Vertex Array and loads that into a Vertex Buffer Object from where it renders.  I&#8217;m not going to be releasing that code just yet as I&#8217;ve got more work I want to do on it, but it will find its way into a tutorial at some point :o)</p>
<p>In the mean time, if anyone has made changes to the code from the blog which has improved performance and wants to share, please feel free :o).  Some have already been sharing their findings and its great to see what ingenious ideas people have around common problems.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Person</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-2/#comment-1083</link>
		<dc:creator>A Person</dc:creator>
		<pubDate>Wed, 01 Jul 2009 00:17:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1083</guid>
		<description>@mike wouldn&#039;t it be better if Frame was structure and there was tile structure aswell</description>
		<content:encoded><![CDATA[<p>@mike wouldn&#8217;t it be better if Frame was structure and there was tile structure aswell</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Hill</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-2/#comment-1082</link>
		<dc:creator>Jamie Hill</dc:creator>
		<pubDate>Tue, 30 Jun 2009 22:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1082</guid>
		<description>Hi Mike sounds like you are making progress on optimising you rendering, just thought I&#039;d share some of my ideas as I now have my tilemap up and running using the buffer class idea I sent you. The speed is up to 60fps except for when touches happen where it drops down to about 47 (this is rendering the same tilemap as in your example and a load of text).

What I&#039;ve done is to create an array of all possible tiles in the MapSet class. This may use very slightly more memory for each tile, however, this way all the vertices and texture coords can just be referenced in glDrawElements. I then have a renderTileID:theID x:coordX y:coordY which handles all the buffering as 1 tileset normally equates to 1 texture.

Hope this helps it&#039;s working nicely for me although I still need to optimise further to get up to 60fps with touches.</description>
		<content:encoded><![CDATA[<p>Hi Mike sounds like you are making progress on optimising you rendering, just thought I&#8217;d share some of my ideas as I now have my tilemap up and running using the buffer class idea I sent you. The speed is up to 60fps except for when touches happen where it drops down to about 47 (this is rendering the same tilemap as in your example and a load of text).</p>
<p>What I&#8217;ve done is to create an array of all possible tiles in the MapSet class. This may use very slightly more memory for each tile, however, this way all the vertices and texture coords can just be referenced in glDrawElements. I then have a renderTileID:theID x:coordX y:coordY which handles all the buffering as 1 tileset normally equates to 1 texture.</p>
<p>Hope this helps it&#8217;s working nicely for me although I still need to optimise further to get up to 60fps with touches.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Person</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-1/#comment-1054</link>
		<dc:creator>A Person</dc:creator>
		<pubDate>Sat, 27 Jun 2009 18:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1054</guid>
		<description>Could you re-post the Angle code Font files, its hard for me to understand were this goes.</description>
		<content:encoded><![CDATA[<p>Could you re-post the Angle code Font files, its hard for me to understand were this goes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-1/#comment-1052</link>
		<dc:creator>Pablo</dc:creator>
		<pubDate>Fri, 26 Jun 2009 23:46:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1052</guid>
		<description>Oh, I forgot.

@IPhoner
In a font, there are certain pairs of letters that have different spacing between them. for example in &quot;Wo&quot; there&#039;s less space between the W and the o than in &quot;WO&quot;. This pairs of letters are called kerning pairs, and the space between them is called kerning.</description>
		<content:encoded><![CDATA[<p>Oh, I forgot.</p>
<p>@IPhoner<br />
In a font, there are certain pairs of letters that have different spacing between them. for example in &#8220;Wo&#8221; there&#8217;s less space between the W and the o than in &#8220;WO&#8221;. This pairs of letters are called kerning pairs, and the space between them is called kerning.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-1/#comment-1051</link>
		<dc:creator>Pablo</dc:creator>
		<pubDate>Fri, 26 Jun 2009 23:42:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1051</guid>
		<description>I copied all of my kerning code to your version of AngelCodeFont. To be honest I didn&#039;t do much testing, neither did I bother commenting on my code (sorry, but I&#039;m swamped with other work at the moment :( ). However the basics are working and it should help you see how to use uthash, which is unfortunately not very intuitive. The included file is a modified version of the AngelCodeFont files found in tutorial 6. I also bundled uthash.h which you&#039;ll need to add to your project for this to work. You can find a zip file with all of this &lt;a href=&quot;http://neop.gbtopia.com/misc/afclasses.zip&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. Hope this helps.

PS. I still plan to release my own classes sometime in the future but I need to get some free time to add some features which I personally don&#039;t use but that any self-respecting font class should have :P</description>
		<content:encoded><![CDATA[<p>I copied all of my kerning code to your version of AngelCodeFont. To be honest I didn&#8217;t do much testing, neither did I bother commenting on my code (sorry, but I&#8217;m swamped with other work at the moment :( ). However the basics are working and it should help you see how to use uthash, which is unfortunately not very intuitive. The included file is a modified version of the AngelCodeFont files found in tutorial 6. I also bundled uthash.h which you&#8217;ll need to add to your project for this to work. You can find a zip file with all of this <a href="http://neop.gbtopia.com/misc/afclasses.zip" rel="nofollow">here</a>. Hope this helps.</p>
<p>PS. I still plan to release my own classes sometime in the future but I need to get some free time to add some features which I personally don&#8217;t use but that any self-respecting font class should have :P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IPhoner</title>
		<link>http://www.71squared.com/2009/06/angelcodefont-class-performance-update/comment-page-1/#comment-1049</link>
		<dc:creator>IPhoner</dc:creator>
		<pubDate>Fri, 26 Jun 2009 20:05:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=594#comment-1049</guid>
		<description>What&#039;s Kerning?</description>
		<content:encoded><![CDATA[<p>What&#8217;s Kerning?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

