<?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: iPhone Game Programming &#8211; Tutorial 4 &#8211; Bitmap Font Class</title>
	<atom:link href="http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/</link>
	<description>iPhone Game Development - Web Development</description>
	<lastBuildDate>Wed, 28 Jul 2010 17:12:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Pubudu</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-13/#comment-3708</link>
		<dc:creator>Pubudu</dc:creator>
		<pubDate>Fri, 16 Jul 2010 17:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3708</guid>
		<description>Hi Mike,
I&#039;m kind of new to iphone programming and find ur tutorials very useful.Thanks for all of that.
I have this problem in my mind for sometime and hence thought of asking u directly.

Lets say the program I&#039;m trying to write loads an image(a pattern with couple of colors). Then it&#039;ll play a sounds if the user&#039;s finger is inside image and will not do anything otherwise. Also it&#039;ll change the sound (when finger is inside the image) depending on the color of the image at finger&#039;s location.

I was successful in having an image loaded and accessing the finger location coordinates, playing sounds by wav files etc... Yet I couldn&#039;t figure out following two issues,

1) How to detect whether the finger was in or out the image?
2) How to access the color value of a given pixel in a an image. (let say the loaded image is an bitmap to make things simple)

I tried to do this for couple of months but had no progress. I went through almost all apple tutorials and some of yours too...but still cldn&#039;t resolve. I&#039;d be very greateful to you if you cld guide me on this.

Thanks

Pubudu</description>
		<content:encoded><![CDATA[<p>Hi Mike,<br />
I&#8217;m kind of new to iphone programming and find ur tutorials very useful.Thanks for all of that.<br />
I have this problem in my mind for sometime and hence thought of asking u directly.</p>
<p>Lets say the program I&#8217;m trying to write loads an image(a pattern with couple of colors). Then it&#8217;ll play a sounds if the user&#8217;s finger is inside image and will not do anything otherwise. Also it&#8217;ll change the sound (when finger is inside the image) depending on the color of the image at finger&#8217;s location.</p>
<p>I was successful in having an image loaded and accessing the finger location coordinates, playing sounds by wav files etc&#8230; Yet I couldn&#8217;t figure out following two issues,</p>
<p>1) How to detect whether the finger was in or out the image?<br />
2) How to access the color value of a given pixel in a an image. (let say the loaded image is an bitmap to make things simple)</p>
<p>I tried to do this for couple of months but had no progress. I went through almost all apple tutorials and some of yours too&#8230;but still cldn&#8217;t resolve. I&#8217;d be very greateful to you if you cld guide me on this.</p>
<p>Thanks</p>
<p>Pubudu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keith</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-13/#comment-3705</link>
		<dc:creator>keith</dc:creator>
		<pubDate>Fri, 16 Jul 2010 17:10:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3705</guid>
		<description>Dear Mike,
thanks for your help first, your tutor really useful.

But i just download your tutor 4 coding, 
and using simulator-3.0&#124;Debug to run it.
 
Only replace the one line at EAGLView.m
but it give me the same problem, the app. close itself with no error message.

//message = @&quot;This is a longer message to see if this is going to work....&quot;;

