<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mobile Perspectives &#187; Resources</title>
	<atom:link href="http://www.BluMtnWerx.com/blog/topics/resources/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.BluMtnWerx.com/blog</link>
	<description>Computing at the Edge!</description>
	<lastBuildDate>Tue, 27 Jul 2010 23:43:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Upgrades from Lite Version are #1 Driver of iPhone App Purchases</title>
		<link>http://www.BluMtnWerx.com/blog/2009/08/upgrades-from-lite-version-are-1-driver-of-iphone-app-purchases/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/08/upgrades-from-lite-version-are-1-driver-of-iphone-app-purchases/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 22:39:30 +0000</pubDate>
		<dc:creator>deans</dc:creator>
				<category><![CDATA[App Marketing]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[AdMob]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone App Marketing]]></category>
		<category><![CDATA[iPod touch]]></category>
		<category><![CDATA[Mobile Metrics]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=284</guid>
		<description><![CDATA[The July metrics report from AdMob includes some really interesting bits.&#160;  Even if you don't completely trust their methodology, you should at least take a look at their results.]]></description>
			<content:encoded><![CDATA[<p>In the brave new world of app marketing, we have very little real data regarding how people actually make buying decisions.&nbsp;  Of course, we all have theories and intuition, but it&#8217;s still mostly a black art.&nbsp;  While I&#8217;m not saying that they&#8217;ve completely illuminated the landscape, <a href="http://www.admob.com/" title="AdMob: The Mobile Advertising Platform Home" target="_blank">AdMob</a>&#8217;s recent <a href="http://metrics.admob.com/2009/08/july-2009-metrics-report/" title="AdMob:  July 2009 Metrics Report" target="_blank">July Metrics report</a> at least gives us some information.&nbsp;  The report can be downloaded <a href="http://metrics.admob.com/wp-content/uploads/2009/08/AdMob-Mobile-Metrics-July-09.pdf" title="AdMob:  July 2009 Metrics Report Download (PDF)">here</a> (PDF).&nbsp;  The unsummarized data is also <a href="http://metrics.admob.com/wp-content/uploads/2009/08/AdMob-Mobile-Metrics-July-09-Survey-Supplement.pdf" title="AdMob:  July 2009 Metrics: iPhone and Android app discovery and usage (PDF)">available</a> (PDF).&nbsp;  I recognize that some in the community don&#8217;t appreciate AdMob&#8217;s methodology, but it&#8217;s hard to resist a tasty morsel when we&#8217;re so starved for insight.</p>
<p>AdMob chose to highlight the following results:</p>
<blockquote><ul>
<li>Android and iPhone users download approximately 10 new apps a month, while iPod touch owners download an average of 18 per month</li>
<li>More than 90 percent of Android and iPhone OS users browse and search for apps directly on their mobile device instead of their computer</li>
<li>Upgrading from the lite version was the top reason given when users were asked what drives them to purchase a paid app</li>
<li>iPhone and iPod touch users are twice as likely to purchase paid apps than Android users</li>
<li>Users who regularly download paid apps spend approximately $9 on an average of five paid downloads per month</li>
</ul>
</blockquote>
<p>As the proud user of an iPod touch, I was thrilled to see that my fellow touch users are, by far, the most prolific downloaders:<br />
<a href="http://metrics.admob.com/2009/08/july-2009-metrics-report/" title="AdMob: Avg Downloads per User per Month"><img style="vertical-align:middle; float: center; margin: 2.0em; width: 445px;" src="http://metrics.admob.com/wp-content/uploads/2009/08/Metrics-Downloads1.jpg" title="AdMob: Avg Downloads per User per Month" alt="AdMob: Chart of Avg Downloads per User per Month"/></a><br />
There are a couple of interesting things about this chart.&nbsp;  First, it should probably be titled, &#8220;Avg. Downloads <strong>per User</strong> per Month,&#8221; but that&#8217;s nitpicking.&nbsp;  The other thing that caught my attention is that, while iPod touch users are nearly twice as productive (or perhaps counter-productive, depending on whether you&#8217;re their employer) as iPhone users in terms of downloading apps, they are much less likely to pay for their apps.&nbsp;  Nearly 25% of the iPhone apps are paid, while just over 10% of the apps on touches are paid.&nbsp;  This is another reminder that the user communities are not at all homogeneous across the two devices.</p>
<p>For this post, I&#8217;m going to focus on the iPhone / iPod touch.&nbsp;  Although the report also covers Android, at this point, I&#8217;m more interested in the results for our target platforms.</p>
<p>In going through the report, I noticed a couple of other bits that are likely to influence how I conduct campaigns for BluMtnWerx.&nbsp;  For example, the top three ways that users discover apps are, in order:</p>
<blockquote><ul>
<li>Browsing through top App Store rankings</li>
<li>Searching for a specific type of app</li>
<li>Word of mouth (recommendations from friends or colleagues)</li>
</ul>
</blockquote>
<p>They also asked people who downloaded at least one paid app / month, &#8220;What Usually drives you to purchase a paid app?&#8221;&nbsp;  I guess that I shouldn&#8217;t be surprised, given some of the experiments that developers have conducted, but the top reason was (emphasis mine):</p>
<blockquote><p>&#8220;<strong><em>I like the free version and upgraded</em></strong>&#8220;</p></blockquote>
<p>I sure wish that Apple would approve iPuckLite!&nbsp;  It&#8217;s been waiting for nearly a month, now.</p>
<p>By contrast, the bottom two were:</p>
<blockquote><ul>
<li>News articles or blogs</li>
<li>A brand I know reaches out to me and introduces an app</li>
</ul>
</blockquote>
<p>Clearly, this reinforces the notion that getting high rankings in the App Store is the ticket to success.&nbsp;  It might also suggest that the effort put into blogging &amp; self-promotion may have less impact (so why am I writing this?).&nbsp;  When I think about the results, though, I wonder whether the grassroots blogging and outreach are actually necessary prerequisites for getting good rankings on the App Store.</p>
<p>One place where the sample bias in AdMob&#8217;s methodology really comes through is the #4 item on their list:</p>
<blockquote><p>&#8220;Seeing ads while using other apps&#8221;</p></blockquote>
<p>The report contains some extremely interesting data on daily usage of apps.&nbsp;  Apparently iPhone users spend, on (weighted) average 84 minutes/day using apps, while iPod touch addicts are tapping away for 121 minutes/day.&nbsp;  The most fascinating thing in that data set, though, was the report that 21% of iPod touch users spend <strong><em>More Than Four Hours</em></strong> each day stabbing at their screens!&nbsp;  I don&#8217;t know whether to feel happy, or sad, if that&#8217;s true.</p>
<p>Finally, AdMob did some back of the envelope calculations to conclude that the App store paid market is currently (August 2009) about $200M per month.&nbsp;  Stunning.</p>
<p>Even if you don&#8217;t like AdMob, you really should spend a few minutes evaluating the information in this report and considering how it might impact your business.</p>
<p>&nbsp;  </p>
<hr .../>
Technorati Tags:&nbsp; <a href="http://technorati.com/tag/iPhone" rel="tag">iPhone</a>, <a href="http://technorati.com/tag/iPod+Touch" rel="tag">iPod Touch</a>, <a href="http://technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://technorati.com/tag/AdMob" rel="tag">AdMob</a>, <a href="http://technorati.com/tag/Mobile+Metrics" rel="tag">Mobile Metrics</a>, <a href="http://technorati.com/tag/mobile" rel="tag">mobile</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/08/upgrades-from-lite-version-are-1-driver-of-iphone-app-purchases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blogs That I Follow</title>
		<link>http://www.BluMtnWerx.com/blog/2009/08/blogs-that-i-follow/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/08/blogs-that-i-follow/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 02:39:09 +0000</pubDate>
		<dc:creator>deans</dc:creator>
				<category><![CDATA[Random Thoughts]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Blogroll]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=280</guid>
		<description><![CDATA[A new iPhone app developer recently asked me which blogs I follow to try to keep up with the "industry."&#160;  Here's the list, along with some comments on why I stick with these.]]></description>
			<content:encoded><![CDATA[<p>During a conversation about getting started with iPhone development, a new entrant asked me which blogs I follow.&nbsp;  Unfortunately, my aged mind couldn&#8217;t list them from memory, so I promised to get back to her when I was sitting in front of my feed reader.&nbsp;  As we&#8217;re often talking with developers that are relatively new to the platform, it occurred to me that it might be useful to share the list, so I&#8217;ll post it here.&nbsp;  In general, I place a very high value on useful technical content and good writing.&nbsp;  I&#8217;m slightly embarrassed to admit that I also like gossip about the platform(s).</p>
<p>The list below is ordered by my priority for reading.&nbsp;  If I have just a tiny bit of time, I read the ones at the top of the list.&nbsp;  If I have more time, I go further down through the list.</p>
<ul>
<li><strong><a href="http://iphonedevelopment.blogspot.com/" title="iPhone Development: Application Development for the iPhone using Apple's official SDK.">iPhone Development</a></strong> &mdash; <em>Jeff LaMarche</em> &mdash; I&#8217;m a huge fan of &#8220;<a href="http://www.amazon.com/Beginning-iPhone-Development-Exploring-SDK/dp/1430224592/" title="Amazon URL for Beginning iPhone Development"><em>Beginning iPhone 3 Development:&nbsp;  Exploring the iPhone SDK</em></a>,&#8221; the book that Mr. LaMarche wrote with Mr. Mark (see below).&nbsp;  This blog is always extremely well written, regularly offers great development tips and often alerts me to other information sources.&nbsp;  I read a larger portion of Mr. LaMarche&#8217;s posts than I do on any of the other blogs.&nbsp;  This is a must follow.</li>
<li><strong><a href="http://www.drobnik.com/touch/" title="Dr. Touch: Bitching and Stiching [sic] iPhone Apps (almost) since 1974">Dr. Touch</a></strong> &mdash; <em>Oliver Drobnik</em> &mdash; Another blog that often features great development tips.&nbsp;  Mr. Drobnik is also quite funny.&nbsp;  His description of the time that he <a href="http://www.drobnik.com/touch/2009/06/big-outch-macbook-falls-from-hammock/" title="Dr. Touch:  BIG OUTCH – MacBook Falls From Hammock ">dropped his MacBook</a> is classic.</li>
<li><strong><a href="http://www.mikeash.com/?page=pyblog/" title="NSBlog">NSBlog</a></strong> &mdash; <em>Mike Ash</em> &mdash; This is one of the best technical blogs on the list.&nbsp;  The only reason that it&#8217;s not higher, in this context, is that the blog is more broadly focused on the whole realm of Mac development, so the content isn&#8217;t always applicable to the iPhone SDK.&nbsp;  However, I learn something from almost every post and, likewise, consider this a must read blog.</li>
<li><strong><a href="http://www.mlsite.net/blog/" title="Things that were not immediately obvious to me: Making mistakes so you don’t have to">Things that were not immediately obvious to me</a></strong> &mdash; I&#8217;ve actually implemented several of the tips on this blog in BluMtnWerx code.&nbsp;  This is one of the most useful blogs in terms of immediately applicable content and is also a must read.&nbsp;  The author does cover a wide range of topics, so I often find myself skipping posts that aren&#8217;t relevant to my interests.</li>
<li><strong><a href="http://wilshipley.com/blog/" title="Call Me Fishmeal">Call Me Fishmeal</a></strong> &mdash; <em>Wil Shipley</em> &mdash; Mr. Shipley&#8217;s &#8220;<a href="http://wilshipley.com/blog/labels/code.html" title="Call Me Fishmeal:  code category">Pimp My Code</a>&#8221; series is among the most informative and directly useful bit of writing that I&#8217;ve come across in the blogosphere.&nbsp;  I highly recommend it.</li>
<li><strong><a href="http://theappleblog.com/" title="theAppleBlog">theAppleBlog</a></strong> &mdash; In my experience, this is the king of the &#8220;reasonably credible&#8221; Apple gossip blogs.&nbsp;  While the contributors are undoubtedly Apple fans, they are willing to be critical on occasion.&nbsp;  Since Apple&#8217;s rumblings are so important to my livelihood, I pay attention to what these folks say is on the horizon, as well as to their analysis of the current landscape.</li>
<li><strong><a href="http://www.boygeniusreport.com/" title="The Boy Genius Report">The Boy Genius Report</a></strong> &mdash; This blog can&#8217;t be beat for timely gossip about upcoming products and adventures with the carriers.</li>
<li><strong><a href="http://www.appleinsider.com/blogs/" title="Apple Insider Blogs">Apple Insider Blogs</a></strong> &mdash; A great source of gossip regarding happenings in the Apple ecosystem.</li>
<li><strong><a href="http://daringfireball.net/" title="Daring Fireball">Daring Fireball</a></strong> &mdash; <em>John Gruber</em> &mdash; Mr. Gruber is most famous, in my book, for his posts on App Store injustice, <a href="http://daringfireball.net/2009/07/google_voice" title="Daring Fireball: Apple Rejects Google Voice Apps From App Store">here</a> and <a href="http://daringfireball.net/2009/08/ninjawords" title="Daring Fireball: Ninjawords: iPhone Dictionary, Censored by Apple ">here</a>.&nbsp;  He is also one of the authors who elicited a <a href="http://daringfireball.net/2009/08/phil_schiller_app_store" title="Daring Fireball: Phil Schiller Responds Regarding Ninjawords and the App Store ">response from Apple&#8217;s Phil Schiller</a>.&nbsp;  The blog is extremely well written and often provides an interesting perspective on the industry.</li>
<li><strong><a href="http://toucharcade.com/" title="touchArcade: Keeping you in touch with the latest in iPhone gaming">touchArcade</a></strong> &mdash; This is a good source for reviews of the latest additions to the app store.&nbsp;  I have to confess that I&#8217;ve bought apps after seeing them reviewed in touchArcade.&nbsp;  Also, the <a href="http://forums.toucharcade.com/" title="touchArcade forums">touchArcade forums</a> are, by far, the most productive places to post new app announcements.</li>
<li><strong><a href="http://www.davemark.com/" title="Dave Mark: The Moose was furious">Dave Mark&#8217;s Blog</a></strong> &mdash; <em>Dave Mark</em> &mdash; Mr. Mark is the other author of &#8220;<a href="http://www.amazon.com/Beginning-iPhone-Development-Exploring-SDK/dp/1430224592/" title="Amazon URL for Beginning iPhone Development"><em>Beginning iPhone 3 Development:&nbsp;  Exploring the iPhone SDK</em></a>.&#8221;&nbsp;  The blog is very entertaining and covers a broad range of topics, some of which are quite relevant to this discussion.</li>
<li><strong><a href="http://148apps.biz/" title="148Apps.biz">148Apps.biz</a></strong> &mdash; This blog doesn&#8217;t get updated very often, but I refer back to their <a href="http://148apps.biz/app-store-metrics/" title="148Apps.biz: App Store Metrics">App Store Metrics</a> page several times each week, especially when I&#8217;m writing anything about the App Store, or wondering about the current app approval times.</li>
<li><strong><a href="http://furbo.org/" title="furbo.org">furbo.org</a></strong> &mdash; <em>Craig Hockenberry</em> &mdash; Mr. Hockenberry writes great posts, including the iconic &#8220;<a href="http://furbo.org/2009/07/10/year-two/" title="furbo.org: Year two">Year two</a>&#8221; vivisection of the App Store.&nbsp;  He has a real &#8220;insider&#8217;s&#8221; perspective that I find to be extremely valuable.&nbsp;  I just wish that he would post more often.</li>
<li><strong><a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/" title="iPhone Dev SDK Forum - iPhone SDK Development">iPhone Dev SDK Forum:&nbsp;  iPhone SDK Development RSS feed</a></strong> &mdash; I realize that this isn&#8217;t a blog, but <em>Chris Stewart</em> has enabled an RSS feed for the &#8220;iPhoneDevSDK &#8211; iPhone SDK Development forum.&#8221;&nbsp;  I follow this one for a couple of reasons.&nbsp;  First, a few times each week, I learn something from the answers.&nbsp;  Second, I like to answer questions posed on this forum, and this is a good way to see what&#8217;s been asked recently.&nbsp;  BTW, the URL for the feed is:&nbsp;  http://feeds2.feedburner.com/iPhoneDevSDK-iPhoneSDKDevelopment.</li>
</ul>
<p>&nbsp;  </p>
<p>If you have suggestions for others that I should be following, please let me know!  I&#8217;m always interested in additional excuses to procrastinate.</p>
<p>&nbsp;  </p>
<hr .../>
Technorati Tags:&nbsp; <a href="http://technorati.com/tag/iPhone" rel="tag">iPhone</a>, <a href="http://technorati.com/tag/iPod+Touch" rel="tag">iPod Touch</a>, <a href="http://technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://technorati.com/tag/mobile" rel="tag">mobile</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/08/blogs-that-i-follow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Sprites:&#160;  SketchUp vs. Blender</title>
		<link>http://www.BluMtnWerx.com/blog/2009/08/creating-sprites-sketchup-vs-blender/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/08/creating-sprites-sketchup-vs-blender/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 00:53:57 +0000</pubDate>
		<dc:creator>deans</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[SketchUp]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=272</guid>
		<description><![CDATA[I don't question Blender's dominance for creating 3D models, but SketchUp might be good enough for creating 3D scenes that can be rendered to 2D images.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.blumtnwerx.com/iPunt.html" title="iPunt Rendering of Attack Helicopter, from a Blender Model"><img style="vertical-align:middle; float: right; margin: 2.2em; width: 280px;" src="http://www.blumtnwerx.com/images/iPuntScreen1.png" title="iPunt Rendering of Attack Helicopter, from a Blender Model" alt="iPunt Attack Helicopter image"/></a>Given the ongoing popularity of <a href="http://www.blumtnwerx.com/BMWTeam.html#Paul" title="Paul Stoaks, BluMtnWerx">Paul</a>&#8217;s posts on Blender (<em><a href="http://www.blumtnwerx.com/blog/2009/03/blender-to-pod-for-oolong/" title="Mobile Perspectives:  Blender to POD for Oolong">here</a> and <a href="http://www.blumtnwerx.com/blog/2009/06/opengl-es-texture-mapping-for-iphone-oolong-powervr/" title="Mobile Perspectives:  OpenGL-ES Texture Mapping for iPhone / Oolong / PowerVR">here</a></em>), it seems clear that <a href="http://www.blender.org/" title="Blender website" target="_blank">Blender</a> is the &#8220;big dog&#8221; of 3D model creation.&nbsp;  Skilled virtuosos can certainly create <a href="http://www.blender.org/features-gallery/gallery/art-gallery/" title="Blender Art Gallery" target="_blank">beautiful images</a>, as well as models that provide the visual foundation for app development.&nbsp;  I&#8217;m sure that Blender artists are worth their weight in gold.&nbsp;  But what about the rest of us?&nbsp;  To say that Blender&#8217;s learning curve is &#8220;steep&#8221; is the understatement of the decade.&nbsp;  Paul, who is much smarter than me, was willing to make the investment in learning the tool, and he&#8217;s created some fabulous 3D models, and images, for our apps.</p>
<p>Both of these images show iPunt&#8217;s renderings  of models that were originally created in Blender.&nbsp;  Not to give Paul too many strokes, but they are really good, and they clearly show what can be done with the tool.&nbsp;  In the spirit of full disclosure, I had to ask Paul to create the graphics for <a href="http://www.blumtnwerx.com/iPuck.html" title="iPuck page">iPuck</a>. </p>
<p>I sincerely tried to learn Blender, but<a href="http://www.blumtnwerx.com/iPunt.html" title="iPunt Rendering of Hot Air Balloon, from a Blender Model"><img style="vertical-align:middle; float: left; margin: 2.2em; width: 280px;" src="http://www.blumtnwerx.com/images/iPuntScreen2.png" title="iPunt Rendering of Hot Air Balloon from a Blender Model" alt="iPunt Hot Air Balloon image"/></a> I quickly began to fear that I was going to devote more time to just getting the basics down than I was going to allocate to writing the code for my next app.&nbsp;  This unhappy situation got me to wondering whether there might be some other solution that was good enough for code monkeys like me.&nbsp;  After all, I just needed a handful of 2D renderings from 3D models.&nbsp;  Since we&#8217;re not yet an App Store success story, cost is a big issue, and &#8220;free&#8221; is pretty much the only acceptable price.</p>
<p>With these requirements in mind, I decided to take another look at Google&#8217;s <a href="http://sketchup.google.com/" title="SketchUp webpage" target="_blank">SketchUp</a>.&nbsp;  If you need to build 3D models that can be exported so that your app can manipulate and view them from all angles (as does <a href="http://www.blumtnwerx.com/iPunt.html" title="iPunt page">iPunt</a>), the free version of SketchUp won&#8217;t work for you.&nbsp;  Instead, you will need to fork over US$495. to Google for the &#8220;<a href="http://sketchup.google.com/product/whygopro.html" title="Google SketchUP / SketchUp Pro Comparison">Pro</a>&#8221; version.&nbsp;  SketchUp Pro includes 3D model import &amp; export, more collaboration support and other high end features.&nbsp;  On the other hand, if you just need 2D renderings from 3D images (like iPuck), SketchUp may very well be the ticket.</p>
<p>Boiled down, unless you&#8217;re a renaissance man, like Paul, here are some of the reasons to consider giving SketchUp a shot:  <em>(The next two images were rendered from SketchUp models)</em></p>
<ul>
<li>It&#8217;s free (well, not the &#8220;Pro&#8221; version).</li>
<li>It has native apps, with intuitive UI&#8217;s, on both Win and Mac.&nbsp;  I<img style="vertical-align:middle; float: right; margin: 1.2em; width: 120px;" src="http://www.blumtnwerx.com/blog/wp-content/sketchupsprite.png" title="Sprite for New App" alt="Sprite Image for New App"/> use SketchUp regularly on both platforms.</li>
<li>Learning the basics is truly a snap.&nbsp;  There are excellent video tutorials, comprehensive web-based documentation, and you can always use Google to search for answers.&nbsp;  I was able to start working with a sphere in just a few minutes and to create a passable rendering almost immediately.&nbsp;  The same could not be said for my efforts with Blender.</li>
<li>Even a code monkey with my pathologically limited art skills, was able to create &#8220;good enough&#8221; images with just a few tens of minutes in SketchUp.</li>
</ul>
<p>I&#8217;ll keep struggling to learn Blender, but, in the meantime, SketchUp seems to be &#8220;good enough.&#8221;<img style="vertical-align:middle; float: center; margin: 2.0em; width: 500px;" src="http://www.blumtnwerx.com/blog/wp-content/sketchupappicon.png" title="Image for New App" alt="New App image"/></p>
<p>&nbsp;  </p>
<hr .../>
Technorati Tags:&nbsp; <a href="http://technorati.com/tag/iPhone" rel="tag">iPhone</a>, <a href="http://technorati.com/tag/iPod+Touch" rel="tag">iPod Touch</a>, <a href="http://technorati.com/tag/SketchUp" rel="tag">SketchUp</a>, <a href="http://technorati.com/tag/Blender" rel="tag">Blender</a>, <a href="http://technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://technorati.com/tag/iPuck" rel="tag">iPuck</a>, <a href="http://technorati.com/tag/iPunt" rel="tag">iPunt</a>, <a href="http://technorati.com/tag/mobile" rel="tag">mobile</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/08/creating-sprites-sketchup-vs-blender/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What Fonts are on my iPhone?</title>
		<link>http://www.BluMtnWerx.com/blog/2009/08/what-fonts-are-on-my-iphone/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/08/what-fonts-are-on-my-iphone/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 07:38:43 +0000</pubDate>
		<dc:creator>deans</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[iPhone SDK]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=258</guid>
		<description><![CDATA[This is really easy to answer, but I keep seeing the question on various forums.&#160;  I've needed to refer to the list several times recently for some UI work, and I got tired of searching for the list every time that I needed it, so...]]></description>
			<content:encoded><![CDATA[<p>The iPhone / iPod touch have a reasonable list of available fonts.&nbsp;  Of course, the selection is limited when compared to a desktop OS, but you should be able to find something suitable for most purposes.&nbsp;  One issue that seems to be a challenge for some developers is the fact that you need the specific font names to use with calls like:</p>
<hr SIZE=5/>
<pre>

<span STYLE="font-family:Courier;"> [myLbl setFont:[UIFont fontWithName:@"Helvetica-BoldOblique" size:20]];</span></pre>
<p align="center"><em>and</em></p>
<p><span STYLE="font-family:Courier;">UIFont *font = [UIFont fontWithName:@"Zapfino" size:titleSz];</span></p>
<hr SIZE=5/>
&nbsp;<br />
The complete list of font names can be easily generated with the following code snippet:</p>
<hr SIZE=5/>
<pre>

<span STYLE="font-family:Courier;">   NSArray *names = [UIFont familyNames];
   NSArray *fontFaces;
   NSLog(@"FONT NAMES");
   for (NSString *name in names)
   {
      NSLog(@"Font Family:  %@",name);
      fontFaces = [UIFont fontNamesForFamilyName:name];
      for (NSString *fname in fontFaces)
      {
         NSLog(@"              %@",fname);
      }
   }

</span></pre>
<hr SIZE=5/>
&nbsp;<br />
That&#8217;s pretty much all that there is to it.&nbsp;  I always worry about maintaining a static list &mdash; What if Apple adds new fonts in 3.x?&nbsp;  With that caveat, here&#8217;s what we get from an iPod touch, running the 2.2.1 version of the software <em>(I removed all of the NSLog information)</em>:</p>
<hr SIZE=10/>
<pre>

<span STYLE="font-family:Courier;">FONT NAMES
  Font Family:  Courier
                Courier
                Courier-BoldOblique
                Courier-Oblique
                Courier-Bold
  Font Family:  AppleGothic
                AppleGothic
  Font Family:  Arial
                ArialMT
                Arial-BoldMT
                Arial-BoldItalicMT
                Arial-ItalicMT
  Font Family:  STHeiti TC
                STHeitiTC-Light
                STHeitiTC-Medium
  Font Family:  Hiragino Kaku Gothic ProN
                HiraKakuProN-W6
                HiraKakuProN-W3
  Font Family:  Courier New
                CourierNewPS-BoldMT
                CourierNewPS-ItalicMT
                CourierNewPS-BoldItalicMT
                CourierNewPSMT
  Font Family:  Zapfino
                Zapfino
  Font Family:  Arial Unicode MS
                ArialUnicodeMS
  Font Family:  STHeiti SC
                STHeitiSC-Medium
                STHeitiSC-Light
  Font Family:  American Typewriter
                AmericanTypewriter
                AmericanTypewriter-Bold
  Font Family:  Helvetica
                Helvetica-Oblique
                Helvetica-BoldOblique
                Helvetica
                Helvetica-Bold
  Font Family:  Marker Felt
                MarkerFelt-Thin
  Font Family:  Helvetica Neue
                HelveticaNeue
                HelveticaNeue-Bold
  Font Family:  DB LCD Temp
                DBLCDTempBlack
  Font Family:  Verdana
                Verdana-Bold
                Verdana-BoldItalic
                Verdana
                Verdana-Italic
  Font Family:  Times New Roman
                TimesNewRomanPSMT
                TimesNewRomanPS-BoldMT
                TimesNewRomanPS-BoldItalicMT
                TimesNewRomanPS-ItalicMT
  Font Family:  Georgia
                Georgia-Bold
                Georgia
                Georgia-BoldItalic
                Georgia-Italic
  Font Family:  STHeiti J
                STHeitiJ-Medium
                STHeitiJ-Light
  Font Family:  Arial Rounded MT Bold
                ArialRoundedMTBold
  Font Family:  Trebuchet MS
                TrebuchetMS-Italic
                TrebuchetMS
                Trebuchet-BoldItalic
                TrebuchetMS-Bold
  Font Family:  STHeiti K
                STHeitiK-Medium
                STHeitiK-Light</span>
  </pre>
<hr SIZE=10/>
&nbsp;  </p>
<p><strong>Happy Fonting!</strong></p>
<p>&nbsp;  </p>
<hr .../>
Technorati Tags:&nbsp; <a href="http://technorati.com/tag/iPhone" rel="tag">iPhone</a>, <a href="http://technorati.com/tag/iPod+Touch" rel="tag">iPod Touch</a>, <a href="http://technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://technorati.com/tag/fonts" rel="tag">fonts</a>, <a href="http://technorati.com/tag/mobile" rel="tag">mobile</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/08/what-fonts-are-on-my-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Look Ma, No Stencil Buffer</title>
		<link>http://www.BluMtnWerx.com/blog/2009/07/look-ma-no-stencil-buffer/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/07/look-ma-no-stencil-buffer/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 01:10:26 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[coding example]]></category>
		<category><![CDATA[depth culling]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Oolong]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[stencil buffer]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=235</guid>
		<description><![CDATA[Shows an example of using OpenGL depth culling and transparency to achieve a stencil effect in the absence of a stencil buffer on the iPhone.]]></description>
			<content:encoded><![CDATA[<p>OK, show of hands, who else was surprised to discover that there is no stencil buffer on the iPhone, even though it&#8217;s supported by OpenGL-ES 1.1?  Well, I was, but I&#8217;m a noob.  I&#8217;m also a bit of a hacker, so when I need something, I just go schlepping around the Internet until I find a way to do it.  When I needed a stencil-type behavior for <a title="iPunt iPhone game web page." href="http://www.blumtnwerx.com/iPunt.html" target="_blank" title="iPunt iPhone game web page.">iPunt</a> , I went googling and discovered this wonderful thing called a &quot;stencil buffer&quot;, and tried to use it.  Only it didn&#8217;t work.  I did some more homework and discovered that the iPhone doesn&#8217;t have a stencil buffer.  That left me scatching my head until I saw a brief comment somewhere that suggested that many applications for a stencil could be accomplished by depth culling and transparency.  Ah-Ha, I exclaimed, and came up with the following.  Pehaps this will help some other noob out there, or maybe some expert will show me a better way.</p>
<p>Here&#8217;s the effect I was trying to achieve:</p>
<p><img src="http://www.BluMtnWerx.com/blog/wp-content/finished.png" alt="Desired effect of playbox with mirrored floor suspended in mid-air." /></p>
<p>What we have here is the iPunt playing box suspended in mid-air.  The floor is a broken mirror (although that&#8217;s a little hard to see from this angle.)  The camera is allowed to move freely around the inside of the skybox.  When the camera is below the foor, the floor appears transparent (like broken glass.)  The walls of the playbox are fractured glass.</p>
<p>The problem, really, is the reflection.  Without any stenciling, you get this&#8230;</p>
<p><img src="http://www.BluMtnWerx.com/blog/wp-content/woutstencil.png" alt="The problem.  Scene drawn as a reflection is visible from some angles." /></p>
<p>We somehow need to prevent the reflected scene that is not viewed through the mirrored floor from showing.  A stencil buffer would have worked well for this purpose.  Without a stencil buffer, you have to rely on depth culling and transparency to achieve the desired result.</p>
<p>In brief, what I did was to create a stencil shape (a planar shape made up of triangles) that had a hole in the middle where the mirrored floor was going to be and was large enough to obscure the reflected scene from all camera angles above the plane of the floor.  This shape will be drawn transparent (alpha = 0) so that the skybox will show through, but the draw order and the depth culling will prevent the unwanted portions of the reflected scene from showing through.</p>
<p>Here&#8217;s a picture of the skybox, reflection, and stencil (with the alpha turned up so that it can be seen.)</p>
<p><img src="http://www.BluMtnWerx.com/blog/wp-content/stencil.png" alt="Skybox, reflection, and stencil." /></p>
<p>Because the draw order is skybox, then stencil, then reflected scene, those portions of the reflected scene that are occluded by the stencil are depth-culled and won&#8217;t be drawn.  The real scene and floor can then be drawn.</p>
<p>Here is the code, with comments, that does this&#8230;</p>
<p>First, the definition of the stencil and floor triangles.</p>
<pre>// The shape here is a large plane
// with a hole in it where the mirror will be.
const GLfloat stencilVerts[] = {
-100.0, -15.0, 100.0,
-10.0, -15.0, 10.0,
100.0, -15.0, 100.0,
10.0, -15.0, 10.0,
100.0, -15.0, -100.0,
10.0, -15.0, -10.0,
-100.0, -15.0, -100.0,
-10.0, -15.0, -10.0,
-100.0, -15.0, 100.0,
-10.0, -15.0, 10.0
};

const GLfloat floorVerts[] = {
-10.0, -15.0, 10.0,
10.0, -15.0, 10.0,
10.0, -15.0, -10.0,
-10.0, -15.0, -10.0,
};

const GLfloat floorUV[] = {
0.0, 0.0,
0.0, 1.0,
1.0, 1.0,
1.0, 0.0
};</pre>
<p>Then in my render() function&#8230;</p>
<pre>  glEnable(GL_DEPTH_TEST);
  glEnable(GL_TEXTURE_2D);
  glShadeModel(GL_SMOOTH);
  glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

  // Clear the space
  glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  CHECK_ERR

  // Draw the skybox
  _pSkyBox-&gt;draw();
  CHECK_ERR

  // Only draw the reflection if the view is above the plane of the floor.
  if (pWorld-&gt;camera()-&gt;location().y() &gt; -14.5) {

    // Draw the stencil.  Anything that is drawn after this that is occluded by the
    // stencil will not be drawn because it fails the depth test.  The skybox, which
    // has already been drawn, will show through everywhere because of the transparency.
    pWorld-&gt;material(&quot;StencilMaterial&quot;)-&gt;installMaterial();  // Sets the material properties, including alpha
    glEnableClientState(GL_VERTEX_ARRAY);
    glVertexPointer(3, GL_FLOAT, 0, stencilVerts);
    glDrawArrays(GL_TRIANGLE_STRIP, 0, 10);
    glDisableClientState(GL_VERTEX_ARRAY);
    pWorld-&gt;material(&quot;StencilMaterial&quot;)-&gt;uninstallMaterial();

    // Draw reflection w/out floor -- Reflection will be depth culled everwhere but hole
    // Draw everything else normally (including the mirrored floor)
    glPushMatrix ();
    // Mirror lies in XZ plane, so scale by -1.0 in Y axis
    glScalef(1.0, -1.0, 1.0);
    // Mirror is 15.0 units from origin, so translate by 30.0 units
    glTranslatef(0.0, 30.0, 0.0);
    pWorld-&gt;draw();
    glPopMatrix();
  }
  CHECK_ERR

  // Draw the real scene
  pWorld-&gt;draw();
  CHECK_ERR

  // Draw the floor
  BMWLight::disableLighting();
  pWorld-&gt;material(&quot;Material_010&quot;)-&gt;installMaterial(); // Sets the material properties
  glEnableClientState(GL_VERTEX_ARRAY);
  glVertexPointer(3, GL_FLOAT, 0, floorVerts);
  glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  glClientActiveTexture(GL_TEXTURE0);
  glTexCoordPointer(2, VERTTYPEENUM, 0, floorUV);
  glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
  glDisableClientState(GL_TEXTURE_COORD_ARRAY);
  glDisableClientState(GL_VERTEX_ARRAY);
  pWorld-&gt;material(&quot;Material_010&quot;)-&gt;uninstallMaterial();
  BMWLight::enableLighting();</pre>
<p>Note that the BMW functions are functions in our framework that encapsulate OpenGL functionality.  You can pretty much treat them as pseudo-code in this example.</p>
<p>So, there you have it.  A use of depth culling and transparency to implement functionality that I originally though required a stencil buffer.  I&#8217;d be intereste in hearing about any examples you have of similar effects!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/07/look-ma-no-stencil-buffer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Taming SoundEngine Processor Utilization</title>
		<link>http://www.BluMtnWerx.com/blog/2009/07/taming-soundengine-processor-utilization/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/07/taming-soundengine-processor-utilization/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 22:26:22 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[iPunt]]></category>
		<category><![CDATA[OpenAL]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=224</guid>
		<description><![CDATA[Here's a simple modification to SoundEngine that cures performance problems with looping effects having long preambles (or attack buffers.)]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using the SoundEngine example code from Apple for OpenAL sounds on iPhone, I have a tip for you.  I ran into a serious processor utilization problem when using SoundEngine_LoadLoopingEffect() to load a sound effect that had a long preamble and then transitioned into a steady-state loop.  At first glance, this function looks ideal for such a thing because it will allow you to load a sound to be played when the effect starts, then a sound that is looped, then a sound that is played when the effect is stopped.  What I found was that, while the preamble (called the <em>AttackBuffer</em> in SoundEngine) is playing, SoundEngineEffect::PlaybackProc() hogs the processor.  This led to serious frame rate issues in <a title="iPunt iPhone game web page." href="http://www.blumtnwerx.com/iPunt.html" target="_blank" title="iPunt iPhone game web page.">iPunt</a> .</p>
<p>The cause is the following code in SoundEngineEffect::PlaybackProc()</p>
<pre>  if (THIS-&gt;HasAttackBuffer())
  {
    ALint numBuffersProcessed = 0;
    while (numBuffersProcessed &lt; 1)
    {
       alGetSourcei(THIS-&gt;GetEffectID(), AL_BUFFERS_PROCESSED, &amp;numBuffersProcessed);
         AssertNoOALError(&quot;Error getting processed buffer number&quot;, end)
    }</pre>
<p>While the attack buffer is playing, you&#8217;re in a tight polling loop waiting for it to complete.  This is no problem if the preamble is really short, but for OpenGL games, it&#8217;s going to cause problems for any sound longer than a fraction of a frame.</p>
<p>The fix, fortunately, is simple.  Sleep this thread for a few milliseconds each iteration of the polling loop in order to give the rest of your application a chance to run.</p>
<p>The modified code is:</p>
<pre>  if (THIS-&gt;HasAttackBuffer())
  {
    ALint numBuffersProcessed = 0;
    while (numBuffersProcessed &lt; 1)
    {
       alGetSourcei(THIS-&gt;GetEffectID(), AL_BUFFERS_PROCESSED, &amp;numBuffersProcessed);
         AssertNoOALError(&quot;Error getting processed buffer number&quot;, end)
       usleep(5000);  // Sleep for 5 mS each polling loop
    }</pre>
<p>This little change makes all the difference for this bit of code and makes it suitable for long (&gt; 1second) preambles.</p>
<p>I&#8217;ve found SoundEngine to work pretty well, although I have had to make a number of modifications to it for my specific application.  However, I think I&#8217;m at the point where I need to write my own OpenAL sound processing class library.  I&#8217;d be interested to hear from some of you to see what you&#8217;re using for game sound.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/07/taming-soundengine-processor-utilization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone App Marketing Series:  Promo Code Giveaways</title>
		<link>http://www.BluMtnWerx.com/blog/2009/07/iphone-app-marketing-series-promo-code-giveaways/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/07/iphone-app-marketing-series-promo-code-giveaways/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 04:58:34 +0000</pubDate>
		<dc:creator>deans</dc:creator>
				<category><![CDATA[App Marketing]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[iPhone App Marketing]]></category>
		<category><![CDATA[Promo Codes]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=219</guid>
		<description><![CDATA[An entire shadow system of app promo code giveaways seems to have evolved over the past several months.&#160;  I wondered if this might be a viable way to promote our apps, so I gave it a try.]]></description>
			<content:encoded><![CDATA[<p>Among the myriad ways to promote our apps, there is one that has been particularly intriguing to me.&nbsp;  The fifty promo codes allocated to each version of a paid app are intended to support developers who want to provide copies of the app to potential reviewers.&nbsp;  The dream is that reviewers will love the app, write excellent reviews and give it high ratings, which will drive massive sales and make us rich.&nbsp;  For some of us, though, it doesn&#8217;t quite work out that way.&nbsp;  I suspect that there are a number of reasons for this.&nbsp;  Let&#8217;s talk about a couple of them.</p>
<p>Fortunately, or unfortunately, depending on your perspective, the pool of credible reviewers for most apps is infinitesimally small relative to the number of promo codes available.&nbsp;  I decided to try to get some rough insight into the numbers involved.&nbsp;  Here&#8217;s what I came up with:</p>
<p>Let&#8217;s ignore updates and expirations for a moment.&nbsp;  According to the always excellent sources at <a href="http://148apps.biz/" title="148Apps Biz page">148Apps</a>, <a href="http://148apps.biz/app-store-metrics/?mpage=appprice" title="148 Apps:  Application Price Distribution">roughly 77%</a> of the apps in the store are paid (they claim to update their data daily, so this should be current info).&nbsp;  They also report that, as of today, there have been <a href="http://148apps.biz/app-store-metrics/" title="148 Apps:  App Store Metrics">63,013 apps</a> seen on the store.&nbsp;  That would give us somewhere in the neighborhood of 49K paid apps seen in the store.&nbsp;  Multiply this by 50 promo codes per application and we determine that there have been just under 2.5 million codes potentially available.&nbsp;  I&#8217;d guess that far less than 50K of those were used by credible reviewers &mdash; how many truly credible reviews have you seen?&nbsp;  The rest are either going to waste, or being broadcast distributed (I include the &#8220;Massive App Giveaway&#8221; contests in this latter bucket).</p>
<p>Further, at least in my experience, most people who get a promo code don&#8217;t bother to follow up with a review.&nbsp;  Or maybe they&#8217;re just too polite write what they really think about my apps.&nbsp;  You might think that my friends would be willing to tell lies for me, but&hellip; then we&#8217;re back to the credibility thing.</p>
<p>If we accept that most of the promo codes aren&#8217;t going to be effective at generating blockbuster sales, we have to think about alternate objectives.&nbsp;  Will giving out lots of promo codes get people to use the app and talk about it, resulting in some new sales?&nbsp;  Will the availability of the promo codes bring attention to our team?&nbsp;  Will people, somehow magically influenced by the promo codes, at least visit our site?&nbsp;  As we move further away from money deposited in our accounts, the value of these becomes much lower.</p>
<p>Now for the bad news.&nbsp;  Some of the things that we&#8217;ve tried, include:</p>
<ul>
<li>Sending promo codes in personal emails directly to reviewers asking for coverage</li>
<li>Providing codes to friends who promised to review the apps</li>
<li>Sharing codes with other developers who frequent the forums where we contribute</li>
<li>Responding to a small number of the requests for promo codes that accompany each app&#8217;s debut in the store &mdash; we did get a nice <a href="http://www.blumtnwerx.com/blog/2009/07/ipuck-video-iphone-app-review/" title="touchthemappels:  Video Review of iPuck">video review of iPuck</a> this way</li>
<li>Placing a block of codes on a friendly forum</li>
</ul>
<p>Our results have been dismal.&nbsp;  Like everyone else, I&#8217;ve heard anecdotes (myths?) about how promo codes have really boosted apps.&nbsp;  Since ours aren&#8217;t having this effect, I&#8217;m forced to consider some possible explanations.&nbsp;  Perhaps promo codes can accelerate adoption of an app that&#8217;s already on a good trajectory, while not doing much for an app that&#8217;s still trying to be noticed.&nbsp;  It&#8217;s possible that promo codes provide more benefit within closely related / interdependent networks.&nbsp;  Maybe our apps are just not interesting to anyone but us.&nbsp;  Referencing back to the quantity of available promo codes, maybe the system just has such an abundance that codes for lesser-known apps are essentially without value.</p>
<p>It&#8217;s clear to me that this kind of success doesn&#8217;t justify the effort that we&#8217;ve put into managing and distributing promo codes for our apps.&nbsp;  We&#8217;ll continue to give them out to friends, because we kind of have to.&nbsp;  We&#8217;ll also be open to plausible requests for codes.&nbsp;  However, I&#8217;m completely giving up on using codes as proactive marketing tool.</p>
<p>By the way, here&#8217;s a fun fact that I ran across while researching this post:</p>
<blockquote><p>The <a href="http://148apps.biz/app-store-metrics/?mpage=appprice" title="148 Apps:  Application Price Distribution">148Apps Price Distribution</a> page reports that I could buy a copy of all of the apps on the store for <strong><em>$137,262.00</em></strong>.</p></blockquote>
<p>That&#8217;s a lot lower than I would have guessed, given the amount of energy and money flowing through the app store right now.&nbsp;  This appears to be an excellent demonstration of the power of lots of really cheap apps.</p>
<p>&nbsp;<br />
&#8212;&#8212;&#8211;<br />
Technorati Tags:&nbsp; <a href="http://technorati.com/tag/iPhone" rel="tag">iPhone</a>, <a href="http://technorati.com/tag/iPod+Touch" rel="tag">iPod Touch</a>, <a href="http://technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://technorati.com/tag/mobile" rel="tag">mobile</a>, <a href="http://technorati.com/tag/promo+codes" rel="tag">promo codes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/07/iphone-app-marketing-series-promo-code-giveaways/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Chipmunk:  2D Physics on the iPhone</title>
		<link>http://www.BluMtnWerx.com/blog/2009/07/chipmunk-2d-physics-on-the-iphone/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/07/chipmunk-2d-physics-on-the-iphone/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 19:43:22 +0000</pubDate>
		<dc:creator>deans</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[2D Physics]]></category>
		<category><![CDATA[Chipmunk]]></category>
		<category><![CDATA[iPhone Dev Tools]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=205</guid>
		<description><![CDATA[We recently submitted v1.1 of iPuck to the App Store.&#160;  The primary "under the hood" change was a port to the Chipmunk physics library.&#160;  If you need a lightweight, fast and straightforward physics library for 2D apps on the iPhone, you should check Chipmunk out.&#160;  In this discussion, we'll introduce the library and talk a bit about our experience with it.]]></description>
			<content:encoded><![CDATA[<p>We wanted to support much more interesting gameplay, along with a more accurate physics simulation, in the first significant update to <a href="http://www.blumtnwerx.com/iPuck.html" title="iPuck web page">iPuck</a>.&nbsp;  Unfortunately, this forced us to swap out the simulation engine used in v1.0.&nbsp;  The old library worked fine, but it couldn&#8217;t be easily extended to meet the new requirements.&nbsp;  I looked at some of the 3D packages (One that I considered pretty carefully was <a href="http://www.bulletphysics.com/wordpress/" title="Bullet Physics Library web page">Bullet</a>, which is bundled with <a href="http://www.oolongengine.com/" title="Oolong web page">Oolong</a>, the package that <a href="http://www.blumtnwerx.com/BMWTeam.html" title="Paul Stoaks, BluMtnWerx">Paul</a> used for <a href="http://www.blumtnwerx.com/iPunt.html" title="iPunt web page">iPunt</a>).&nbsp;  However, the 3D libraries all seemed to be overkill for iPuck.&nbsp;  Besides, I would feel bad about wasting the Z axis.&nbsp;  One 2D package kept turning up in my searches&mdash;<strong><a href="http://code.google.com/p/chipmunk-physics/" title="Chipmunk Physics website">chipmunk-physics</a></strong> (another <a href="http://wiki.slembcke.net/main/published/Chipmunk" title="Chipmunk Physics wiki">wiki page</a> is also available, but I think that the <a href="http://code.google.com/p/chipmunk-physics/" title="Chipmunk Physics project Page">code.google.com page</a> is more up-to-date).  <a href="http://code.google.com/p/chipmunk-physics/" title="chipmunk-physics"><img style="float: right; margin: 0.2em;" src="http://files.slembcke.net/chipmunk/logo/logo1_small.png" alt="chipmunk-physics logo"/></a>.</p>
<p>Chipmunk is a</p>
<blockquote><p><em>Fast and lightweight 2D rigid body physics library in C</em></p></blockquote>
<p>That last bit is important for iPhone development, because, as we all know, &#8216;C&#8217; plays very well with Objective-C.&nbsp;  Once I figured out how to call Objective-C methods from the Chipmunk related &#8216;C&#8217; code, integration was very smooth.&nbsp;  It&#8217;s worth mentioning that the standard &#8216;C&#8217; code in the Chipmunk distribution compiles fine in Xcode and runs with no problems on the iPhone and iPod touch.&nbsp;  I was worried that I might run into some issues, but it was perfect.&nbsp;  By the way, we plan to use Chipmunk for other projects, so I set it up as a &#8220;Source Tree&#8221; in Xcode, rather than just dumping the files directly into the iPuck project space.&nbsp;  Paul wrote an excellent <a href="http://www.blumtnwerx.com/blog/2009/04/xcode-workspace-setup-for-oolong/" title="Mobile Perspectives:  Xcode Workspace Setup for Oolong">post</a> on doing this for Oolong.&nbsp;  I just followed his directions.</p>
<p>I won&#8217;t list all of Chipmunk&#8217;s features, they are nicely presented on the <a href="http://code.google.com/p/chipmunk-physics/" title="Chipmunk Physics project Page">project page</a>, but it is fast and straightforward to use.</p>
<p>The <a href="http://code.google.com/p/chipmunk-physics/wiki/Documentation" title="Chipmunk Documentation">documentation</a> is a bit sparse, especially for someone just getting started.&nbsp;  The demos are very helpful, but generally seem to assume that we already have a pretty good understanding of Chipmunk.&nbsp;  A set of demo programs is bundled with the <a href="http://files.slembcke.net/chipmunk/release/ChipmunkLatest.tgz" title="Current Chipmunk distribution">ChipmunkLatest.tgz</a> download.&nbsp;  Even nicer demo programs are available in the <a href="http://code.google.com/p/chipmunk-physics/source/browse/" title="Chipmunk SVN Repository">project repository</a>.&nbsp;  </p>
<p>Fortunately, <a href="http://www.alexandre-gomes.com/?page_id=2" title="About Alexandre Gomes">Alexandre Gomes</a> has prepared a <a href="http://www.alexandre-gomes.com/articles/chipmunk/" title="alexandre gomes:  Getting Started with Chipmunk">nice tutorial</a> on getting started with Chipmunk.&nbsp;  I noticed a few typos in the sample code, but it gave me a great start towards learning the library and figuring out how to slide it on to the iPuck chassis.&nbsp;  Mr. Gomes does a good job of explaining the <a href="http://www.alexandre-gomes.com/articles/chipmunk/basicconcepts.php" title="alexandre gomes:  Basic Concepts of Chipmunk">basic concepts</a>.&nbsp;  I highly recommend taking a look at the tutorial if you&#8217;re considering using Chipmunk.  </p>
<p>Once I got started actually porting iPuck, I only encountered a couple of small snags.&nbsp;  The first came when I was still working with permutations of Mr. Gomes&#8217; sample.&nbsp;  I couldn&#8217;t figure out how to grab an object and drag it around on the screen.&nbsp;  After a bit of searching on the extremely useful <a href="http://www.slembcke.net/forums/viewforum.php?f=1" title="Chipmunk Physics Forums">Chipmunk forum</a>, I found some <a href="http://www.slembcke.net/forums/viewtopic.php?f=6&#038;t=196" title="cpMouse post">sample code</a> that provided most of what I needed.&nbsp;  I&#8217;m led to believe that there will soon be better ways to do this in Chipmunk.&nbsp;  However, after a bit of customization, <a href="http://www.slembcke.net/forums/viewtopic.php?f=6&#038;t=196" title="cpMouse post"><span STYLE="font-family:Courier;">cpMouse</span></a> met the needs for iPuck v1.1.&nbsp;  I plan to look at some of the other methods to see whether I can continue to improve the code.&nbsp;  Look out v1.2.</p>
<p>The other problem was my fault for not reading the <a href="http://code.google.com/p/chipmunk-physics/wiki/cpShape" title="Chipmunk cpShape Documentation"><span STYLE="font-family:Courier;">cpShape</span> documentation</a> more thoroughly.&nbsp;  I had originally modeled a number of my static objects as <span STYLE="font-family:Courier;">cpSegmentShape</span>s.&nbsp;  This worked really well as long as my active objects were all <span STYLE="font-family:Courier;">cpCircleShape</span>s.&nbsp;  Unfortunately, when I tried to model an active object using segments, I discovered that the current version of Chipmunk does not support <span STYLE="font-family:Courier;">cpSegment</span>-to-<span STYLE="font-family:Courier;">cpSegment</span> collisions.&nbsp;  After I went back and converted to <span STYLE="font-family:Courier;">cpPolyShape</span>s, everything was perfect.&nbsp;  If I had carefully read the Chipmunk documentation,  before I started coding, I would have seen:</p>
<blockquote><p><em>Line segments: Meant mainly as a static shape. They can be attached to moving bodies, but they don&#8217;t currently generate collisions with other line segments.</em></p></blockquote>
<p>I needed to develop against a stable library, so I chose to stick with the 4.1.0 version.&nbsp;  Judging by the activity in the project archive, there has been substantial progress since 4.1.0 and I&#8217;m looking forward to working with the latest revisions when they&#8217;ve settled into a steady state.</p>
<p>If you&#8217;re working with rigid bodies, and you need a fast, accurate, easy to use and, best of all, license fee free, 2D physics library, <a href="http://code.google.com/p/chipmunk-physics/" title="chipmunk-physics">Chipmunk</a> may be a perfect match for your needs.</p>
<p>&nbsp;<br />
&#8212;&#8212;&#8211;<br />
Note:&nbsp;  Instructions for using <a href="http://subversion.tigris.org/" title="Subversion project home page">Subversion</a> to check out the code and demos are <a href="http://code.google.com/p/chipmunk-physics/source/checkout" title="Chipmunk SVN co instructions">here</a>.<br />
&#8212;&#8212;&#8211;<br />
Technorati Tags:&nbsp; <a href="http://technorati.com/tag/iPhone" rel="tag">iPhone</a>, <a href="http://technorati.com/tag/iPod+Touch" rel="tag">iPod Touch</a>, <a href="http://technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://technorati.com/tag/mobile" rel="tag">mobile</a>, <a href="http://technorati.com/tag/Chipmunk+Physics" rel="tag">chipmunk physics</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/07/chipmunk-2d-physics-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone App Marketing Series: When to End App Support for iPhone OS 2.x?</title>
		<link>http://www.BluMtnWerx.com/blog/2009/06/iphone-app-marketing-series-when-to-end-app-support-for-iphone-os-2x/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/06/iphone-app-marketing-series-when-to-end-app-support-for-iphone-os-2x/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 07:40:21 +0000</pubDate>
		<dc:creator>deans</dc:creator>
				<category><![CDATA[App Marketing]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[iPhone App Marketing]]></category>
		<category><![CDATA[iPhone OS 3.0]]></category>
		<category><![CDATA[iPhone SDK]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=192</guid>
		<description><![CDATA[With iPhone OS 3.0 in the wild, we've been wondering how long we should continue to maintain compatibility with iPhone OS 2.x.&#160;  For us, it really comes down to a resource issue.&#160;  Fortunately, the latest reports seem to suggest that 3.0 adoption is happening very quickly, so we might not be in both worlds for long.]]></description>
			<content:encoded><![CDATA[<p>Now that the iPhone OS 3.0 software is generally available, many developers are asking the same question.&nbsp;  &#8220;When should we stop testing on, and supporting, iPhone OS 2.x?&#8221;&nbsp;  When planning for the transition, I originally thought that we&#8217;d release updates, tested on 3.0, but built for 2.2.1, until sometime in August.&nbsp;  That would probably cover two updates for our apps (we&#8217;re trying to shorten our cycles, but&hellip;).&nbsp;  This is primarily a resource and productivity issue for us.&nbsp;  We have kept half of our devices at 2.2.1 for testing, and we have maintained one of our development machines configured with the old Xcode and the 2.x versions of the SDK.&nbsp;  We also spend a non-trivial (and not particularly productive) chunk of time testing our apps on both 2.2.1 and 3.0.&nbsp;  It would sure be nice to focus all of our resources and energy on development for a single version of the OS.</p>
<p>My hesitation has been based on the fear of losing potential customers who haven&#8217;t upgraded to the newest version of the OS.&nbsp;  Fortunately, a number of apparently independent sources are suggesting that uptake of the new OS is much faster than I might have expected.&nbsp;  With this latest news, it&#8217;s starting to look like we&#8217;ll cut over completely to 3.0 much sooner than I&#8217;d originally planned.</p>
<p>Here&#8217;s some of what I&#8217;m looking at:</p>
<p>Paul, over at <a href="http://tapbots.com/blog/" title="Tapbots Blog">Tapbots</a> is <a href="http://tapbots.com/blog/news/iphone-os-30-adoption-rate" title="Tapbots Post:  iPhone OS 3.0 Adoption Rate">reporting</a> <em>(dated 2009.06.23)</em> that:</p>
<blockquote><p><em>&#8220;It’s pretty clear that at least our customers are upgrading to 3.0 at an incredibly fast pace.&#8221;</p>
<p>&#8220;<strong>&hellip;</strong> running at an overall 75% upgrade rate which is pretty insane considering the number of devices and the fact that its only been 5 days.&#8221;</p>
<p>&#8220;The iPhone upgrade rate is a bit higher then the overall rate, currently sitting at 79%.&#8221;</p>
<p>&#8220;<strong>&hellip;</strong> the iPod Touch has just passed 50%.&#8221;<br />
</em></p></blockquote>
<p>The post also has some nice graphs of what they&#8217;re seeing.&nbsp;  They promise to update the post as new information comes in.&nbsp;  I&#8217;ll be checking back periodically.</p>
<p>In a similar vein, <a href="http://www.admob.com/" title="AdMob homepage">AdMob</a> just published a <a href="http://metrics.admob.com/2009/06/44-of-iphone-ad-requests-coming-from-the-30-os/" title="AdMob:  44% of iPhone ad requests coming from the 3.0 OS">report</a> <em>(Their graphs are dated 2009.06.20, so this covers just a few days after the iPhone OS 3.0 software was generally available)</em> that also suggests strong, albeit somewhat lower uptake rates for the iPhone:</p>
<blockquote><p><em><strong>&hellip;</strong>44% of iPhone ad requests coming from the 3.0 OS</em></p></blockquote>
<p>AdMob&#8217;s data suggests that just 1% of requests coming from iPod touches are originating with devices  running 3.0.</p>
<p>For as long as they continue to be available, here are the charts from AdMob:<br />
<a href="http://metrics.admob.com/2009/06/44-of-iphone-ad-requests-coming-from-the-30-os/" title="AdMob:  44% of iPhone ad requests coming from the 3.0 OS"><img style="float: center; margin: 1em; width: 408px;" src="http://metrics.admob.com/wp-content/uploads/2009/06/iphone-os-june-22.jpg" alt="AdMob:  44% of iPhone ad requests coming from the 3.0 OS"/></a><br />
and<br />
<a href="http://metrics.admob.com/2009/06/44-of-iphone-ad-requests-coming-from-the-30-os/" title="AdMob:  44% of iPhone ad requests coming from the 3.0 OS"><img style="float: center; margin: 1em; width: 408px;" src="http://metrics.admob.com/wp-content/uploads/2009/06/touch-os-june-221.jpg" alt="AdMob:  44% of iPhone ad requests coming from the 3.0 OS"/></a><br />
Of course, it&#8217;s always possible that we&#8217;re seeing sample bias in these two reports.&nbsp;  Perhaps customers of Tapbots and users of apps that present AdMob ads are not representative of the total population.&nbsp;  However, I&#8217;m inclined to believe the trend, if not the specific figures.&nbsp;  The 3.0 upgrades are too compelling (and free for iPhone users) to ignore.&nbsp;  I predict that we&#8217;ll see 80% adoption across the board by the end of July.</p>
<p>It will be fascinating to see how these numbers change over the next couple of weeks, but I&#8217;m now thinking that we&#8217;ll jump to 3.0 even sooner than I&#8217;d planned.&nbsp;  These trends suggest that we&#8217;ll be able to continue to address the mainstream iPhone market, while allowing our development team to be more focused on building good new stuff, rather than testing on permutations of OS versions.</p>
<p>What kind of conclusions are you reaching about this?&nbsp;  Please let us know.</p>
<p>&nbsp;<br />
&#8212;&#8212;&#8211;<br />
Technorati Tags:&nbsp; <a href="http://technorati.com/tag/iPhone" rel="tag">iPhone</a>, <a href="http://technorati.com/tag/iPod+Touch" rel="tag">iPod Touch</a>, <a href="http://technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://technorati.com/tag/mobile" rel="tag">mobile</a>, <a href="http://technorati.com/tag/iPhone+OS+3.0" rel="tag">iPhone OS 3.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/06/iphone-app-marketing-series-when-to-end-app-support-for-iphone-os-2x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taming Touch / Multi-Touch on the iPhone</title>
		<link>http://www.BluMtnWerx.com/blog/2009/06/taming-touch-multi-touch-on-the-iphone/</link>
		<comments>http://www.BluMtnWerx.com/blog/2009/06/taming-touch-multi-touch-on-the-iphone/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:14:25 +0000</pubDate>
		<dc:creator>deans</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[multi-touch]]></category>
		<category><![CDATA[touch]]></category>

		<guid isPermaLink="false">http://www.BluMtnWerx.com/blog/?p=178</guid>
		<description><![CDATA[It seemed so simple at the time.&#160;  I wanted to manifest a different behavior when dragging the player sprite in iPuck with two fingers, instead of just one finger.&#160;  Not so fast, Skippy.&#160;  The solution is buried in the documentation, but most of the touch code samples that I've seen don't implement it.]]></description>
			<content:encoded><![CDATA[<p>Gameplay in <a href="http://www.blumtnwerx.com/iPuck.html" title="iPuck Product Page">iPuck</a> <em><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=314153461&#038;mt=8" title="iPuck on the App Store">(App Store)</a></em>  is straightforward.&nbsp;  The player manipulates his/her sprite to knock the puck into the opponent’s goal, while guarding their own goal.&nbsp;  When I transitioned to <a href="http://wiki.slembcke.net/main/published/Chipmunk" title="Chipmunk 2D Physics Main Page">Chipmunk</a> for the 2D physics modeling, I had an opportunity to manifest two different behaviors as the player sprite is dragged.&nbsp;  &#8220;Great,&#8221; I thought, &#8220;I&#8217;ll have it behave one way when the player is dragging with one finger, and the other way when dragging with two fingers.&#8221;&nbsp;  Sounds good, right?</p>
<p>Unfortunately, it didn&#8217;t work.&nbsp;  I ended up writing a bunch of needlessly complex code that sort of emulated the behavior that I wanted.&nbsp;  I almost decided to abandon the functionality because I couldn&#8217;t get it to work reliably in all situations.&nbsp;  I knew that there had to be a better way to solve this problem.</p>
<p>Some of the challenges include:</p>
<ul>
<li>First, <span STYLE="font-family:Courier;">touchesBegan:withEvent:</span> gets called every time a finger touches the screen.&nbsp;  Thus, if the second finger touches just a tiny bit later than the first, <span STYLE="font-family:Courier;">touchesBegan:withEvent:</span> actually gets called with two separate single <span STYLE="font-family:Courier;">touchesBegan</span> events.&nbsp;  It&#8217;s easy enough to have a test to see whether the app is already processing a touch, but there are potential reliability issues with this because I have to guarantee that the touch state will always be cleaned up, or I might not be able recognize a legitimate <span STYLE="font-family:Courier;">touchesBegan:withEvent:</span> call.<br />
&nbsp;  </li>
<li>Second, when the set of touches is presented to <span STYLE="font-family:Courier;">touchesMoved:withEvent:</span>, a given set may contain a touch point from either finger, or both fingers.&nbsp;  If I get touches for both fingers, the order is predictable (first finger&#8217;s touch in element 0, second finger&#8217;s touch in element 1), within the scope of a single touch sequence (<em>down, move, up</em>).&nbsp;  However, if I only get one touch point, it could be from either finger, so I thought that my code had to try to sort out whether it could process the point, or not, by filtering for an &#8220;acceptable&#8221; delta (<em>I saw this technique in some sample code</em>).&nbsp;  I could use a heuristic technique to do this, but it&#8217;s really just a best guess.&nbsp;  Of course, this filtering can make for confusing gameplay, because the user thinks that they&#8217;re moving their the puck sprite, but if the &#8220;master&#8221; finger isn&#8217;t moving as fast as the &#8220;secondary&#8221; finger, the sprite may not behave as they are expecting.<br />
&nbsp;  </li>
<li>Finally, each time the player lifts either, or both, finger(s), <span STYLE="font-family:Courier;">touchesEnded:withEvent:</span> gets called, and I had to figure out which finger had actually lifted so that I could take the appropriate action.</li>
</ul>
<p>After stewing about the problem overnight, I dug into Apple&#8217;s documentation and found the answer.&nbsp;  Unfortunately, the code samples that I referenced when I wrote iPuck completely ignore this method.&nbsp;  In the discussion below, I&#8217;m focusing on two fingered multi-touches, because that&#8217;s the simplest scenario.&nbsp;  Everything that I say, however, extends completely to <em>n</em> finger touches.</p>
<p>Most of the sample code running around  handled single touches in a fashion something like this:</p>
<p><strong>NOTE:</strong>  <em>THIS ONLY WORKS RELIABLY IF YOUR VIEW DOES NOT HAVE MULTITOUCH ENABLED</em></p>
<p><span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {<br />
&nbsp;  &nbsp;  // get the first touch<br />
&nbsp;  &nbsp;  UITouch *touch = [touches anyObject];<br />
&nbsp;  &nbsp;  if ([touch view] == myView) {<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  CGPoint touchPt = [[touches anyObject] locationInView:myView];<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  // do something with the point </span> &hellip; <span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
&nbsp;  &nbsp;  }<br />
}</span><br />
<span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
- (void)touchesMoved: (NSSet*)touches withEvent: (UIEvent*)event {<br />
&nbsp;  &nbsp;  // drag the sprite object along.<br />
&nbsp;  &nbsp;  CGPoint pt = [[touches anyObject] locationInView:myView];<br />
&nbsp;  &nbsp;  // do something with the new pt.<br />
}</span></p>
<p><span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {<br />
&nbsp;  &nbsp;  // If the touch was in myView, handle it.<br />
&nbsp;  &nbsp;  UITouch *touch = [touches anyObject];<br />
&nbsp;  &nbsp;  if ([touch view] == myView) {<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  // clean up<br />
&nbsp;  &nbsp;  }<br />
}</span></p>
<p><span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {<br />
&nbsp;  &nbsp;  // If the touch was in the myView, handle it.<br />
&nbsp;  &nbsp;  UITouch *touch = [touches anyObject];<br />
&nbsp;  &nbsp;  if ([touch view] == myView) {<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  // clean up<br />
&nbsp;  &nbsp;  }<br />
}</span></p>
<p>My first effort, as described above, was to simply convert the set of <span STYLE="font-family:Courier;">touches</span> into an array and try to figure out what I was getting.</p>
<p><strong>&hellip;</strong><span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
&nbsp;  &nbsp;  NSArray *touchArr = [touches allObjects];<br />
&nbsp;  &nbsp;  NSInteger touchCnt = [touchArr count];<br />
&nbsp;  &nbsp;  UITouch *newTouch;<br />
&nbsp;  &nbsp;  CGPoint pt;<br />
&nbsp;  &nbsp;  if (touchCnt >= 1) {<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  newTouch = [touchArr objectAtIndex:0];<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  pt1 = [newTouch locationInView:myView];<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  // do something with pt1<br />
&nbsp;  &nbsp;  }</span><br />
<strong>&hellip;</strong></p>
<p>Sadly, this didn&#8217;t work very well, so I went to Apple&#8217;s excellent documentation.&nbsp;  The answer to my problem is right there, in the <a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITouch_Class/Reference/Reference.html#//apple_ref/occ/cl/UITouch" title="UITouch Class Reference manual">UITouch Class Reference</a> document:</p>
<blockquote><p><em>A <span STYLE="font-family:Courier;">UITouch</span> object is persistent throughout a multi-touch sequence.</em></p></blockquote>
<p><strong>That&#8217;s it!</strong></p>
<p>I quickly changed my code to keep track of the specific <span STYLE="font-family:Courier;">UITouch</span> objects.&nbsp;  We can organize these touch objects in a number of ways, including static module variables, an array of <span STYLE="font-family:Courier;">UITouch*</span>&#8217;s or an <span STYLE="font-family:Courier;"><a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html" title="NSMutableDictionary Class Reference">NSMutableDictionary</a></span> (<em>indexed by the touch objects&#8217; IDs</em>), depending on the specific requirement of the situation.</p>
<p>This allows me to do things like</p>
<p><strong>&hellip;</strong><br />
<span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small">static UITouch *g_firstTouch = nil;</span><br />
<strong>&hellip;</strong><br />
<span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {<br />
&nbsp;  &nbsp;  // get the first touch<br />
&nbsp;  &nbsp;  NSArray *touchArr = [touches allObjects];<br />
&nbsp;  &nbsp;  NSInteger touchCnt = [touchArr count];<br />
&nbsp;  &nbsp;  UITouch *aTouch = [touchArr objectAtIndex:0];</span><br />
<strong>&hellip;</strong><br />
<span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small">&nbsp;  &nbsp;  &nbsp;  &nbsp;  if (([aTouch view] == myView) &#038;&#038; (g_firstTouch == nil)) {<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  // keep track of the first touch object in the view.<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  // this touch will represent this finger for the duration<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  // of the sequence<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  g_firstTouch = aTouch;<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  // more stuff.</span><br />
<strong>&hellip;</strong> <em>code to loop through the touchArr doing other processing not shown</em> <strong>&hellip;</strong><br />
<span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
- (void)touchesMoved: (NSSet*)touches withEvent: (UIEvent*)event {</span><br />
<strong>&hellip;</strong> <em>looping code not shown</em> <strong>&hellip;</strong><span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  if (aTouch == g_firstTouch) {<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  //do something apppropriate</span><br />
&hellip;<strong>or</strong>&hellip;<span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
&nbsp;  &nbsp;  if (firstTouchNotInSet) {<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  // the touchesMoved method was called, but our first touch<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  // wasn&#8217;t in the set, use its current data<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  CGPoint pt1 = [g_firstTouch locationInView:myView];<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  // do something with pt1</span><br />
<strong>&hellip;</strong><br />
<span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {</span><br />
<strong>&hellip;</strong> <em>looping code not shown</em> <strong>&hellip;</strong><span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small"><br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  if (aTouch == g_firstTouch) {<br />
&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  // the first touch is over, do something appropriate.</span><br />
<strong>&hellip;</strong></p>
<p>&nbsp;<br />
<strong>Notes:</strong></p>
<ul>
<li>I extracted this code from our apps, and tried to make it generic to illustrate the points.&nbsp;  I didn&#8217;t recompile/retest the extracted code, so I may have botched the process a little bit &#8211; apologies in advance</li>
<li>Don&#8217;t forget that you have to enable multi-touch, it&#8217;s disabled by default.&nbsp;  You&#8217;ll need to set the multipleTouchEnabled property:&nbsp;  <span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small">[myView  setMultipleTouchEnabled:Yes];</span></li>
<li>The <span STYLE="font-family:Courier;">timestamp</span> property of <span STYLE="font-family:Courier;">UIEvent</span> can provide another way to organize your app&#8217;s events</li>
<li>For sprite movement, I typically have to apply deltas to the previous sprite location, I&#8217;ve always kept track of the previous touch point within my touchesMoved:withEvent method.&nbsp;  It turns out that this isn&#8217;t strictly necessary, as <span STYLE="font-family:Courier;">UITouch</span> has the<br />
<span STYLE="font-family:Courier;background-color:#CCFFFF;font-size:x-small">- (CGPoint)previousLocationInView:(UIView *)view</span><br />
method, which provides the exact same functionality &#8211; I haven&#8217;t verified the performance impact, but it could simplify your code.</li>
<li>After all of this, I decided that I didn&#8217;t like two-finger dragging for controlling the player sprite.  Multi-touch is great for swipes and gestures, but it doesn&#8217;t seem to lend itself to the quick movements and rapid direction changes needed to play the game, so I came up with a completely different interface implementation for v1.1 of iPuck.
</li>
</ul>
<p>&nbsp;<br />
<strong>Bottom Line:</strong></p>
<p>We can take advantage of the fact that each specific <span STYLE="font-family:Courier;">UITouch</span> object spans the duration of a down / drag / up operation to unambiguously identify each touch and track it from <span STYLE="font-family:Courier;">touchesBegan:</span> through <span STYLE="font-family:Courier;">touchesMoved:</span> and take appropriate action at <span STYLE="font-family:Courier;">touchesEnded:</span>.&nbsp;  This allows us to reliably track the movement of each individual finger through the touch sequence and to respond appropriately to calls when not all of the fingers are represented in the touch set.</p>
<p>&nbsp;<br />
&#8212;&#8212;&#8211;<br />
Technorati Tags:&nbsp; <a href="http://technorati.com/tag/iPhone" rel="tag">iPhone</a>, <a href="http://technorati.com/tag/iPod+Touch" rel="tag">iPod Touch</a>, <a href="http://technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://technorati.com/tag/mobile" rel="tag">mobile</a>, <a href="http://technorati.com/tag/multi-touch" rel="tag">multi-touch</a>, <a href="http://technorati.com/tag/iPuck" rel="tag">iPuck</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.BluMtnWerx.com/blog/2009/06/taming-touch-multi-touch-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
