<?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>Orange Juice Liberation Front &#187; programming</title>
	<atom:link href="http://orangejuiceliberationfront.com/tag/programming-31/feed/" rel="self" type="application/rss+xml" />
	<link>http://orangejuiceliberationfront.com</link>
	<description>Uli&#039;s citrussy fresh thoughts on technical stuff</description>
	<lastBuildDate>Mon, 13 May 2013 20:59:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to become a games programmer on the Mac</title>
		<link>http://orangejuiceliberationfront.com/how-to-become-a-games-programmer-on-the-mac/</link>
		<comments>http://orangejuiceliberationfront.com/how-to-become-a-games-programmer-on-the-mac/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 13:08:26 +0000</pubDate>
		<dc:creator>uliwitness</dc:creator>
				<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[advice]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[macintosh]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.orangejuiceliberationfront.com/?p=114</guid>
		<description><![CDATA[From the &#8220;when you don&#8217;t have time to blog, drag out an old e-mail and post your side of it&#8221;-department: &#160; How do I find beginners&#8217; tutorials for Mac game programming? In general, for Mac programming you&#8217;ll always find great resources on Scott Stevenson&#8217;s CocoaDevCentral and CocoaBlogs sites. There&#8217;s also the two Mac programming Wikis &#8230;  <a href="http://orangejuiceliberationfront.com/how-to-become-a-games-programmer-on-the-mac/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p><em>From the &#8220;when you don&#8217;t have time to blog, drag out an old e-mail and post your side of it&#8221;-department:</em></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="[A simple computer game called Sterntaler]" src="http://orangejuiceliberationfront.com/wp-content/uploads/2010/11/Screen-shot-2010-11-28-at-19.03.06.png" border="0" alt="[A simple computer game called Sterntaler]" width="480" /><br/>&nbsp;</p>
<h3>How do I find beginners&#8217; tutorials for Mac game programming?</h3>
<p>In general, for Mac programming you&#8217;ll always find great resources on Scott Stevenson&#8217;s <a href="http://cocoadevcentral.com" target="_blank">CocoaDevCentral</a> and <a href="http://cocoablogs.com" target="_blank">CocoaBlogs</a> sites. There&#8217;s also the two Mac programming Wikis <a href="http://cocoadev.com" target="_blank">CocoaDev</a> and <a href="http://carbondev.com" target="_blank">CarbonDev</a>.</p>
<p>For games programming, <a href="http://idevgames.com" target="_blank">iDevGames</a> is supposedly very popular. If you&#8217;re looking to do high-end, high-performance graphics work (i.e. not just the occasional animation), you&#8217;ll probably have to drop down to OpenGL, and for that the ultimate tutorial would be <a href="http://nehe.gamedev.net" target="_blank">The NeHe OpenGL Tutorials</a>, which also comes with info on how to do them on a Mac.</p>
<h3>Would you recommend Cocoa or Carbon for games?</h3>
<p>It depends. If you&#8217;re doing a lot of standard UI, Cocoa is definitely the better choice. If you&#8217;re doing a lot of custom UI, you won&#8217;t be using much of either UI library. Since Apple&#8217;s been frantically trying to saw off the branch on which Carbon sits in recent years, the decision has probably been made for you.</p>
<p>In the end, it again depends on your kind of game. If you&#8217;re doing a board game or another kind of game that only needs 2D graphics (and this includes pre-rendered 3D views, and thus also many isometric game graphics as long as they can&#8217;t be freely rotated), Cocoa&#8217;s NSViews will work.</p>
<p>Carbon has a leg up there with HIViews, because they are actually supported to be drawn overlapping. In Cocoa that works as of Leopard, though it&#8217;s a bunch more complicated. You may have to sort the view list occasionally, or switch on CoreAnimation layers (thus needlessly increasing system requirements to exclude lower-end graphics cards).</p>
<p>If your graphics are fairly simple (e.g. pre-rendered and similar size), you may also want to try using one huge view for all of them, and using the dirty rects (&#8220;update regions&#8221;) passed to you by the OS to selectively redraw only the parts that actually changed. This will give you less built-in behaviour, but will on the other hand forego some of the overhead all the built-in behaviour has.</p>
<p>Otherwise, you&#8217;ll probably be using OpenGL, which means you&#8217;ll probably just create a standard Cocoa app and stuff an NSOpenGLView in its main window, and that&#8217;ll be about all of Cocoa you&#8217;ll find yourself using. The remainder of the display code would probably be C OpenGL calls, maybe wrapped in C++ or Objective C classes for more manageability. If you&#8217;re wondering how you could use C++ in an NSOpenGLView, search the web for &#8220;Objective C++&#8221;, which is a way to use both ObjC and C++ in the same file.</p>
<h3>What about sound?</h3>
<p>For sound-output, Cocoa&#8217;s classes always were a bit rudimentary. Only as of Leopard, they finally allow volume control and specifying a device, making the sound loop and even specifying an output device and a channel mapping. Before that, the Carbon sound manager was close (though it was not quite easy to load sounds other than &#8216;snd &#8216; (.sfil) and AIFF), but most people had to punt and just open an audio-only QuickTime movie and play that, either using NSMovie or later QTMovie. However, for most apps these APIs should be enough to play background music and the occasional sound effect.</p>
<p>If you need Tiger compatibility or anything more complicated, like real ambient sounds, you&#8217;ll probably find yourself dropping down to CoreAudio, which is a horribly complicated API for sound playback (For a taste: One CoreAudio engineer called pausing playback an &#8220;advanced feature&#8221; at a presentation). There&#8217;s an AUFilePlayer that can be made to work if your input is a file and you don&#8217;t need to know when it&#8217;s finished playing, but otherwise you&#8217;ll be in a bit of pain using that.</p>
<p>Alternately, you can leverage open source libraries whose Mac versions were built on top of CoreAudio, like <a href="http://www.openal.org" target="_blank">OpenAL</a>, to retain your sanity.</p>
<p>Any actual game programmers wanna chime in with their suggestions?</p>
]]></content:encoded>
			<wfw:commentRss>http://orangejuiceliberationfront.com/how-to-become-a-games-programmer-on-the-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

 Served from: orangejuiceliberationfront.com @ 2013-05-20 18:29:43 by W3 Total Cache -->