message = [NSString stringWithFormat:@&quot;%i&quot;, random];</description>
		<content:encoded><![CDATA[<p>Dear Mike,<br />
thanks for your help first, your tutor really useful.</p>
<p>But i just download your tutor 4 coding,<br />
and using simulator-3.0|Debug to run it.</p>
<p>Only replace the one line at EAGLView.m<br />
but it give me the same problem, the app. close itself with no error message.</p>
<p>//message = @&#8221;This is a longer message to see if this is going to work&#8230;.&#8221;;</p>
<p>message = [NSString stringWithFormat:@"%i", random];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-13/#comment-3703</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Thu, 15 Jul 2010 16:49:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3703</guid>
		<description>Hi Keith

I&#039;m not sure how you are defining your message ivar, but the way you are assigning it is incorrect.  The getWidthForString method requires a parameter of type NSString. If you are defining the message ivar as an NSString, then just pointing it to a random will not work, you would need to use something like
&lt;pre&gt;
message = [NSString stringWithFormat:@&quot;%i&quot;, random];
&lt;/pre&gt;

I have use the exact code above with the correction in place and it works fine.

See if that helps.

Mike</description>
		<content:encoded><![CDATA[<p>Hi Keith</p>
<p>I&#8217;m not sure how you are defining your message ivar, but the way you are assigning it is incorrect.  The getWidthForString method requires a parameter of type NSString. If you are defining the message ivar as an NSString, then just pointing it to a random will not work, you would need to use something like</p>
<pre>
message = [NSString stringWithFormat:@"%i", random];
</pre>
<p>I have use the exact code above with the correction in place and it works fine.</p>
<p>See if that helps.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keith</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-13/#comment-3701</link>
		<dc:creator>keith</dc:creator>
		<pubDate>Thu, 15 Jul 2010 16:38:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3701</guid>
		<description>dear Mike,
please help, as i find many web site and try many times, i also cannot get what i want.
only you can help me!

thanks
keith</description>
		<content:encoded><![CDATA[<p>dear Mike,<br />
please help, as i find many web site and try many times, i also cannot get what i want.<br />
only you can help me!</p>
<p>thanks<br />
keith</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keith</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-13/#comment-3685</link>
		<dc:creator>keith</dc:creator>
		<pubDate>Mon, 12 Jul 2010 15:46:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3685</guid>
		<description>Sorry for my poor english.
what i means is i just want use the bitmap font class to print out a random number, but the app. close itself with no error message. My code as following.


- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {

Int random_number1=random()%100;	
message=  random_number1;
messageX = 320; messageY=200;
messageWidth = [font1 getWidthForString:message];

}</description>
		<content:encoded><![CDATA[<p>Sorry for my poor english.<br />
what i means is i just want use the bitmap font class to print out a random number, but the app. close itself with no error message. My code as following.</p>
<p>- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {</p>
<p>Int random_number1=random()%100;<br />
message=  random_number1;<br />
messageX = 320; messageY=200;<br />
messageWidth = [font1 getWidthForString:message];</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-13/#comment-3683</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Mon, 12 Jul 2010 07:31:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3683</guid>
		<description>Dear Mike,

Thanks for reply, sorry have not give the details.
There is no error message when build the project, i place this function into a Starttouch screen event. 
When I run the similator the program run ok, but it close the app. automaticlly when I click the similator screen .
When i replace the code
message= [NSString stringWithFormat:@&quot;%d&quot;, random_number1]; -&gt;
message = @&quot;99&quot;;
the app. work good.
I believed i make something wrong about pass a value into a point, not passing a address??

thanks
keith</description>
		<content:encoded><![CDATA[<p>Dear Mike,</p>
<p>Thanks for reply, sorry have not give the details.<br />
There is no error message when build the project, i place this function into a Starttouch screen event.<br />
When I run the similator the program run ok, but it close the app. automaticlly when I click the similator screen .<br />
When i replace the code<br />
message= [NSString stringWithFormat:@"%d", random_number1]; -&gt;<br />
message = @&#8221;99&#8243;;<br />
the app. work good.<br />
I believed i make something wrong about pass a value into a point, not passing a address??</p>
<p>thanks<br />
keith</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-13/#comment-3682</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Mon, 12 Jul 2010 06:29:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3682</guid>
		<description>Hi keith

What are the errors you are getting. Without the error it is hard to identify the problem.

Mike</description>
		<content:encoded><![CDATA[<p>Hi keith</p>
<p>What are the errors you are getting. Without the error it is hard to identify the problem.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keith</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-13/#comment-3681</link>
		<dc:creator>keith</dc:creator>
		<pubDate>Sun, 11 Jul 2010 11:41:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3681</guid>
		<description>Hi Mike,

Your tutors is great.

when I try to use BitMap front to display a random number , it give me some error, can you tell what i should change my code? 
thank you very much
keith Chan
int random_number;	
random_number1 =  100;
message= [NSString stringWithFormat:@&quot;%d&quot;, random_number1];
messageX = 320; messageY=200;
messageWidth = [font1 getWidthForString:message];</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>Your tutors is great.</p>
<p>when I try to use BitMap front to display a random number , it give me some error, can you tell what i should change my code?<br />
thank you very much<br />
keith Chan<br />
int random_number;<br />
random_number1 =  100;<br />
message= [NSString stringWithFormat:@"%d", random_number1];<br />
messageX = 320; messageY=200;<br />
messageWidth = [font1 getWidthForString:message];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-13/#comment-3631</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Sun, 27 Jun 2010 08:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3631</guid>
		<description>Hi AD

I am tied up getting the final edits for the book finished at the moment, but as soon as that is done I am going to look to get the tutorials updated to the latest SDK. I&#039;ll also look at creating an abstract bitmap font class. If you want to have a go an see how you get on, I&#039;d be happy to look at any problems you come across.

Mike</description>
		<content:encoded><![CDATA[<p>Hi AD</p>
<p>I am tied up getting the final edits for the book finished at the moment, but as soon as that is done I am going to look to get the tutorials updated to the latest SDK. I&#8217;ll also look at creating an abstract bitmap font class. If you want to have a go an see how you get on, I&#8217;d be happy to look at any problems you come across.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AD</title>
		<link>http://www.71squared.com/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class/comment-page-12/#comment-3630</link>
		<dc:creator>AD</dc:creator>
		<pubDate>Sun, 27 Jun 2010 07:28:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=337#comment-3630</guid>
		<description>I downloaded your project, but it is for a very old SDK version. Please can you upload a newer version?

Also, would it be possible to have an abstract Bitmap font framework posted?</description>
		<content:encoded><![CDATA[<p>I downloaded your project, but it is for a very old SDK version. Please can you upload a newer version?</p>
<p>Also, would it be possible to have an abstract Bitmap font framework posted?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
