<?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>i’m so full of ideas</title>
	<atom:link href="http://www.platinumball.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.platinumball.net/blog</link>
	<description>blog</description>
	<lastBuildDate>Tue, 15 May 2012 17:40:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Xcode 3 and 4 side by side on Lion</title>
		<link>http://www.platinumball.net/blog/2012/03/19/installing-xcode-3-and-4-side-by-side-on-lion/</link>
		<comments>http://www.platinumball.net/blog/2012/03/19/installing-xcode-3-and-4-side-by-side-on-lion/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 16:59:59 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cocoa]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=377</guid>
		<description><![CDATA[Xcode 4 sucks so, so, bad. It kills my productivity like whoa. As a consequence, I&#8217;ve been doing most of my work in Xcode 3 on Snow Leopard, venturing into Xcode 4 only for testing and final releases. (I am currently working on a code library that&#8217;s used by other iOS programmers, most of whom [...]]]></description>
			<content:encoded><![CDATA[<p>Xcode 4 sucks so, so, bad. It kills my productivity like whoa. As a consequence, I&#8217;ve been doing most of my work in Xcode 3 on Snow Leopard, venturing into Xcode 4 only for testing and final releases. (I am currently working on a code library that&#8217;s used by other iOS programmers, most of whom will be using Xcode 4.)</p>
<p>I know I&#8217;ll have to update to Xcode 4, eventually. I can&#8217;t hold back time forever. But the longer I wait, the more likely it is that Apple will fix all the glaring issues. Until then, I&#8217;m going to cling to Xcode 3 for dear life.</p>
<p>Recently, Apple made things a little more difficult for me by releasing a new version of Xcode 4 that only works on Lion. So I had to update my operating system, finally. But I found a way to install both Xcode 3 and Xcode 4 side by side, without any real problems.</p>
<p>My new Lion setup works better than Snow Leopard did in one significant respect: Xcode 3 is now able to install and debug programs on devices running iOS 5.0 and 5.1, which didn&#8217;t work for me before. I&#8217;m assuming it&#8217;s using device debugging stuff that Xcode 4 installed, but I&#8217;m not sure. I&#8217;m just glad it works, because I use it a lot.</p>
<p>Here&#8217;s the steps I took, which might work for you as well. </p>
<h3>Step 0: Remove all existing Xcode versions</h3>
<p>I&#8217;m assuming you are starting from a fresh install of Lion, which doesn&#8217;t contain any developer tools at all. If not, the instructions given here probably won&#8217;t work. The order of installation is important.</p>
<p>This command should work to uninstall Xcode 3:</p>
<pre>
sudo /Developer/Library/uninstall-devtools –mode=all
</pre>
<p>And this one will uninstall Xcode 4:</p>
<pre>
sudo /Library/Developer/Shared/uninstall-devtools –mode=all
</pre>
<p>… then remove Xcode.app from your /Applications folder.</p>
<h3>Step 1: Install Xcode 3.2.6</h3>
<p>As of this writing, the most recent version of Xcode 3 is still available from Apple&#8217;s developer site. <a href="https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg">Download Xcode 3.2.6</a>, which will require you to log in with your Apple dev credentials.</p>
<p>Alas, Xcode 3 doesn&#8217;t really want to be installed on Lion. No matter, its version checks can be defeated. <a href="http://anatomicwax.tumblr.com/post/8064949186/installing-xcode-3-2-6-on-lion-redux">I found out how to make it work from this link.</a> I&#8217;ll repeat the instructions here, in case that link goes dead:</p>
<p>1. Mount the Xcode 3.2.6 DMG<br />
2. Open Terminal<br />
3. Enter these commands:</p>
<pre>
export COMMAND_LINE_INSTALL=1
open "/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg"
</pre>
<p>&#8230; then run the installation program as usual.</p>
<p>Partway through, the Xcode 3 installer demanded that I shut down iTunes, even though it wasn&#8217;t running. On a hunch, I used Activity Monitor to kill iTunes Helper, and that did indeed make it shut up and finish installing.</p>
<p>If you want to create a link to Xcode 3, the app is installed here by default:</p>
<pre>
/Developer/Applications/Xcode.app
</pre>
<p>Drag it from that location into the Dock or wherever else you&#8217;d like it to be.</p>
<p>After Xcode 3 is installed, you&#8217;ll want to launch it to make sure it really works. On my system, Lion declared that it needed to download a Java runtime before this was possible.</p>
<h3>Step 2: Install Xcode 4.3.1</h3>
<p>Apple has decided to move Xcode 4 into the Mac App Store, so you&#8217;ll have to run the App Store app to download it. It doesn&#8217;t have an installer like earlier Xcode versions, it&#8217;s just a plain old app in your /Applications folder. Start it, and it will declare that it has to install a framework first, so let it do that.</p>
<p>At this point, you&#8217;ve got a cosmetic problem: the Xcode 3 and Xcode 4 icons are identical. <a href="http://iphonedevelopment.blogspot.com/2011/02/xcode-4-icons.html">You can solve that problem by installing Jeff LaMarche&#8217;s replacement icon</a>. He wrote that article for a much older version of Xcode 4, but the replacement worked just fine for me.</p>
<h3>Step 3: Install the command line tools</h3>
<p>Xcode 4 no longer installs command-line tools by default. Assuming you need them, like I do, then you should open the Xcode 4 preferences window, go to the Downloads tab, look for the item labeled &#8220;Command Line Tools,&#8221; and press the Install button. This will take just a few minutes, and the tools will be installed, inside the Xcode 4 application bundle.</p>
<p>The next problem you&#8217;ll discover is that, if you fire up a terminal window and type a command such as <tt>xcodebuild</tt>, you&#8217;ll get the Xcode 3 command line tools by default. That is not what I want. So the next step is to modify your .profile file, or whatever you normally use to control the PATH environment variable, and add these paths near the beginning:</p>
<pre>
/Applications/Xcode.app/Contents/Developer/Tools
/Applications/Xcode.app/Contents/Developer/usr/bin
</pre>
<h3>Step 4: Device debugging</h3>
<p>If you&#8217;re like me, you have a pile of devices you use for testing and debugging. Both Xcode 4 and Xcode 3 are able to install and debug apps on all my devices, which are running versions of iOS from 3.1 to 5.1.</p>
<p>The trick is to start on Xcode 4. Connect your device to the 30-pin connector, open Xcode 4, and look in the Organizer window. If this is the first time you&#8217;ve connected this device, it will ask you if you want to use it for debugging, and it may have to download some files to make that possible. Eventually, the little LED next to the device should turn green. After that, exit Xcode 4, open Xcode 3, and try it there. It looks like Xcode 3 copies some files from wherever Xcode 4 stashed them, and then it&#8217;s off to the races.</p>
<h3>Aftermath</h3>
<p>I&#8217;ve been using this setup for a number of months now. What I&#8217;ve discovered is that Xcode 3 is unfortunately pretty crippled when run on Lion. Debugging via GDB is impossible. Source code windows often have bogus titles applied. Various other cosmetic bugs abound. In short, Xcode 3 is not nearly as pleasant to use as it was on Snow Leopard. But it&#8217;s still better than Xcode 4, for the most part, in my opinion. So I soldier on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2012/03/19/installing-xcode-3-and-4-side-by-side-on-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Game Center support is complete</title>
		<link>http://www.platinumball.net/blog/2011/06/24/game-center-support-is-complete/</link>
		<comments>http://www.platinumball.net/blog/2011/06/24/game-center-support-is-complete/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 03:38:29 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cards]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=375</guid>
		<description><![CDATA[Hearts Net version 4.0.6 is now available for download on the App Store.
Game Center multiplayer games turned out to be a lot of work. While I was in there messing with the network code, I also added Bluetooth support. This is probably the most work I&#8217;ve done for any release of the game to date.
If [...]]]></description>
			<content:encoded><![CDATA[<p>Hearts Net version 4.0.6 is now available for download on the App Store.</p>
<p>Game Center multiplayer games turned out to be a lot of work. While I was in there messing with the network code, I also added Bluetooth support. This is probably the most work I&#8217;ve done for any release of the game to date.</p>
<p>If you like to play via the intertubes, feel free to add me as a Game Center friend. My alias: allen.brunson</p>
<p>Incidentally, I also fixed that suspend/resume problem that some people were having.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2011/06/24/game-center-support-is-complete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hearts Net and Game Center</title>
		<link>http://www.platinumball.net/blog/2011/05/03/hearts-net-and-game-center/</link>
		<comments>http://www.platinumball.net/blog/2011/05/03/hearts-net-and-game-center/#comments</comments>
		<pubDate>Wed, 04 May 2011 00:03:05 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cards]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=371</guid>
		<description><![CDATA[Game Center integration, and by extension, multiplayer games across the worldwide internet, is taking a lot longer than expected. For one thing, I discovered the hard way that it is impossible to test without two physical devices. I was able to test WiFi multiplayer games using only my Mac and a real iPhone, but that [...]]]></description>
			<content:encoded><![CDATA[<p>Game Center integration, and by extension, multiplayer games across the worldwide internet, is taking a lot longer than expected. For one thing, I discovered the hard way that it is impossible to test without two physical devices. I was able to test WiFi multiplayer games using only my Mac and a real iPhone, but that doesn&#8217;t work in this case. I only have one iPhone capable of using Game Center, so I had to order an iPad, which has not yet arrived. But I&#8217;m pretty close to finished now, no kidding. While I&#8217;m in there mucking with the network transport, I decided to add Bluetooth support as well, so that local multiplayer games will not require a WiFi connection.</p>
<p>This hasn&#8217;t worked really well in the past, but I&#8217;ll try again: Is there anybody out there who would like to help beta test? You could be the very first person to play an internet-wide game of Hearts Net.</p>
<p>Note that being a beta tester requires a fair amount of technical sophistication. Despite recent progress, such as <a href="http://testflightapp.com/">TestFlight</a>, installing beta apps is still sometimes frustrating. And if you are not able to clearly articulate how and why things are going wrong, then you won&#8217;t be of any use to me.</p>
<p>And now, here&#8217;s a little bonus for the three people who read my blog: promo codes for Hearts Net. <a href="http://support.apple.com/kb/ht1574">For those who haven&#8217;t done so before, here are instructions for redeeming promo codes</a>. That article is specifically about iTunes gift cards, but you can do the same thing with promo codes.</p>
<p>I was reluctant to give these out for a long time. But Apple recently changed their rules: people who download apps with promo codes cannot write reviews. This prevents people still upset about my neutering Hearts Solo, over a year ago, from using the codes for no reason other than leaving malicious, hateful reviews. Incredibly, there are people out there with nothing better to do than still be angry about that. For the rest of you: Bon appetit!</p>
<p>HXY3HN7HA479<br />
PYWY9PEEYNLT<br />
NAW43HALXME6<br />
Y7F6H93MEHJX<br />
WFKLJPYL9KRL</p>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2011/05/03/hearts-net-and-game-center/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hearts Net progress</title>
		<link>http://www.platinumball.net/blog/2011/03/29/hearts-net-progress/</link>
		<comments>http://www.platinumball.net/blog/2011/03/29/hearts-net-progress/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 08:41:29 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cards]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=368</guid>
		<description><![CDATA[Well, dang. Quite a few of you have emailed to let me know that I have once again reintroduced the &#8220;shy robot&#8221; bug.
Some players have reported that when the game is interrupted in some way and they come back to it, the robots won&#8217;t play anymore. Here&#8217;s a simple workaround. Press the home button, which [...]]]></description>
			<content:encoded><![CDATA[<p>Well, dang. Quite a few of you have emailed to let me know that I have once again reintroduced the &#8220;shy robot&#8221; bug.</p>
<p>Some players have reported that when the game is interrupted in some way and they come back to it, the robots won&#8217;t play anymore. Here&#8217;s a simple workaround. Press the home button, which will take you back to the iOS home screen. Then press the game&#8217;s icon to restart it. Problem solved.</p>
<p>This has to do with the new multitasking features found in iOS 4.0 and later, which I did not test thoroughly enough. In my defense, this bug has an entirely different root cause than the last time I had a &#8220;shy robot&#8221; problem, so this is not strictly a regression.</p>
<p>Thanks to the help of an intrepid beta tester, I found and fixed this bug, and also devised the workaround. I would submit a new version of the app to Apple, but I am right in the middle of futzing with the multiplayer networking code, which is at the moment completely broken. So I think I&#8217;m going to wait until I get the whole thing finished, and submit a new version at that point.</p>
<p>Keep those emails coming. I read all of them, and respond to most. It was because of all the emails I got that I knew about the scope of this most recent &#8220;shy robot&#8221; problem. In the few cases where I don&#8217;t respond, it&#8217;s because the author was either incoherent, rude, or both. Sorry, but the measly few bucks you spent on the game is not sufficient motivation for me to put up with abuse.</p>
<p>Thanks to everyone who has stuck with me for all this time. I am amazed that the game is still selling pretty well, despite being in the store for more than a year. Evidence suggests that most iOS games tend to peak early and fizzle off to nothing soon after, but that&#8217;s not the case here. It looks to me like I&#8217;ve got a lot of old-timers who have been playing my Hearts game pretty solidly for quite a few months. I&#8217;m still working on improving it, albeit slowly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2011/03/29/hearts-net-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hearts 3.1.0</title>
		<link>http://www.platinumball.net/blog/2011/02/17/hearts-3-1-0/</link>
		<comments>http://www.platinumball.net/blog/2011/02/17/hearts-3-1-0/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 07:37:40 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cards]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=366</guid>
		<description><![CDATA[After a week of waiting in the approval queue, Apple has finally put my new versions of Hearts Solo and Hearts Net into the store.
Alas, this is version does not yet include Game Center integration. This just fixes some graphics glitches, and updates the artwork so it doesn&#8217;t look quite so horrible on the iPhone [...]]]></description>
			<content:encoded><![CDATA[<p>After a week of waiting in the approval queue, Apple has <i>finally</i> put my new versions of Hearts Solo and Hearts Net into the store.</p>
<p>Alas, this is version does not yet include Game Center integration. This just fixes some graphics glitches, and updates the artwork so it doesn&#8217;t look quite so horrible on the iPhone 4&#8217;s retina display.</p>
<p>I had hoped to have a new high-res version of all the card face graphics, but the ones I&#8217;ve included here are just the old card graphics run through ImageMagick, which hopefully defeats the jaggies a little bit. I contacted a couple of graphics artists about drawing me a new set of cards, but they all wanted more money than I can afford for the job. If one of you enterprising readers thinks you could draw me a new card deck for, say, 600 bucks or less, I&#8217;d love to hear from you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2011/02/17/hearts-3-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UIButton graphics highlighting</title>
		<link>http://www.platinumball.net/blog/2011/01/31/uibutton-graphics-highlighting/</link>
		<comments>http://www.platinumball.net/blog/2011/01/31/uibutton-graphics-highlighting/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 12:54:43 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cocoa]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=356</guid>
		<description><![CDATA[I have often tried to create a UIButton subclass to do something special, like draw a shadow, but couldn&#8217;t make it work. You can&#8217;t just override UIView&#8217;s drawRect: method and get the results you expect. My usual response to that is: Fine, I&#8217;ll make my button a subclass of UIControl, then.
That leaves the problem of [...]]]></description>
			<content:encoded><![CDATA[<p>I have often tried to create a UIButton subclass to do something special, like draw a shadow, but couldn&#8217;t make it work. You can&#8217;t just override UIView&#8217;s <tt>drawRect:</tt> method and get the results you expect. My usual response to that is: Fine, I&#8217;ll make my button a subclass of UIControl, then.</p>
<p>That leaves the problem of how to highlight the button&#8217;s image when it is pressed. UIButton does a great job of this, drawing a black mask on top of the button&#8217;s image, ignoring any transparent pixels. I&#8217;ve been trying to figure out how to reproduce that effect for probably a year, I suspect, without success.</p>
<p>CoreGraphics is powerful. There&#8217;s pretty much nothing it can&#8217;t do. But it&#8217;s not exactly easy to work with. I have finally read enough of other people&#8217;s blog posts so that I can cobble together a solution. I&#8217;ve included a function below that inputs a UIImage object and outputs a new UIImage with a black mask drawn over it, exactly the same effect that UIButton uses.</p>
<div class="wp-caption alignleft" style="width: 251px"><a href="http://www.platinumball.net/blog/graphics/uibutton_highlight.png"><img title="UIButton highlighting" src="http://www.platinumball.net/blog/graphics/uibutton_highlight.png" alt="" width="241" height="92" /></a><p class="wp-caption-text">UIButton highlighting</p></div>
<p>I&#8217;ve included a screen-shot from the simulator to show what the effect looks like. On the left, you&#8217;ll see an image that is similar to the icon for the Calendar program on the iPhone. Next is that same image, highlighted by UIButton. The third image is highlighted with the function shown below. The two highlighted versions are almost exactly the same. You can tell the difference with a color-dropper tool, but I doubt you could tell them apart with the naked eye.</p>
<p>I know I pretty much never use code from other people&#8217;s blog posts without modifying it to suit my own uses. Assuming you&#8217;re like that as well, here&#8217;s some notes that will help you understand the code better.</p>
<p>The alpha value for the black mask, 0.46, was chosen because it produces results nearly identical to what UIButton does. You can make that number bigger or smaller for a lighter or darker mask.</p>
<p><tt>UIGraphicsBeginImageContextWithOptions()</tt> is the best function to use to begin an image context. It will get you high-resolution graphics on the iPhone 4&#8217;s &#8220;retina display.&#8221; But that function does not exist on older versions of iOS. Therefore, we test for its existence before calling it, by checking to see if its function pointer is NULL. If so, we fall back to the older method that&#8217;s been available since the earliest iOS versions. If you don&#8217;t plan to support versions of iOS earlier than 4.0, then you can omit the availability test.</p>
<p>There are a couple of lines of code that transform the coordinates normally used by CoreGraphics functions to those normally used by UIKit objects. Without those two lines, the black mask would be drawn upside-down. I don&#8217;t understand this business very well. I just know the function fails without them.</p>
<p>The secret sauce is <tt>CGContextClipToMask()</tt>. It was easy to figure out how to draw a colored mask over an existing image, but you need this extra step to prevent the mask from being drawn over transparent pixels.</p>
<pre>
<div class="codesnip-container" >
<div class="objc codesnip" style="font-family:monospace;">UIImage<span class="sy0">*</span> WBHighlightImage<span class="br0">&#40;</span>UIImage<span class="sy0">*</span> image<span class="br0">&#41;</span>
<span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="kw4">const</span> CGSize &nbsp;size <span class="sy0">=</span> image.size;
&nbsp; &nbsp; <span class="kw4">const</span> CGRect &nbsp;bnds <span class="sy0">=</span> CGRectMake<span class="br0">&#40;</span>0.0, 0.0, size.width, size.height<span class="br0">&#41;</span>;
&nbsp; &nbsp; UIColor<span class="sy0">*</span> &nbsp; &nbsp; &nbsp;colr <span class="sy0">=</span> <span class="kw2">nil</span>;
&nbsp; &nbsp; UIImage<span class="sy0">*</span> &nbsp; &nbsp; &nbsp;copy <span class="sy0">=</span> <span class="kw2">nil</span>;
&nbsp; &nbsp; CGContextRef &nbsp;ctxt <span class="sy0">=</span> <span class="kw2">NULL</span>;
&nbsp; &nbsp; 
&nbsp; &nbsp; <span class="co2">// this is the mask color</span>
&nbsp; &nbsp; colr <span class="sy0">=</span> <span class="br0">&#91;</span><span class="br0">&#91;</span><span class="br0">&#91;</span>UIColor alloc<span class="br0">&#93;</span> initWithWhite<span class="sy0">:</span>0 alpha<span class="sy0">:</span>0.46<span class="br0">&#93;</span> autorelease<span class="br0">&#93;</span>;

&nbsp; &nbsp; <span class="co2">// begin image context</span>
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>UIGraphicsBeginImageContextWithOptions <span class="sy0">==</span> <span class="kw2">NULL</span><span class="br0">&#41;</span>
&nbsp; &nbsp; <span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; UIGraphicsBeginImageContext<span class="br0">&#40;</span>bnds.size<span class="br0">&#41;</span>;
&nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp; &nbsp; <span class="kw1">else</span>
&nbsp; &nbsp; <span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; UIGraphicsBeginImageContextWithOptions<span class="br0">&#40;</span>bnds.size, FALSE, 0.0<span class="br0">&#41;</span>;
&nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp; &nbsp; ctxt <span class="sy0">=</span> UIGraphicsGetCurrentContext<span class="br0">&#40;</span><span class="br0">&#41;</span>;
&nbsp; &nbsp; 
&nbsp; &nbsp; <span class="co2">// transform CG* coords to UI* coords</span>
&nbsp; &nbsp; CGContextTranslateCTM<span class="br0">&#40;</span>ctxt, 0.0, bnds.size.height<span class="br0">&#41;</span>;
&nbsp; &nbsp; CGContextScaleCTM<span class="br0">&#40;</span>ctxt, 1.0, <span class="sy0">-</span>1.0<span class="br0">&#41;</span>;

&nbsp; &nbsp; <span class="co2">// draw original image</span>
&nbsp; &nbsp; CGContextDrawImage<span class="br0">&#40;</span>ctxt, bnds, image.CGImage<span class="br0">&#41;</span>;
&nbsp; &nbsp; 
&nbsp; &nbsp; <span class="co2">// draw highlight overlay</span>
&nbsp; &nbsp; CGContextClipToMask<span class="br0">&#40;</span>ctxt, bnds, image.CGImage<span class="br0">&#41;</span>;
&nbsp; &nbsp; CGContextSetFillColorWithColor<span class="br0">&#40;</span>ctxt, colr.CGColor<span class="br0">&#41;</span>;
&nbsp; &nbsp; CGContextFillRect<span class="br0">&#40;</span>ctxt, bnds<span class="br0">&#41;</span>;

&nbsp; &nbsp; <span class="co2">// finish image context</span>
&nbsp; &nbsp; copy <span class="sy0">=</span> UIGraphicsGetImageFromCurrentImageContext<span class="br0">&#40;</span><span class="br0">&#41;</span>;
&nbsp; &nbsp; UIGraphicsEndImageContext<span class="br0">&#40;</span><span class="br0">&#41;</span>;
&nbsp; &nbsp; 
&nbsp; &nbsp; <span class="kw1">return</span> copy;
<span class="br0">&#125;</span></div>
</div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2011/01/31/uibutton-graphics-highlighting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>i&#8217;m a bad parent</title>
		<link>http://www.platinumball.net/blog/2010/09/07/im-a-bad-parent/</link>
		<comments>http://www.platinumball.net/blog/2010/09/07/im-a-bad-parent/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 05:15:54 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cards]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=350</guid>
		<description><![CDATA[Hey folks! Long time no see! Sorry about my long absence. I started a new job and they are running me ragged. I work on a big complicated iPhone app during the day, so I don&#8217;t feel super inclined to work on yet another iPhone app on nights and weekends.
What makes me feel extra sucky [...]]]></description>
			<content:encoded><![CDATA[<p>Hey folks! Long time no see! Sorry about my long absence. I started a new job and they are running me ragged. I work on a big complicated iPhone app during the day, so I don&#8217;t feel super inclined to work on yet another iPhone app on nights and weekends.</p>
<p>What makes me feel extra sucky about all this is that the money I have been making from Hearts Net has been steadily growing, despite my neglect. I&#8217;m not going to quote actual numbers, because that would sound like bragging, but. Pretty close to covering my rent every month. That&#8217;s substantial. So I feel like I owe something to you fine folks for stuffing so much money in my pockets, and I am forever planning to get a new version into the store, but I haven&#8217;t done so yet. Boy, do I suck.</p>
<p>I&#8217;ll tell you what I&#8217;ve been up to, though. I&#8217;ve mostly got the game updated for iPhone4. I know the current graphics look bad on a Retina Display, so I&#8217;ve fixed most of them. I don&#8217;t think I&#8217;m going to be able to update the card faces, though. I&#8217;ve explored various avenues, and I don&#8217;t see how I can get decent high-res cards without paying at least a thousand bucks. That&#8217;s steep, even given the substantial amount of money I&#8217;m making from the game. If any of you out there are graphics pros, and you can find a way to get me high-res playing card graphics for 500 bucks or less, I am all ears. Doesn&#8217;t have to be exclusive card graphics, either. If you sold them non-exclusively to somebody else first, I&#8217;m cool with that.</p>
<p>I have been reading about Apple&#8217;s new Game Center feature with interest. I&#8217;ve so far avoided adding across-the-internet play, because that would involve running my own server, and I don&#8217;t want to do that. It&#8217;s an ongoing expense, I would have to police the server for abuse, I would be the system administrator, and so on. But it looks like Apple is willing to do all that for me, including passing network messages between players. If that&#8217;s true, Game Center would save me a great deal of time, money, and grief, so I will be using it.</p>
<p>Finally, here&#8217;s a very nice video review that this guy did for my game: <a href="http://www.youtube.com/watch?v=ZylhBJVi5dk">ThatSnazzyiPhoneGuy reviews Hearts Net</a>. I&#8217;ve been aware of this for months. In fact, I even gave this guy a promo code for the game. But I just couldn&#8217;t watch it. My feeling is: hey, I know which parts of my game suck, I don&#8217;t need other people to tell me that. My friend Steph said it was a very positive review, but I still never got around to watching it, until tonight. She&#8217;s right, it&#8217;s very positive. The review was worth the promo code (heh).</p>
<p>Here&#8217;s some answers to the review. He seems to imply that you need a network connection to read the game&#8217;s help text. Not true! The HTML help files are stored locally in the app. Also, he wonders why I added the AutoPlay feature. The reason is that it makes the game a whole lot easier to test. Notice all the times he has to stop concentrating on what he&#8217;s talking about to play a card and keep the review going? Now imagine me, by myself, trying to test millions of card plays in network games.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2010/09/07/im-a-bad-parent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ongoing</title>
		<link>http://www.platinumball.net/blog/2010/05/26/ongoing/</link>
		<comments>http://www.platinumball.net/blog/2010/05/26/ongoing/#comments</comments>
		<pubDate>Wed, 26 May 2010 17:16:06 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cards]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=347</guid>
		<description><![CDATA[Apple just gave me a little over 500 bucks for a month of Hearts Net sales. That seems pretty good to me. Plenty good enough to keep maintaining it. It appears that the iPad version of the program has boosted sales a bit.
So, I&#8217;ll be working on new features and more devious player robots in [...]]]></description>
			<content:encoded><![CDATA[<p>Apple just gave me a little over 500 bucks for a month of Hearts Net sales. That seems pretty good to me. Plenty good enough to keep maintaining it. It appears that the iPad version of the program has boosted sales a bit.</p>
<p>So, I&#8217;ll be working on new features and more devious player robots in the future. Might not be for awhile, because I recently started a new full-time job which is taking most of my time. But the game is still very much on the list of my current projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2010/05/26/ongoing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hearts Solo 3.0.0</title>
		<link>http://www.platinumball.net/blog/2010/04/05/hearts-solo-3-0-0/</link>
		<comments>http://www.platinumball.net/blog/2010/04/05/hearts-solo-3-0-0/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 19:05:20 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cards]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=344</guid>
		<description><![CDATA[A new version of Hearts Solo is available today. This one has all the latest stuff I&#8217;ve added to Hearts Net, including the theme selection feature, and native iPad support.
You still can&#8217;t play a game all the way through, though. This app is just a no-cost way to preview the features available in Hearts Net.
]]></description>
			<content:encoded><![CDATA[<p>A new version of Hearts Solo is available today. This one has all the latest stuff I&#8217;ve added to Hearts Net, including the theme selection feature, and native iPad support.</p>
<p>You still can&#8217;t play a game all the way through, though. This app is just a no-cost way to preview the features available in Hearts Net.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2010/04/05/hearts-solo-3-0-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hearts Net 3.0.0 for iPad!</title>
		<link>http://www.platinumball.net/blog/2010/04/01/hearts-net-3-0-0-for-ipad/</link>
		<comments>http://www.platinumball.net/blog/2010/04/01/hearts-net-3-0-0-for-ipad/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 00:46:16 +0000</pubDate>
		<dc:creator>allen</dc:creator>
				<category><![CDATA[cards]]></category>

		<guid isPermaLink="false">http://www.platinumball.net/blog/?p=341</guid>
		<description><![CDATA[Well! I am as surprised as anyone that I have managed to jump through Apple&#8217;s series of fiery hoops and get the iPad version of my game into the App Store. And it&#8217;s still two days before normal humans will be able to get their hands on actual iPads. This version runs on iPhones and [...]]]></description>
			<content:encoded><![CDATA[<p>Well! I am as surprised as anyone that I have managed to jump through Apple&#8217;s series of fiery hoops and get the iPad version of my game into the App Store. And it&#8217;s still two days before normal humans will be able to get their hands on actual iPads. This version runs on iPhones and iPod Touch devices as well.</p>
<p>I&#8217;ve made yet another attempt to fix the two big bugs people have been reporting, and I have reason to believe I actually got them this time. So, everybody upgrade, and let me know how it works out.</p>
<p>Pretty soon I&#8217;ll be releasing a new version of Hearts Solo that is also iPad-capable. It still won&#8217;t let you get all the way through a game though, sorry. It&#8217;s just for demonstration purposes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.platinumball.net/blog/2010/04/01/hearts-net-3-0-0-for-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

