<?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: Video Update 2</title>
	<atom:link href="http://www.71squared.com/2009/06/video-update-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.71squared.com/2009/06/video-update-2/</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: A Person</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-7/#comment-1081</link>
		<dc:creator>A Person</dc:creator>
		<pubDate>Tue, 30 Jun 2009 21:53:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1081</guid>
		<description>I noticed mike your site was busy one day and I thought you uploaded tutorial10 to the videos directory.  Are you just making the blog post now?</description>
		<content:encoded><![CDATA[<p>I noticed mike your site was busy one day and I thought you uploaded tutorial10 to the videos directory.  Are you just making the blog post now?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MFerron</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-7/#comment-1080</link>
		<dc:creator>MFerron</dc:creator>
		<pubDate>Mon, 29 Jun 2009 15:09:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1080</guid>
		<description>Hey Mike,

After you posted this video update, I started to try to mimic your director/actor setup and see if I could get my own up and running before you posted tutorial 10.  

I&#039;m not sure I&#039;m going about it the right way, though.  Could you offer up a little detail on your implementation?  Unless of course you&#039;re releasing the next video soon.  Then I&#039;ll just reference that.

Thanks,

MFerron</description>
		<content:encoded><![CDATA[<p>Hey Mike,</p>
<p>After you posted this video update, I started to try to mimic your director/actor setup and see if I could get my own up and running before you posted tutorial 10.  </p>
<p>I&#8217;m not sure I&#8217;m going about it the right way, though.  Could you offer up a little detail on your implementation?  Unless of course you&#8217;re releasing the next video soon.  Then I&#8217;ll just reference that.</p>
<p>Thanks,</p>
<p>MFerron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Person</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-7/#comment-1075</link>
		<dc:creator>A Person</dc:creator>
		<pubDate>Mon, 29 Jun 2009 03:05:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1075</guid>
		<description>@mike i think a good idea for your tutorials would be too release the source with no examples of using the new features for example you played a sound in your last tutorial, if you don&#039;t include this in the source then we can use it as a template and won&#039;t have to worry about the changes (i do it this way and it is easy to start a new project with your engine and easy to add to it).

@anyone if you want to do this you can google making project templates in xcode (very simple to do)</description>
		<content:encoded><![CDATA[<p>@mike i think a good idea for your tutorials would be too release the source with no examples of using the new features for example you played a sound in your last tutorial, if you don&#8217;t include this in the source then we can use it as a template and won&#8217;t have to worry about the changes (i do it this way and it is easy to start a new project with your engine and easy to add to it).</p>
<p>@anyone if you want to do this you can google making project templates in xcode (very simple to do)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kp3406</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-7/#comment-1074</link>
		<dc:creator>kp3406</dc:creator>
		<pubDate>Sun, 28 Jun 2009 21:34:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1074</guid>
		<description>@mike - Thanks for letting me know - I was doing a bogus calculation for fps before! I am using the actual device (ipod touch first gen), the simulator actually runs slower for me, probably because the computer is bad. My actual framerate is 59-60 fps consistantly drawing what I said earlier.

For your renderManager, how are you going to handle drawing objects from different textures? Or are you just going to have all assets on one giant texture? I am not sure what the best way to do this is</description>
		<content:encoded><![CDATA[<p>@mike &#8211; Thanks for letting me know &#8211; I was doing a bogus calculation for fps before! I am using the actual device (ipod touch first gen), the simulator actually runs slower for me, probably because the computer is bad. My actual framerate is 59-60 fps consistantly drawing what I said earlier.</p>
<p>For your renderManager, how are you going to handle drawing objects from different textures? Or are you just going to have all assets on one giant texture? I am not sure what the best way to do this is</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Person</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-7/#comment-1072</link>
		<dc:creator>A Person</dc:creator>
		<pubDate>Sun, 28 Jun 2009 18:54:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1072</guid>
		<description>it seems my pre tags hid my code so i&#039;ll just re post it.

 found a some great little methods from cocos2d to rotate the device and the images. I decided to put them in the Singleton class and then add a sharedGameInstance to the app delegate so it can rotate your view from the begining. So this goes in the Singleton header file:
&lt;pre&gt;
#define LANDSCAPE_LEFT 0 // 1 is left 0 is right
// Landscape mode
	BOOL landscape;
- (void) applyLandscape;
- (void) setLandscape: (BOOL) on;
- (BOOL) landscape;
&lt;/pre&gt;
make sure you put that in the right spots

creating a shared game instance in the delegate is pretty straight forward.

so here is the code in the Singleton.m:
&lt;pre&gt;
- (BOOL) landscape
{
	return landscape;
}

- (void) setLandscape: (BOOL) on
{
	if( on != landscape ) {
		landscape = on;
		if( landscape )
#ifdef LANDSCAPE_LEFT
			[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeRight animated:NO];
#else
		[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeLeft animated:NO];
#endif
		else
			[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationPortrait animated:NO];
		
	}
	return;
}

-  (void) applyLandscape
{
	if( landscape ) {
		glTranslatef(160,240,0);
		
#ifdef LANDSCAPE_LEFT
		glRotatef(-90,0,0,1);
		glTranslatef(-240,-160,0);
#else		
		// rotate left
		glRotatef(90,0,0,1);
		glTranslatef(-240,-160,0);
#endif // LANDSCAPE_LEFT
	}	
}
&lt;/pre&gt;
And that will rotate your device while keeping the images the same.</description>
		<content:encoded><![CDATA[<p>it seems my pre tags hid my code so i&#8217;ll just re post it.</p>
<p> found a some great little methods from cocos2d to rotate the device and the images. I decided to put them in the Singleton class and then add a sharedGameInstance to the app delegate so it can rotate your view from the begining. So this goes in the Singleton header file:</p>
<pre>
#define LANDSCAPE_LEFT 0 // 1 is left 0 is right
// Landscape mode
	BOOL landscape;
- (void) applyLandscape;
- (void) setLandscape: (BOOL) on;
- (BOOL) landscape;
</pre>
<p>make sure you put that in the right spots</p>
<p>creating a shared game instance in the delegate is pretty straight forward.</p>
<p>so here is the code in the Singleton.m:</p>
<pre>
- (BOOL) landscape
{
	return landscape;
}

- (void) setLandscape: (BOOL) on
{
	if( on != landscape ) {
		landscape = on;
		if( landscape )
#ifdef LANDSCAPE_LEFT
			[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeRight animated:NO];
#else
		[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeLeft animated:NO];
#endif
		else
			[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationPortrait animated:NO];

	}
	return;
}

-  (void) applyLandscape
{
	if( landscape ) {
		glTranslatef(160,240,0);

#ifdef LANDSCAPE_LEFT
		glRotatef(-90,0,0,1);
		glTranslatef(-240,-160,0);
#else
		// rotate left
		glRotatef(90,0,0,1);
		glTranslatef(-240,-160,0);
#endif // LANDSCAPE_LEFT
	}
}
</pre>
<p>And that will rotate your device while keeping the images the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Person</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-7/#comment-1071</link>
		<dc:creator>A Person</dc:creator>
		<pubDate>Sun, 28 Jun 2009 18:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1071</guid>
		<description>I found a some great little methods from cocos2d to rotate the device and the images.  I decided to put them in the Singleton class and then add a sharedGameInstance to the app delegate so it can rotate your view from the begining. So this goes in the Singleton header file:


creating a shared game instance in the delegate is pretty straight forward.

so here is the code in the Singleton.m



And that will rotate your device while keeping the images the same.</description>
		<content:encoded><![CDATA[<p>I found a some great little methods from cocos2d to rotate the device and the images.  I decided to put them in the Singleton class and then add a sharedGameInstance to the app delegate so it can rotate your view from the begining. So this goes in the Singleton header file:</p>
<p>creating a shared game instance in the delegate is pretty straight forward.</p>
<p>so here is the code in the Singleton.m</p>
<p>And that will rotate your device while keeping the images the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-7/#comment-1069</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Sun, 28 Jun 2009 16:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1069</guid>
		<description>@A Person, in the project I&#039;m using for Tutorial 10 I&#039;ve placed a check on each NSLog, and only if you have set a debug flag will the NSLog entries be produced, so they are there is you need them for debug, but you can stop them showing really easily.

Mike</description>
		<content:encoded><![CDATA[<p>@A Person, in the project I&#8217;m using for Tutorial 10 I&#8217;ve placed a check on each NSLog, and only if you have set a debug flag will the NSLog entries be produced, so they are there is you need them for debug, but you can stop them showing really easily.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Person</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-7/#comment-1068</link>
		<dc:creator>A Person</dc:creator>
		<pubDate>Sun, 28 Jun 2009 16:33:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1068</guid>
		<description>@mike do you plan to leave the NSLogs in the code as I&#039;ve noticed they drop speed</description>
		<content:encoded><![CDATA[<p>@mike do you plan to leave the NSLogs in the code as I&#8217;ve noticed they drop speed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-7/#comment-1067</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Sun, 28 Jun 2009 08:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1067</guid>
		<description>@A Person.  Don&#039;t worry about asking questions.  That was the reason for doing the blog :o)

I&#039;m going to create a diagram which will hopefully explain what I&#039;m doing.  I think a picture will be easier than words, I hope :o)

I will also be releasing Tutorial 10 soon which will contain all my code for moving around the tilemap.  Hopefully that will help as well.

As soon as I have  my diagram done I&#039;ll post a comment.

@kp3406, thanks for the info on your frame rates etc.  You mentioned your getting 300-400fps.  Are you running on the Sim?  iPhone and iPod hardware has a max frame rate of 60fps which is why I ask.

I&#039;ve been running some experiments with Tom who comments on the blog and its been really interesting seeing what has an impact.  Calling glDraw___ too many times does up CPU usage a lot as all the API calls have overhead, so having all your geometry, texture and colour information in a single interleaved array seems to be the way to go.  This is what the Anglecodefont class and Particle emitter classes do.  I&#039;m working on a design at the moment to create a RenderManager which will be able to provide that ability for all drawing, including what is draw from within the Image class.

There have been some great posts on the blog on this subject and I&#039;m grateful to all those who have joined in.  Its given me many more ideas on how to approach that problem and I&#039;ll be posting info on the RenderManager once Tutorial 10 is done and I&#039;ve got it coded up.

Mike</description>
		<content:encoded><![CDATA[<p>@A Person.  Don&#8217;t worry about asking questions.  That was the reason for doing the blog :o)</p>
<p>I&#8217;m going to create a diagram which will hopefully explain what I&#8217;m doing.  I think a picture will be easier than words, I hope :o)</p>
<p>I will also be releasing Tutorial 10 soon which will contain all my code for moving around the tilemap.  Hopefully that will help as well.</p>
<p>As soon as I have  my diagram done I&#8217;ll post a comment.</p>
<p>@kp3406, thanks for the info on your frame rates etc.  You mentioned your getting 300-400fps.  Are you running on the Sim?  iPhone and iPod hardware has a max frame rate of 60fps which is why I ask.</p>
<p>I&#8217;ve been running some experiments with Tom who comments on the blog and its been really interesting seeing what has an impact.  Calling glDraw___ too many times does up CPU usage a lot as all the API calls have overhead, so having all your geometry, texture and colour information in a single interleaved array seems to be the way to go.  This is what the Anglecodefont class and Particle emitter classes do.  I&#8217;m working on a design at the moment to create a RenderManager which will be able to provide that ability for all drawing, including what is draw from within the Image class.</p>
<p>There have been some great posts on the blog on this subject and I&#8217;m grateful to all those who have joined in.  Its given me many more ideas on how to approach that problem and I&#8217;ll be posting info on the RenderManager once Tutorial 10 is done and I&#8217;ve got it coded up.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kp3406</title>
		<link>http://www.71squared.com/2009/06/video-update-2/comment-page-6/#comment-1066</link>
		<dc:creator>kp3406</dc:creator>
		<pubDate>Sun, 28 Jun 2009 07:33:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=590#comment-1066</guid>
		<description>@mike - I&#039;m not exactly sure what you count as number of triangles per frame, but I am getting very good fps drawing about 3300 images, about 3000 of which are point sprite particle effects. So I think that translates to about 4200 triangles being rendered each frame? I am counting 1 triangle per point sprite and 4 per texture being rendered. With only about 500-1000 triangles per frame I am getting around 300-400fps except when handling touches on the screen, which seems to slow the framerate to 45-55 for a split second (not even noticable though).

I know that using any NSLog statements in your update/render loop will cause a VERY significant slowdown, and quickly reduce your framerate to a halt. Also, I havent yet experimented with how many draw__ calls you can have before causing a slowdown, but I have 7 now in my render loop and it seems to be fine. Numbers I&#039;ve seen thrown around on the internet are draw__ calls in the late tens to twenties can start to cause slowdown, don&#039;t know if this is accurate though.</description>
		<content:encoded><![CDATA[<p>@mike &#8211; I&#8217;m not exactly sure what you count as number of triangles per frame, but I am getting very good fps drawing about 3300 images, about 3000 of which are point sprite particle effects. So I think that translates to about 4200 triangles being rendered each frame? I am counting 1 triangle per point sprite and 4 per texture being rendered. With only about 500-1000 triangles per frame I am getting around 300-400fps except when handling touches on the screen, which seems to slow the framerate to 45-55 for a split second (not even noticable though).</p>
<p>I know that using any NSLog statements in your update/render loop will cause a VERY significant slowdown, and quickly reduce your framerate to a halt. Also, I havent yet experimented with how many draw__ calls you can have before causing a slowdown, but I have 7 now in my render loop and it seems to be fine. Numbers I&#8217;ve seen thrown around on the internet are draw__ calls in the late tens to twenties can start to cause slowdown, don&#8217;t know if this is accurate though.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
