<?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>Lapegna.com &#187; iPhone Dev</title>
	<atom:link href="http://www.lapegna.com/category/iphone-dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lapegna.com</link>
	<description>Thoughts + Ideas + Code from a mobile game dev</description>
	<lastBuildDate>Wed, 02 Nov 2011 13:36:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The App Store is Still a Viable Business Model</title>
		<link>http://www.lapegna.com/2011/10/the-app-store-is-still-a-viable-business-model/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-app-store-is-still-a-viable-business-model</link>
		<comments>http://www.lapegna.com/2011/10/the-app-store-is-still-a-viable-business-model/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 03:02:49 +0000</pubDate>
		<dc:creator>joey</dc:creator>
				<category><![CDATA[Indie dev]]></category>
		<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.lapegna.com/?p=108</guid>
		<description><![CDATA[A lot of information has been released recently that suggests it’s not worth a developers time to make a game for the iOS App Store anymore. Reports that 30% of App Store apps make less than $1000, have scared away many of those gold rushers that had been filling the market for the last few [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.lapegna.com%2F2011%2F10%2Fthe-app-store-is-still-a-viable-business-model%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.lapegna.com%2F2011%2F10%2Fthe-app-store-is-still-a-viable-business-model%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A lot of information has been released recently that suggests it’s not worth a developers time to make a game for the iOS App Store anymore. Reports that 30% of App Store apps make less than $1000, have scared away many of those gold rushers that had been filling the market for the last few years. Unfortunately, the average iOS developer publishes 4.2 apps. As well, more statistics that suggest that 20% of the apps make 97% of the revenue on the app store. There have been 18 billion downloads or 500,000 apps for a total of $3 billion dollars paid.</p>
<p>If I’ve lost you, then here is the information the above statistics suggest:<br />
- 20% of app developers have made an average of $125,000<br />
- 80% of app developers have made an average of $950</p>
<p>As an indie game developer, if our games can pull in an average of $125K, we’re doing alright. We’ll be able to feed our families, enjoy our life and have more opportunities to create the next game that could be our hit. If you have what it takes to create a game better than 80% of the rest of the games on the App Store, then you might have a business case to stay in the App Store for a little longer to hopefully find your hit.</p>
<p>Sources:<br />
30% of apps make less than $1000 &#8211; http://adtmag.com/articles/2011/06/17/mobile-apps-earn-less.aspx</p>
<p>20% of app developers make 97% of the revenue</p>
<p>http://www.gameinformer.com/b/news/archive/2011/09/30/survey-20-percent-of-ios-devs-earn-97-percent-of-app-store-revenue.aspx</p>
<p>Apple has paid $3 billion to developers</p>
<p>http://www.engadget.com/2011/10/04/apples-lets-talk-iphone-keynote-liveblog/</p>
<p>The average Android publisher has brought 6.13 apps to the market, while their iOS counterparts only published 4.21 apps each.</p>
<p>http://creatingapps.telekomaustria.com/500000-apps-android-developers-more-active-than-ios-developers-but-less-strictly-wellbehaved.html</p>
<p>500,000 Apps, 18,000,000,000 App Store Downloads (http://www.tuaw.com/2011/10/04/more-than-18-billion-apps-downloaded-from-app-store/)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lapegna.com/2011/10/the-app-store-is-still-a-viable-business-model/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Powder Monkeys is Available in the App Store</title>
		<link>http://www.lapegna.com/2011/10/powder-monkeys-is-available-in-the-app-store/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=powder-monkeys-is-available-in-the-app-store</link>
		<comments>http://www.lapegna.com/2011/10/powder-monkeys-is-available-in-the-app-store/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 19:26:14 +0000</pubDate>
		<dc:creator>joey</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[xmg]]></category>

		<guid isPermaLink="false">http://www.lapegna.com/?p=112</guid>
		<description><![CDATA[I don&#8217;t usually try to pimp out XMG products from my personal blog, but I believe in this game so much, I really need to get the word out there. We&#8217;ve been hard at work at XMG the past few months polishing off our latest iOS title, Powder Monkeys. Post-apocalyptic monkeys taking the high-seas to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.lapegna.com%2F2011%2F10%2Fpowder-monkeys-is-available-in-the-app-store%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.lapegna.com%2F2011%2F10%2Fpowder-monkeys-is-available-in-the-app-store%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I don&#8217;t usually try to pimp out XMG products from my personal blog, but I believe in this game so much, I really need to get the word out there.</p>
<p>We&#8217;ve been hard at work at XMG the past few months polishing off our latest iOS title, Powder Monkeys. Post-apocalyptic monkeys taking the high-seas to battle against evil highly intelligent bugs with clothes.</p>
<p>Really proud of the team for what we accomplished. We&#8217;ve worked on this game on and off for a year and a half, and some funding from the <a title="OMDC" href="http://www.omdc.on.ca/">OMDC</a> helped us see our dream to completion. We&#8217;re hoping to add so much more gameplay in future updates including new quests and multiplayer. We really can&#8217;t wait for everyone to play it!</p>
<p>One of my favorite features are the random quests that are dynamically generated each time, so you won&#8217;t have to play the same quest twice. Not only that, but they are fun to play every time! The game doesn&#8217;t generate those boring and confusing maps that are apparent in most randomly generated dungeon crawlers. Maybe it&#8217;s the open seas? Maybe it&#8217;s the post-apocalyptic monkeys.</p>
<p>Here&#8217;s the link to the iTunes page and a couple of vids. Thanks!</p>
<p><a title="Powder Monkeys by XMG" href="http://itunes.apple.com/us/app/powder-monkeys/id458092868?mt=8">Powder Monkeys by XMG</a></p>
<p><a href="http://www.youtube.com/watch?v=1Mjtril5A9k">Powder Monkeys Teaser</a><br />
<iframe src="http://www.youtube.com/embed/1Mjtril5A9k" frameborder="0" width="420" height="315"></iframe></p>
<p><a href="http://www.youtube.com/watch?v=y6zaC3k7QSE">Gameplay Trailer</a><br />
<iframe src="http://www.youtube.com/embed/y6zaC3k7QSE" frameborder="0" width="420" height="315"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lapegna.com/2011/10/powder-monkeys-is-available-in-the-app-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone and iPhone 4 Grid Systems</title>
		<link>http://www.lapegna.com/2010/10/iphone-and-iphone-4-grid-systems/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=iphone-and-iphone-4-grid-systems</link>
		<comments>http://www.lapegna.com/2010/10/iphone-and-iphone-4-grid-systems/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 03:26:46 +0000</pubDate>
		<dc:creator>joey</dc:creator>
				<category><![CDATA[iPhone Dev]]></category>

		<guid isPermaLink="false">http://www.lapegna.com/?p=87</guid>
		<description><![CDATA[I&#8217;ve created a couple of Illustrator templates which share a grid for iPhone UI design. Share them with your friends, show them to your family, adore them while sipping hot chai. And, while your at it, you might as well use them to design your next app. Download the Illustrator CS Templates: iPhone-grid-systems-IllustratorCS.zip Here&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F10%2Fiphone-and-iphone-4-grid-systems%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F10%2Fiphone-and-iphone-4-grid-systems%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve created a couple of Illustrator templates which share a grid for iPhone UI design.</p>
<p>Share them with your friends, show them to your family, adore them while sipping hot chai.</p>
<p>And, while your at it, you might as well use them to design your next app.</p>
<p><strong>Download the Illustrator CS Templates:<br />
</strong><a href="http://www.lapegna.com/wp-content/uploads/2010/10/iPhone-grid-systems-IllustratorCS.zip">iPhone-grid-systems-IllustratorCS.zip</a></p>
<p><strong>Here&#8217;s a preview of what&#8217;s in store:</strong></p>
<p>iPhone, 3G, 3GS (320&#215;480)<br />
<a href="http://www.lapegna.com/wp-content/uploads/2010/10/iphone-grid-system.gif"><img class="alignnone size-full wp-image-89" title="iphone-grid-system" src="http://www.lapegna.com/wp-content/uploads/2010/10/iphone-grid-system.gif" alt="" width="320" height="480" /></a></p>
<p>iPhone 4 Retina Display (640&#215;960)<br />
<a href="http://www.lapegna.com/wp-content/uploads/2010/10/iphone-4-retina-grid-system.gif"><img class="alignnone size-full wp-image-90" title="iphone-4-retina-grid-system" src="http://www.lapegna.com/wp-content/uploads/2010/10/iphone-4-retina-grid-system.gif" alt="" width="640" height="960" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lapegna.com/2010/10/iphone-and-iphone-4-grid-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Improving the Quality of iPhone Games and its Marketplace</title>
		<link>http://www.lapegna.com/2010/09/on-improving-the-quality-of-iphone-games-and-its-marketplace/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=on-improving-the-quality-of-iphone-games-and-its-marketplace</link>
		<comments>http://www.lapegna.com/2010/09/on-improving-the-quality-of-iphone-games-and-its-marketplace/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 04:11:19 +0000</pubDate>
		<dc:creator>joey</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Geeky]]></category>
		<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.lapegna.com/?p=80</guid>
		<description><![CDATA[Earlier this week I was able to attend the inexchange 2010 conference. For those who aren&#8217;t familiar with it, its main focus is on interactive and cross media productions in Canada. More specifically, the province of Ontario. With the changes occuring within the gaming industry in the last while, this year featured much talk about [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F09%2Fon-improving-the-quality-of-iphone-games-and-its-marketplace%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F09%2Fon-improving-the-quality-of-iphone-games-and-its-marketplace%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Earlier this week I was able to attend the <a href="http://www.inexchange10.com/" target="_blank">inexchange 2010 conference</a>. For those who aren&#8217;t familiar with it, its main focus is on interactive and cross media productions in Canada. More specifically, the province of Ontario.</p>
<p>With the changes occuring within the gaming industry in the last while, this year featured much talk about mobile gaming and the future of the industry. During a panel titled &#8220;Game Changers&#8221;, discussing the changes in the way players may consume game content, Denis Dyack (of <a href="http://www.siliconknights.com/" target="_blank">Silicon Knights</a>) pointed out the scary fact that the average iPhone game makes only <a href="http://twitter.com/Danielle_1337/status/24498221736" target="_blank">$700 in revenue</a>.</p>
<p>The one discussion I left the conference hungry to discuss is how we can leverage the mobile platform to create great games, now that the hype is dying down. And hopefully, in the process, see some better ROI for the talented content producers.</p>
<p>Although the average game in the AppStore makes $700, I doubt the average great game on the iPhone makes that little profit. There are many factors that go into sales including the problem of visibility in the overcrowded AppStore. But, in the end we must create compelling game experiences if we want to sell our games. The poor quality of games in the AppStore is what is bringing down the marketplace. Even the games released by the big studios, are simply big wastes of money, trying to replicate console style successes on a movie device.</p>
<p>So, here are two ideas on how we can make better mobile games, and improve the mobile gaming marketplace:</p>
<p><strong>1) A Proposal for a new type of mobile game</strong></p>
<p>Mobile gaming is still waiting for it&#8217;s Space Invaders or Super Mario Bros or Doom (do I need to go on?). We are still waiting for that game that shows us that a compelling experience can be had on a mobile device. Although I love it, it is not Angry Birds, nor do I think it&#8217;s Epics Citadel. Or maybe it&#8217;s already out there, just hidden in the AppStore somewhere… I doubt it, but maybe we need an AppStore Palaeontologist, who digs through the masses of bad games to find the one gem we all missed.</p>
<p>Let&#8217;s stop expecting the same formula that has been used on the console games to be applicable in the new mobile marketplace. Let&#8217;s spend time analyzing and researching the game design that works on mobile before we spend time analyzing our poor ROIs. Design, prototype, test, design, prototype, test… it&#8217;s really not a foreign concept to us. But, by the look of the games in the AppStore, this is not being followed well.</p>
<p><strong>2) A Proposal for a New AppStore</strong></p>
<p>Although Apple has been getting some very bad attention because of their &#8220;strict&#8221; developer agreement and &#8220;closed&#8221; development platform. As a developer, I can tell you that their review process is quite lenient. If your app doesn&#8217;t contain anything deemed offensive by Apple or make the iPhone explode (literal read: crash) you can pretty much count on it being accepted into the store.</p>
<p>So, every Joey Developer (including me), who wants to put their game into the AppStore, can. This has been great for innovation. We&#8217;ve seen some incredible art emerging from some talented individuals who would have a hard time getting their work on the PSN or WiiWare. <a href="http://itunes.apple.com/app/passage/id300702040?mt=8" target="_blank">Passage</a> is one that was mentioned at in10 (Its creator, <a href="http://jason.rohrer.usesthis.com/" target="_blank">Jason Rohrer</a> is now working on a Nintendo DS game for Majesco).</p>
<p>But, we have to admit that this has also opened the floodgates to allow a plethora of (sorry to say) crap into the store. As a producer and consumer, I find it far too frustrating to sift through all this poo-poo while trying to find that gem.</p>
<p>This breed of crappy games would never make it to the PSN or Xbox Marketplace or WiiWare, or even Steam. Why? Because they have a more strict selection and review process than Apple. Could that be? Apple? The new chosen army of the Devil has a more lenient review process than our beloved Nintendo? But they don&#8217;t run Flash?</p>
<p>To me, the answer is simple. Create a new Apple game store that requires a game to be (*gasp*) entertaining if it is going to be available in it. If apple is serious in turning the iOS platform into the next mobile game system they need to separate the crap from the gems for us.  A place where specially selected content producers can showcase their products &#8211; ones that meet a higher standard of value.</p>
<p>Let&#8217;s buy some land down the street from the flea market and make a Shopping Mall!!</p>
<p><strong>Next Steps</strong></p>
<p>Smartphones and tablets are here, and they will be in our future for a long time. As game developers, we need to ensure that we are delivering on our promise to the world to create engaging, exciting and fun game experiences to the players, no matter what platform they are on, no matter how much innovation is necessary to do so.</p>
<p>The industry needs to be more active in leading the future of the marketplace by working together with these new platform providers to deliver entertaining content to this market.</p>
<p>I&#8217;m hoping this article will act as my first contribution to this great cause.</p>
<p>If you have a great game in the AppStore that is hidden in crap, I&#8217;d like to hear from you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lapegna.com/2010/09/on-improving-the-quality-of-iphone-games-and-its-marketplace/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ip3 Forum today</title>
		<link>http://www.lapegna.com/2010/06/ip3-forum-today/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ip3-forum-today</link>
		<comments>http://www.lapegna.com/2010/06/ip3-forum-today/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 11:35:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone Dev]]></category>

		<guid isPermaLink="false">http://www.lapegna.com/?p=34</guid>
		<description><![CDATA[On my way to the ip3 Forum today. First event of it&#8217;s kind in Toronto. http://www.interactiveontario.com/ip3]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F06%2Fip3-forum-today%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F06%2Fip3-forum-today%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>On my way to the ip3 Forum today. First event of it&#8217;s kind in Toronto.</p>
<p><a href="http://www.interactiveontario.com/ip3">http://www.interactiveontario.com/ip3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lapegna.com/2010/06/ip3-forum-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert WAV to CAF using terminal</title>
		<link>http://www.lapegna.com/2010/06/convert-wav-to-caf-using-terminal/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=convert-wav-to-caf-using-terminal</link>
		<comments>http://www.lapegna.com/2010/06/convert-wav-to-caf-using-terminal/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 05:50:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.lapegna.com/?p=23</guid>
		<description><![CDATA[Looking for a quick way to convert your audio files for use on iPhone or iPad development? This is right from the Apple developer docs, but I am always looking it up, so here it is: /usr/bin/afconvert -f caff -d LEI16 inputFilename outputFilename]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F06%2Fconvert-wav-to-caf-using-terminal%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F06%2Fconvert-wav-to-caf-using-terminal%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Looking for a quick way to convert your audio files for use on iPhone or iPad development? This is right from the Apple developer docs, but I am always looking it up, so here it is:</p>

<div class="wp_syntax"><div class="code"><pre class="unix" style="font-family:monospace;">/usr/bin/afconvert -f caff -d LEI16 inputFilename outputFilename</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.lapegna.com/2010/06/convert-wav-to-caf-using-terminal/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Simple accelerometer movement with Cocos2d and Chipmunk</title>
		<link>http://www.lapegna.com/2010/06/simple-accelerometer-movement-with-cocos2d-and-chipmunk/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=simple-accelerometer-movement-with-cocos2d-and-chipmunk</link>
		<comments>http://www.lapegna.com/2010/06/simple-accelerometer-movement-with-cocos2d-and-chipmunk/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 05:24:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.lapegna.com/?p=14</guid>
		<description><![CDATA[We all need a quick and easy way to move a body based on accelerometer movement. This method allows quick execution and testing. In this post I&#8217;ll be detailing how to move a cpBody on screen using the accelerometer. I&#8217;m assuming you&#8217;ll make all the connections between your sprite and the cpBody and understand how [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F06%2Fsimple-accelerometer-movement-with-cocos2d-and-chipmunk%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F06%2Fsimple-accelerometer-movement-with-cocos2d-and-chipmunk%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>We all need a quick and easy way to move a body based on accelerometer movement. This method allows quick execution and testing. In this post I&#8217;ll be detailing how to move a cpBody on screen using the accelerometer.</p>
<p>I&#8217;m assuming you&#8217;ll make all the connections between your sprite and the cpBody and understand how to set up a cocos2D and Chipmunk project. If you need help with this check out Alexandre Gomes&#8217; excellent tutorial &#8220;<a href="http://www.alexandre-gomes.com/articles/chipmunk/">An introduction to game physics with Chipmunk</a>&#8220;. Much of the code below is not directly related to the acceleration, while I am not including all the methods required for the class, I like to provide complete methods, so you can see how things will interact.</p>
<p>In this case we&#8217;ll just move a body based on the x (left and right) movement.</p>
<p>1) enable accelerometer in the init method and initialize the acceleration at 0.</p>

<div class="wp_syntax"><div class="code"><pre class="objective-c" style="font-family:monospace;">-(id) init
{
    if( (self=[super init]) ) {
        self.isAccelerometerEnabled = YES;
        accellX = 0; // float defined in header
&nbsp;
        // setup chipmunk
        [self setupChipmunk];
&nbsp;
        // setup your cpShapes, cpBodies and CCSprites here
        // I'll be using spriteBody to these
    }
}</pre></div></div>

<p>2) Setup Chipmunk</p>

<div class="wp_syntax"><div class="code"><pre class="objective-c" style="font-family:monospace;">- (void) setupChipmunk
{
    // start chipmunk
    cpInitChipmunk();
&nbsp;
    // create space object
    space = cpSpaceNew();
&nbsp;
    // define gravity vector - zero gravity here - change the vector to apply gravity
    space-&gt;gravity = cpv(0, -0);
&nbsp;
    // Add some elastic effects to the simulation
    space-&gt;elasticIterations = 20;
&nbsp;
    // Create an update schedule
    [self schedule:@selector(step:)];
}</pre></div></div>

<p>3) Update the current acceleration when an update is received</p>

<div class="wp_syntax"><div class="code"><pre class="objective-c" style="font-family:monospace;">- (void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
{
    // set current acceleration to 10x the current acceleration of the device.
    // change 10 to any number that works for your implementation speed.
    accellX = acceleration.x * 10;
}</pre></div></div>

<p>4) The step function we referred to in #2. This move the cpBody based on the current acceleration as defined in #3. Remember, right now this is x only, I&#8217;ll let you make the connections to get y working.</p>

<div class="wp_syntax"><div class="code"><pre class="objective-c" style="font-family:monospace;">-(void) step: (ccTime) dt
{
    cpSpaceStep(space, dt);
&nbsp;
    // get new x position based on acceleration
    // spriteBody is a cpBody defined in the header file and setup with a shape and sprite in the init
    float newX = spriteBody-&gt;p.x + accellX;
&nbsp;
    // move the sprite body to the new x position
    spriteBody-&gt;p = cpv(newX, spriteBody-&gt;p.y);
&nbsp;
    // call our function for each shape
    cpSpaceHashEach(space-&gt;activeShapes, &amp;amp;updateShape, nil);
}</pre></div></div>

<p>5) Just for completion&#8217;s sake, I&#8217;ll include the method to update the shapes called in the last line of the previous code. None of this effects the acceleration at all&#8230; simply moves the sprite to the position of the shape.</p>

<div class="wp_syntax"><div class="code"><pre class="objective-c" style="font-family:monospace;">void updateShape(void *ptr, void* unused)
{
    cpShape *shape = (cpShape *)ptr; // the shape
    CCSprite *sprite = shape-&gt;data; // the sprite
&nbsp;
    // set the sprite position to the shapes body position
    [sprite setPosition: shape-&gt;body-&gt;p];
}</pre></div></div>

<p>And that&#8217;s it, your body should be moving based on the accelerometer input.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lapegna.com/2010/06/simple-accelerometer-movement-with-cocos2d-and-chipmunk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Xcode &#8211; Base SDK Missing</title>
		<link>http://www.lapegna.com/2010/06/xcode-base-sdk-missing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=xcode-base-sdk-missing</link>
		<comments>http://www.lapegna.com/2010/06/xcode-base-sdk-missing/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 02:52:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.lapegna.com/?p=7</guid>
		<description><![CDATA[Just upgraded to iOS SDK 4 GM release along with Xcode 3.2, so I can test some of my projects on my device. When I opened up the first old project (built for OS 3.2 on XCode 3.1), I received a &#8220;Base SDK Missing&#8221; error in the Device &#124; Debug drop down menu. Clicking the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F06%2Fxcode-base-sdk-missing%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.lapegna.com%2F2010%2F06%2Fxcode-base-sdk-missing%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Just upgraded to iOS SDK 4 GM release along with Xcode 3.2, so I can test some of my projects on my device.</p>
<p>When I opened up the first old project (built for OS 3.2 on XCode 3.1), I received a &#8220;Base SDK Missing&#8221; error in the Device | Debug drop down menu.</p>
<p>Clicking the info icon in the tool bar of the open project allows you to select the &#8220;Base SDK for All Configurations&#8221; drop down. Select your new SDK and voila! You can also change the &#8220;Project Format&#8221; here as well, might be a good idea to select your current Xcode version.</p>
<p>Pretty simple problem and solution, but it seems like developers (like me) are experiencing this every day.</p>
<p>Update 1: Tom has pointed out in the comments, that you can retain compatibility with 3.0 devices if you set the base SDK as 4.0, but set the deployment target as 3.0. Thanks Tom!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lapegna.com/2010/06/xcode-base-sdk-missing/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
	</channel>
</rss>

