<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Luke Hatcher's Blog - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-803d0728" type="application/json"/><link>http://lukehatcher.disqus.com/</link><description>None</description><language>en</language><lastBuildDate>Wed, 30 Sep 2009 05:12:43 -0000</lastBuildDate><item><title>Re: Coloring Sprites With Cocos2d-iPhone</title><link>http://lukehatcher.com/2009/04/coloring-sprites-with-cocos2d-iphone/#comment-17832652</link><description>Is there a way to change the color of a sprite that is initiated with a file which has a color allready? For example i have a green png image and i like to change the color to white within the code.  [sprite setColor:ccc3(255,255,255)] does not work.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sybren</dc:creator><pubDate>Wed, 30 Sep 2009 05:12:43 -0000</pubDate></item><item><title>Re: Coloring Sprites With Cocos2d-iPhone</title><link>http://lukehatcher.com/2009/04/coloring-sprites-with-cocos2d-iphone/#comment-16166655</link><description>That looks great, slycrel. I can only imagine the work involved in coloring each of those meeps separately, and that is just the reason I found the tip so useful in the first place. Keep up the good work!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">lukeman</dc:creator><pubDate>Mon, 07 Sep 2009 23:32:48 -0000</pubDate></item><item><title>Re: Coloring Sprites With Cocos2d-iPhone</title><link>http://lukehatcher.com/2009/04/coloring-sprites-with-cocos2d-iphone/#comment-16142818</link><description>I know this is an old post, but I stumbled on this myself a month or so back and it's working out well for me.  See this related post on my blog about what I have done with it:&lt;br&gt;&lt;br&gt;&lt;a href="http://dothemeep.blogspot.com/2009/07/meeps-color.html" rel="nofollow"&gt;http://dothemeep.blogspot.com/2009/07/meeps-col...&lt;/a&gt;&lt;br&gt;&lt;br&gt;I only have one sprite and am using cocos2d for all of the color -- it's great!&lt;br&gt;&lt;br&gt;Thanks!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">slycrel</dc:creator><pubDate>Mon, 07 Sep 2009 22:00:13 -0000</pubDate></item><item><title>Re: Coloring Sprites With Cocos2d-iPhone</title><link>http://lukehatcher.com/2009/04/coloring-sprites-with-cocos2d-iphone/#comment-16048252</link><description>very nice and effective way of laarning from this blog and&lt;br&gt;hence give more example....</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">afzal</dc:creator><pubDate>Sun, 06 Sep 2009 05:39:46 -0000</pubDate></item><item><title>Re: Coloring Sprites With Cocos2d-iPhone</title><link>http://lukehatcher.com/2009/04/coloring-sprites-with-cocos2d-iphone/#comment-16048251</link><description>very nice and effective way of laarning from this blog and&lt;br&gt;hence give more example....</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">afzal</dc:creator><pubDate>Sun, 06 Sep 2009 05:39:44 -0000</pubDate></item><item><title>Re: Store Binary Data in Twitter With Tootfiles</title><link>http://lukehatcher.com/2009/05/storing-binary-data-in-twitter/#comment-15734893</link><description>Good work there sire!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">orta</dc:creator><pubDate>Tue, 01 Sep 2009 17:13:46 -0000</pubDate></item><item><title>Re: Coloring Sprites With Cocos2d-iPhone</title><link>http://lukehatcher.com/2009/04/coloring-sprites-with-cocos2d-iphone/#comment-12032579</link><description>Thank you very much. mister Luke</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sybren</dc:creator><pubDate>Mon, 20 Apr 2009 07:46:57 -0000</pubDate></item><item><title>Re: Coloring Sprites With Cocos2d-iPhone</title><link>http://lukehatcher.com/2009/04/coloring-sprites-with-cocos2d-iphone/#comment-12032578</link><description>Sybren,&lt;br&gt;&lt;br&gt;Some of the API has changed since I built my last project, but the following is one way to do things.&lt;br&gt;&lt;br&gt;First, change `[self addChild...]` from `GameLayer`'s `init` to also assign an integer tag to the sprite:&lt;br&gt;&lt;br&gt;[self addChild:plainSprite z:0 tag:200];&lt;br&gt;&lt;br&gt;To retrieve the sprite somewhere else in your project, you'll need to make a new pointer to the Sprite. Since we added a `tag:` to our Sprite, we can grab it again. Modify `ccTouchesEnded` to look like the following:&lt;br&gt;&lt;br&gt;- (BOOL)ccTouchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {&lt;br&gt;     Sprite *plainSprite = (Sprite*)[self getChildByTag:200];&lt;br&gt;     [plainSprite setRGB:rand()*255 :rand()*255 :rand()*255];&lt;br&gt;     return kEventHandled;&lt;br&gt;   }&lt;br&gt;&lt;br&gt;If you run the project now, you'll see that the leftmost sprite will change to a random color when you click.&lt;br&gt;&lt;br&gt;_Disclaimer: I've yet to look into `AtlasSpriteManager`, which is probably a better way to handle sprites. Also, my use of tagging in this example is suspect, as I just assigned a number (200) to the sprite._&lt;br&gt;&lt;br&gt;Hope that helps!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Luke</dc:creator><pubDate>Fri, 17 Apr 2009 16:26:17 -0000</pubDate></item><item><title>Re: Coloring Sprites With Cocos2d-iPhone</title><link>http://lukehatcher.com/2009/04/coloring-sprites-with-cocos2d-iphone/#comment-12032577</link><description>How do I change the color of the sprite while it is allready displayed on the screen, for example.. make the sprite green when I press a button.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sybren</dc:creator><pubDate>Fri, 17 Apr 2009 06:54:07 -0000</pubDate></item><item><title>Re: touchDefense &amp;#8211; Tower Defense for the iPhone</title><link>http://lukehatcher.com/2008/11/announcing-touchdefense-tower-defense-for-the-iphone/#comment-12032575</link><description>Hi Luke, Nice work on your game, also thanks, as i believe you contributed to the blog on Touch Detection and Sprite Tracking which i found very useful. Best of luck... mike!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MikkiDee</dc:creator><pubDate>Fri, 28 Nov 2008 13:16:52 -0000</pubDate></item><item><title>Re: Thoughts on Version Control</title><link>http://lukehatcher.com/2008/09/thoughts-on-version-control/#comment-12032574</link><description>Yeah, git's success over the other DVCS's so far owes no small part to Github.&lt;br&gt;&lt;br&gt;I've had a similar blog post to this stewing in my head for a while. One additional point that you touched on above: git doesn't make you publish before you're ready. Seems small and petty, but it's huge, especially when you're starting a new project. &lt;br&gt;&lt;br&gt;Look at all of the open source code hosting places. There's a ton of projects that were abandoned long before there were any files released, which frustrates others when they think they've found what they're looking for only to find that there's nothing there. The thing is, in the centralized VCS world, these are the people who are doing it as recommended, they set up a repository and used source control from the beginning. The alternative is to wait until you've got something to show to publish, which is reasonable, but forces you to go without source control until you're ready.&lt;br&gt;&lt;br&gt;Publishing and committing are two distinct operations.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Burns</dc:creator><pubDate>Thu, 13 Nov 2008 10:47:29 -0000</pubDate></item><item><title>Re: Thoughts on Version Control</title><link>http://lukehatcher.com/2008/09/thoughts-on-version-control/#comment-12032573</link><description>Good points.&lt;br&gt;&lt;br&gt;One thing I forgot to mention is the importance of Github in all of this. Without such a snazzy web interface dangling as a tasty looking carrot, I doubt I would have stuck with git through the early troubles I had learning to use a new system. I don't know of anything equivalent in other VCS worlds, although I'm guessing there are a few.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Luke</dc:creator><pubDate>Wed, 12 Nov 2008 17:04:35 -0000</pubDate></item><item><title>Re: Thoughts on Version Control</title><link>http://lukehatcher.com/2008/09/thoughts-on-version-control/#comment-12032572</link><description>For me offline commits were the gateway drug that got my foot into the distributed door, but branching is the thing that has really kept me there. I think the best example of that flexibility is when you are working on the bleeding edge of the code base, and discover that you need to make a small patch to your 1.0 release version. I'm not even quite sure how you'd go around doing that in SVN, but doing it in Git would be nigh trivial, and you wouldn't have to screw around with changing paths or symlinks or anything to accomplish it.&lt;br&gt;&lt;br&gt;That said, I still hate Git some evenings. Although I suspect it's more my fault than Git's.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Larson</dc:creator><pubDate>Wed, 12 Nov 2008 13:18:26 -0000</pubDate></item></channel></rss>