<?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 1</title>
	<atom:link href="http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/</link>
	<description>iPhone Game Development - Web Development</description>
	<lastBuildDate>Thu, 11 Mar 2010 01:22:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: CasdraBlog &#187; Blog Archive &#187; links for 2010-01-29</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-11/#comment-2535</link>
		<dc:creator>CasdraBlog &#187; Blog Archive &#187; links for 2010-01-29</dc:creator>
		<pubDate>Fri, 29 Jan 2010 11:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2535</guid>
		<description>[...] iPhone Game Programming – Tutorial 1 &#124; 71² &#8211; The ramblings of two 30-something developers (tags: iphone programming) [...]</description>
		<content:encoded><![CDATA[<p>[...] iPhone Game Programming – Tutorial 1 | 71² &#8211; The ramblings of two 30-something developers (tags: iphone programming) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-11/#comment-2369</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Mon, 04 Jan 2010 06:48:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2369</guid>
		<description>Hi WonwooLee

We used to host the videos for download but there are so many downloads now it was costing us a fortune in bandwidth charges, this is why we moved to Vimeo.

When new videos are added to Vimeo there is a download link available for a short while that can be used, apart from that we don&#039;t have a download link available.

If we find a hosting solution that allows us to download the movies we will start that again.  We were using over 40Gb per month on movies alone which can get expensive :o)

A link to the latest video for download is http://www.vimeo.com/8355746

Mike</description>
		<content:encoded><![CDATA[<p>Hi WonwooLee</p>
<p>We used to host the videos for download but there are so many downloads now it was costing us a fortune in bandwidth charges, this is why we moved to Vimeo.</p>
<p>When new videos are added to Vimeo there is a download link available for a short while that can be used, apart from that we don&#8217;t have a download link available.</p>
<p>If we find a hosting solution that allows us to download the movies we will start that again.  We were using over 40Gb per month on movies alone which can get expensive :o)</p>
<p>A link to the latest video for download is <a href="http://www.vimeo.com/8355746" rel="nofollow">http://www.vimeo.com/8355746</a></p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-11/#comment-2367</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Mon, 04 Jan 2010 06:40:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2367</guid>
		<description>Hi rgauss, I&#039;m glad you got your issue sorted out.  I would stick with the ES1Renderer class.  This is already set up to work with OGLES 1.1 and so should not need any change.  Just change the EAGLView class to use this class rather than ES2.
&lt;pre&gt;
The new template is set up to try and create an ES2 context that will only work on the SImulator of an iPhone 3Gs.  If that does not work then it will create an ES1.1 context using the ES1Renderer.

For my game I have simply removed the ES2Renderer all together and just use the ES1.1.

The code I have in EAGLView is below:

- (id) initWithCoder:(NSCoder*)coder
{    
    if ((self = [super initWithCoder:coder]))
	{
        // Get the layer
        CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
        
        eaglLayer.opaque = TRUE;
        eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
                                        [NSNumber numberWithBool:FALSE], 
					kEAGLDrawablePropertyRetainedBacking, 
                                        kEAGLColorFormatRGB565, 
					kEAGLDrawablePropertyColorFormat, 
                                        nil];
		
		// Set up an OpenGL ES 1.1 renderer
		renderer = [[ES1Renderer alloc] init];
		
		// If the renderer is empty then something wen wrong so release this instance
		// and return nothing
        if (!renderer)
        {
            [self release];
            return nil;
        }
    }
    return self;
}&lt;/pre&gt;

Hope it helps.

Mike</description>
		<content:encoded><![CDATA[<p>Hi rgauss, I&#8217;m glad you got your issue sorted out.  I would stick with the ES1Renderer class.  This is already set up to work with OGLES 1.1 and so should not need any change.  Just change the EAGLView class to use this class rather than ES2.</p>
<pre>
The new template is set up to try and create an ES2 context that will only work on the SImulator of an iPhone 3Gs.  If that does not work then it will create an ES1.1 context using the ES1Renderer.

For my game I have simply removed the ES2Renderer all together and just use the ES1.1.

The code I have in EAGLView is below:

- (id) initWithCoder:(NSCoder*)coder
{
    if ((self = [super initWithCoder:coder]))
	{
        // Get the layer
        CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;

        eaglLayer.opaque = TRUE;
        eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
                                        [NSNumber numberWithBool:FALSE],
					kEAGLDrawablePropertyRetainedBacking,
                                        kEAGLColorFormatRGB565,
					kEAGLDrawablePropertyColorFormat,
                                        nil];

		// Set up an OpenGL ES 1.1 renderer
		renderer = [[ES1Renderer alloc] init];

		// If the renderer is empty then something wen wrong so release this instance
		// and return nothing
        if (!renderer)
        {
            [self release];
            return nil;
        }
    }
    return self;
}</pre>
<p>Hope it helps.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WonwooLee</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-11/#comment-2365</link>
		<dc:creator>WonwooLee</dc:creator>
		<pubDate>Mon, 04 Jan 2010 02:25:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2365</guid>
		<description>Nice tutorial !! 

Hey, could you share the video in mp4 format, something like pod casts ?

I really want to watch tutorial videos on my iPhone, while I&#039;m outside.</description>
		<content:encoded><![CDATA[<p>Nice tutorial !! </p>
<p>Hey, could you share the video in mp4 format, something like pod casts ?</p>
<p>I really want to watch tutorial videos on my iPhone, while I&#8217;m outside.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rgauss</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-11/#comment-2364</link>
		<dc:creator>rgauss</dc:creator>
		<pubDate>Mon, 04 Jan 2010 00:49:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2364</guid>
		<description>Hi mike,
Never mind. I played with the renderer classes more and finally am displaying the player.png. I look forward to the other tutorials.
One question is, I  modified the ES2 renderer class to initialize with context: kEAGLRenderingAPIOpenGLES1 rather than kEAGLRenderingAPIOpenGLES2. is that ok? or should i just modify the EAGLview to use ES1renderer instead of ES2renderer always? Sorry, my question might be trivial since my understanding of the rendering classes is limited at this point.</description>
		<content:encoded><![CDATA[<p>Hi mike,<br />
Never mind. I played with the renderer classes more and finally am displaying the player.png. I look forward to the other tutorials.<br />
One question is, I  modified the ES2 renderer class to initialize with context: kEAGLRenderingAPIOpenGLES1 rather than kEAGLRenderingAPIOpenGLES2. is that ok? or should i just modify the EAGLview to use ES1renderer instead of ES2renderer always? Sorry, my question might be trivial since my understanding of the rendering classes is limited at this point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rgauss</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-11/#comment-2361</link>
		<dc:creator>rgauss</dc:creator>
		<pubDate>Sun, 03 Jan 2010 17:37:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2361</guid>
		<description>I think the problem might be in the renderScene function. The tutorial renders the playerShip in the EAGLView.m but the new SDK has the ES2renderer that is supposed to render it. I am declaring the playerShip in the ES2renderer but I am not sure if it will get created in the current context. 
Should I post my code?</description>
		<content:encoded><![CDATA[<p>I think the problem might be in the renderScene function. The tutorial renders the playerShip in the EAGLView.m but the new SDK has the ES2renderer that is supposed to render it. I am declaring the playerShip in the ES2renderer but I am not sure if it will get created in the current context.<br />
Should I post my code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rgauss</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-11/#comment-2344</link>
		<dc:creator>rgauss</dc:creator>
		<pubDate>Sun, 03 Jan 2010 06:22:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2344</guid>
		<description>Hi mike,
Thank you for your excellent tutorial. I am trying to follow your tutorial using the new SDK and I had a question. The code exits unexpectedly to render the ship whenever I use the line:

[playerShip drawAtPoint:CGPointMake(160, 240)];

Trying to debug I went to the Texture 2d file provided and I saw that the code exits at this line:

glVertexPointer(3, GL_FLOAT, 0, vertices);

Could you provide any insight as to what I might be doing wrong?

Thank you
rgauss</description>
		<content:encoded><![CDATA[<p>Hi mike,<br />
Thank you for your excellent tutorial. I am trying to follow your tutorial using the new SDK and I had a question. The code exits unexpectedly to render the ship whenever I use the line:</p>
<p>[playerShip drawAtPoint:CGPointMake(160, 240)];</p>
<p>Trying to debug I went to the Texture 2d file provided and I saw that the code exits at this line:</p>
<p>glVertexPointer(3, GL_FLOAT, 0, vertices);</p>
<p>Could you provide any insight as to what I might be doing wrong?</p>
<p>Thank you<br />
rgauss</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isaac</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-11/#comment-2331</link>
		<dc:creator>Isaac</dc:creator>
		<pubDate>Thu, 31 Dec 2009 16:08:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2331</guid>
		<description>Mike,

Just to be clear, I&#039;m recommending that you skip computing the angle and just store sinStickAngle and cosStickAngle which can be computed using dy/distance and dx/distance.  This would eliminate *all* calls to atan2, cosf, and sinf, for the joystick.  Then in your game logic just use the stored sinStickAngle and cosStickAngle.  The joystick code does not need to call any trig functions.

But if you want to use trig, using atan2() as you do now is probably far less messy than computing the angle from distance and dy/dx because atan2 sorts out the correct angle quadrant for you.


Isaac</description>
		<content:encoded><![CDATA[<p>Mike,</p>
<p>Just to be clear, I&#8217;m recommending that you skip computing the angle and just store sinStickAngle and cosStickAngle which can be computed using dy/distance and dx/distance.  This would eliminate *all* calls to atan2, cosf, and sinf, for the joystick.  Then in your game logic just use the stored sinStickAngle and cosStickAngle.  The joystick code does not need to call any trig functions.</p>
<p>But if you want to use trig, using atan2() as you do now is probably far less messy than computing the angle from distance and dy/dx because atan2 sorts out the correct angle quadrant for you.</p>
<p>Isaac</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-11/#comment-2328</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Thu, 31 Dec 2009 09:16:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2328</guid>
		<description>Hi Isaac, you make a couple of excellent points.  I had not thought about using the distance and dx/dy to compute the angle.  I&#039;m going to give that a try.  Your also right on about exciting the loop after finding the hash.  Both of those are really great points.  I&#039;m glad your enjoying the tutorials and the feedback is really appreciated.

Scoobie, I&#039;m glad you sorted out your problem.  The way the default template works is that it will try to create an OpenGL ES 2.0 context first and if this works then it will use that.  If that fails it will try to create an ES 1.1 context.  This is how you can build in support to your app for the different ES versions.  On the Simulator it will allow you to create an ES 2.0 context and not drop into the 1.1 version.  It will also do the same if you were running the code on an iPhone 3Gs or 4G iPod touch :o)

I hope you enjoy the rest of the tutorials.

Mike</description>
		<content:encoded><![CDATA[<p>Hi Isaac, you make a couple of excellent points.  I had not thought about using the distance and dx/dy to compute the angle.  I&#8217;m going to give that a try.  Your also right on about exciting the loop after finding the hash.  Both of those are really great points.  I&#8217;m glad your enjoying the tutorials and the feedback is really appreciated.</p>
<p>Scoobie, I&#8217;m glad you sorted out your problem.  The way the default template works is that it will try to create an OpenGL ES 2.0 context first and if this works then it will use that.  If that fails it will try to create an ES 1.1 context.  This is how you can build in support to your app for the different ES versions.  On the Simulator it will allow you to create an ES 2.0 context and not drop into the 1.1 version.  It will also do the same if you were running the code on an iPhone 3Gs or 4G iPod touch :o)</p>
<p>I hope you enjoy the rest of the tutorials.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scoobie</title>
		<link>http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/comment-page-10/#comment-2327</link>
		<dc:creator>Scoobie</dc:creator>
		<pubDate>Thu, 31 Dec 2009 02:30:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=260#comment-2327</guid>
		<description>Hi Mike,

Please disregard my last question. I finally found out my mistake in that I left #import ES2Renderer, so it was still calling that and overriding ES1Renderer? This is where I&#039;m a little confused as I&#039;m guessing the ES2 import is overriding the ES1 import. Nonetheless, I deleted the ES2 header and method and also any where else ES2Renderer would be called or checked and found that the your Tutorial 1 instructions work perfectly. It just took some time where to put some other code and what not. 

I&#039;m really enjoying it all though and look forward to spending more time catching up with your other tutorials.</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>Please disregard my last question. I finally found out my mistake in that I left #import ES2Renderer, so it was still calling that and overriding ES1Renderer? This is where I&#8217;m a little confused as I&#8217;m guessing the ES2 import is overriding the ES1 import. Nonetheless, I deleted the ES2 header and method and also any where else ES2Renderer would be called or checked and found that the your Tutorial 1 instructions work perfectly. It just took some time where to put some other code and what not. </p>
<p>I&#8217;m really enjoying it all though and look forward to spending more time catching up with your other tutorials.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
