<?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>Logical Shift &#187; CocoaGlk</title>
	<atom:link href="http://logicalshift.co.uk/rotate/category/if/cocoaglk/feed/" rel="self" type="application/rss+xml" />
	<link>http://logicalshift.co.uk/rotate</link>
	<description></description>
	<lastBuildDate>Tue, 02 Jun 2009 19:32:43 +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>CocoaGlk 1.0.7 has been released</title>
		<link>http://logicalshift.co.uk/rotate/2009/06/02/cocoaglk-107-has-been-released/</link>
		<comments>http://logicalshift.co.uk/rotate/2009/06/02/cocoaglk-107-has-been-released/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 07:36:05 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[CocoaGlk]]></category>

		<guid isPermaLink="false">http://logicalshift.co.uk/rotate/?p=39</guid>
		<description><![CDATA[To go along with the release of Zoom 1.1.4, I&#8217;ve released a new version of CocoaGlk, version 1.0.7. This contains many bug fixes over the previous release and can be downloaded from its Google Code page here.
]]></description>
			<content:encoded><![CDATA[<p>To go along with the release of Zoom 1.1.4, I&#8217;ve released a new version of CocoaGlk, version 1.0.7. This contains many bug fixes over the previous release and can be downloaded from its Google Code page <a href="http://code.google.com/p/cocoaglk/downloads/list">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://logicalshift.co.uk/rotate/2009/06/02/cocoaglk-107-has-been-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Challenges for iPhone CocoaGlk</title>
		<link>http://logicalshift.co.uk/rotate/2008/03/11/challenges-for-iphone-cocoaglk/</link>
		<comments>http://logicalshift.co.uk/rotate/2008/03/11/challenges-for-iphone-cocoaglk/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 00:18:49 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[CocoaGlk]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://logicalshift.co.uk/rotate/2008/03/11/challenges-for-iphone-cocoaglk/</guid>
		<description><![CDATA[Development so far has actually been quite quick as I&#8217;ve been focusing on the things that are the same on the iPhone as on desktop OS X. Eventually, I&#8217;m going to need to address the differences, though.
Technical
Synchronisation
Something I would really like to implement is the ability to synchronise with Zoom running on a Mac, so [...]]]></description>
			<content:encoded><![CDATA[<p>Development so far has actually been quite quick as I&#8217;ve been focusing on the things that are the same on the iPhone as on desktop OS X. Eventually, I&#8217;m going to need to address the differences, though.</p>
<h3>Technical</h3>
<h4>Synchronisation</h4>
<p>Something I would really like to implement is the ability to synchronise with Zoom running on a Mac, so when you plug your iPhone in, all your latest saved games are copied between the two applications, and any story files that you&#8217;ve selected get copied onto the phone.</p>
<p>Synchronising over wifi is possible, I suppose, but it would be nicer to have iTunes do it for you when you plug your phone in.</p>
<h4>Obtaining games</h4>
<p>I haven&#8217;t decided on the methods for obtaining stories yet. I think that this should be reasonably easy: provide an interface to the IFDB that works when the phone has a wifi connection. Synchronisation would be nice, but it can&#8217;t be the only way that stories are put onto the phone, because PC users would be left out in the cold.</p>
<h4>Auto-save</h4>
<p>Interpreters running on the iPhone are really going to need this. I doubt users would appreciate a &#8216;are you sure&#8217; dialog when you hit the home button and losing game state just because a phone call has arrived is really poor form.</p>
<p>Zoom supports this, so this should be easy for Z-Code. glulx doesn&#8217;t, though: I&#8217;ll have a look at hacking this into the interpreter, but it really needs to be a part of the specification for any  IF interpreter (even on the desktop)</p>
<h3>Licensing</h3>
<p>CocoaGlk is currently licensed under the LGPL and distributed as a framework. This isn&#8217;t appropriate for the iPhone, as there&#8217;s no such thing as a framework and the LGPL requires things that are statically linked to be under the LGPL as well. That means almost no interpreters as many are under incompatible licenses.</p>
<p>The solution is to change the license to one that is less restrictive: probably the MIT or modified BSD license.</p>
<p>A more serious issue is that Apple&#8217;s SDK license prohibits downloading code to interpret: this means that it would be impossible to load any games that were not bundled with the interpreter. I think this is probably a fatal problem: it seems doubtful that many IF authors will be willing to pay the $99 required to get their work onto the iPhone &#8211; plus it would mean no Zork, ever.</p>
<h3>User Interface</h3>
<p>I haven&#8217;t really decided on how the UI should work. The basic functionality should be pretty simple, but there are a few issues new to running on a small display:</p>
<h4>Complex graphics</h4>
<p>Games like moments out of time use a complex window layout that won&#8217;t work too well if we use a large enough font to be legible when everything is on screen. So, it would seem sensible to have a Safari-like ability to zoom in and out.</p>
<p>However, games with a more traditional layout won&#8217;t really benefit from this, so we&#8217;re going to need to be clever and detect when we need to have a zooming display and when a simple, more legible, display is useful &#8211; some experimentation is required! The initial version will go for the &#8216;big but simple&#8217; approach, which should work with the majority of IF games that are out there, but I&#8217;m not going to be satisfied until games like City of Secrets and Moments Out of Time run and look good.</p>
<h4>Text entry</h4>
<p>This is pretty crucial to get right. The iPhone keyboard isn&#8217;t ideal for typing lots of stuff in, so CocoaGlk is going to need to help out. Luckily, I can borrow ideas liberally from the Palm interpreters that already exist:</p>
<ul>
<li>Tapping on a word in a text window should insert it as input (with an animation + a quick way of undoing accidental taps)</li>
<li>Tap + hold on the center of the display should pop up a compass rose. Dragging in a direction will enter that direction as a command.</li>
<li>If possible, I&#8217;d like any words the game prints that don&#8217;t exist in the autocompletion dictionary to be added, at least for as long as CocoaGlk is running: that should make typing those made up magic words a lot easier.</li>
<li>There also needs to be a way of getting a list of common verbs. I&#8217;m thinking that if a tap+hold on the center brings up a compass, one on the right side of the screen should bring up the verb list &#8211; drag to select a verb (the verb under where the user taps would be blank to avoid accidental input)</li>
<li>Possibly the tap+hold gestures should be duplicated in a toolbar along the bottom of the screen (or only done that way if it works better)</li>
</ul>
<p>There&#8217;s a tap+hold gesture on the left hand side that&#8217;s not being used in this scheme, so if someone thinks of some other useful shortcut, that could go there. The reason for using a tap+hold to bring up shortcuts is that dragging is more sensibly used to scroll around the game output.</p>
<hr />That&#8217;s it for now.. I&#8217;ll try to get something more exciting for the next screenshot. Honest.</p>
]]></content:encoded>
			<wfw:commentRss>http://logicalshift.co.uk/rotate/2008/03/11/challenges-for-iphone-cocoaglk/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>IF and the iPhone</title>
		<link>http://logicalshift.co.uk/rotate/2008/03/07/if-and-the-iphone/</link>
		<comments>http://logicalshift.co.uk/rotate/2008/03/07/if-and-the-iphone/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 23:26:38 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[CocoaGlk]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://logicalshift.co.uk/rotate/2008/03/07/if-and-the-iphone/</guid>
		<description><![CDATA[So, Apple have (finally) released the iPhone SDK today. developer.apple.com is apparently too busy celebrating this momentous occasion to actually bother to respond to any http requests so I haven&#8217;t had a chance to look at the SDK yet.
Even so, I plan to port CocoaGlk as soon as I get my hands on it, at [...]]]></description>
			<content:encoded><![CDATA[<p>So, Apple have (finally) <a href="http://arstechnica.com/news.ars/post/20080306-apple-iphone-announcements.html">released</a> the iPhone SDK today. developer.apple.com is apparently too busy celebrating this momentous occasion to actually bother to respond to any http requests so I haven&#8217;t had a chance to look at the SDK yet.</p>
<p>Even so, I plan to port CocoaGlk as soon as I get my hands on it, at least assuming the requirements for distributing free software aren&#8217;t too onerous. $99 for a key doesn&#8217;t sound too bad to me, anyway.</p>
<p>I&#8217;m not entirely sure what to expect; I haven&#8217;t played around with jailbreaking my iPhone, so I&#8217;ll be going in blind. What I think is likely, however, is that half of CocoaGlk will port just fine: that is, the GlkClient framework that interfaces with the interpreters. What is less certain is how well the UI half will port: that is, GlkView. If NSTextView is ported, and the typesetter behaves the same way, then it&#8217;s going to be really easy to get the UI working in some manner, and probably not that hard to support all the features of blorb.</p>
<p>Getting games onto the phone is also a bit of a challenge. I think that taking some of Zoom&#8217;s existing inventory management and connecting to <a href="http://ifdb.tads.org/">IFDB</a> might be a good idea.</p>
<p>I&#8217;ll post a beta when I get things working: I imagine a glulx or frotz-based interpreter is likely to be released first. I&#8217;ve been thinking about doing something with LLVM to JIT games; something that would be a curiosity on the fast machines that CocoaGlk runs on at the moment, but which could be vital to running games on the much slower iPhone.</p>
]]></content:encoded>
			<wfw:commentRss>http://logicalshift.co.uk/rotate/2008/03/07/if-and-the-iphone/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>GlkTerm 1.0.3</title>
		<link>http://logicalshift.co.uk/rotate/2007/08/04/glkterm103/</link>
		<comments>http://logicalshift.co.uk/rotate/2007/08/04/glkterm103/#comments</comments>
		<pubDate>Sat, 04 Aug 2007 15:55:08 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[CocoaGlk]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://logicalshift.co.uk/rotate/2007/08/04/glkterm103/</guid>
		<description><![CDATA[I&#8217;ve now released GlkTerm version 1.0.3. This is an update to the previous version of GlkTerm that uses the new 1.0.3 version of CocoaGlk.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve now released <a href="/mac/GlkTerm/GlkTerm-1.0.3.zip">GlkTerm version 1.0.3</a>. This is an update to the <a href="/rotate/2007/06/02/glkterm/">previous version of GlkTerm</a> that uses the new 1.0.3 version of CocoaGlk.</p>
]]></content:encoded>
			<wfw:commentRss>http://logicalshift.co.uk/rotate/2007/08/04/glkterm103/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CocoaGlk 1.0.3</title>
		<link>http://logicalshift.co.uk/rotate/2007/07/27/cocoaglk-103/</link>
		<comments>http://logicalshift.co.uk/rotate/2007/07/27/cocoaglk-103/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 21:04:54 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[CocoaGlk]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://logicalshift.co.uk/rotate/2007/07/27/cocoaglk-103/</guid>
		<description><![CDATA[CocoaGlk 1.0.3 is now available. This version of CocoaGlk mainly focuses on bug fixes, but also includes a couple of new features aimed at making it easier to port multimedia interpreters and customise client behaviour.
Read on for the complete list of changes.

Changes in this version:

Bug fixes

Opening a file that doesn&#8217;t exist for random access will [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/mac/CocoaGlk-1.0.3.tar.gz">CocoaGlk 1.0.3</a> is now available. This version of CocoaGlk mainly focuses on bug fixes, but also includes a couple of new features aimed at making it easier to port multimedia interpreters and customise client behaviour.</p>
<p>Read on for the complete list of changes.</p>
<p><span id="more-22"></span></p>
<h3>Changes in this version:</h3>
<ul>
<li>Bug fixes
<ul>
<li>Opening a file that doesn&#8217;t exist for random access will now create the file (something that&#8217;s required by the glk specification but probably isn&#8217;t a good idea in practice)</li>
<li>Fixed a memory leak in the More view</li>
<li>Fixed a potential infinite loop when cancelling sessions</li>
<li>Fixed an issue that could cause the layout engine to run past the end of the text in a view</li>
<li>Fixed a memory leak in the GlkPreferences object</li>
<li>Fixed a crash that could occur if the glk window was closed before the startup image had finished fading out</li>
<li>gestalt_Unicode now returns the right value</li>
<li>Buffered put character events are no longer concatenated into put string events if they have a value less than 32 (this could cause file corruption in some circumstances due to the way OS X handles these in NSString objects)</li>
<li>putBuffer: events sent to windows now send strings via the automation system &#8211; this ensures that broken interpreters that use these instead of putString: events will work with things like skeins, text to speech, etc.</li>
</ul>
</li>
<li>The GlkView delegate has been updated to make it possible to customize how files are prompted for.</li>
<li>Added cocoaglk_set_immediate_style_hint(), cocoaglk_clear_immediate_style_hint() and cocoaglk_set_custom_text_attributes() functions to make it possible to implement more complicated font/styling models than the standard glk model.</li>
<li>Added cocoaglk_get_stream_for_key() to make it possible to pass in extra streams to a client beyond just the main input stream (this is intended for use with clients that can restore a saved game as well as loading an actual game)</li>
<li>When file streams belonging to the server process are opened for reading in the client, they are now buffered to increase performance for small reads.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://logicalshift.co.uk/rotate/2007/07/27/cocoaglk-103/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8216;Image not found&#8217; error while trying to run CocoaGlk clients</title>
		<link>http://logicalshift.co.uk/rotate/2007/06/03/image-not-found-error-while-trying-to-run-cocoaglk-clients/</link>
		<comments>http://logicalshift.co.uk/rotate/2007/06/03/image-not-found-error-while-trying-to-run-cocoaglk-clients/#comments</comments>
		<pubDate>Sun, 03 Jun 2007 13:12:33 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[CocoaGlk]]></category>

		<guid isPermaLink="false">http://logicalshift.co.uk/rotate/2007/06/03/image-not-found-error-while-trying-to-run-cocoaglk-clients/</guid>
		<description><![CDATA[This post deals quickly with how to solve the issue of seeing an &#8216;Image not found&#8217; error while running an application linked to the GlkClient framework.

When you build an executable and link in the GlkClient library, you might see this while trying to run it:

ahunter:.../build/Development % ./tads-3         [...]]]></description>
			<content:encoded><![CDATA[<p>This post deals quickly with how to solve the issue of seeing an &#8216;Image not found&#8217; error while running an application linked to the GlkClient framework.</p>
<p><span id="more-15"></span></p>
<p>When you build an executable and link in the GlkClient library, you might see this while trying to run it:</p>
<pre>
ahunter:.../build/Development % ./tads-3                   [ Rhyolite ]  2:04PM
dyld: Library not loaded: @executable_path/../../../
../Frameworks/GlkClient.framework/Versions/A/GlkClient
  Referenced from: ./build/Development/./tads-3
  Reason: image not found
zsh: trace trap  ./tads-3
</pre>
<p>The problem is that OS X isn&#8217;t looking in the right place. You need to override the DYLD_FRAMEWORK_PATH in order to tell OS X where to find the client library.</p>
<p>The easiest thing to do is to copy it to the place where your executable is: the build directory if you&#8217;re using XCode or the directory you&#8217;re running the executable from if you&#8217;re using the terminal. Once you&#8217;ve done this, set the DYLD_FRAMEWORK_PATH environment variable to &#8216;.&#8217;. In XCode, you can do this by selecting your executables under the &#8216;Executables&#8217; section of the project and looking at the &#8216;Arguments&#8217; tab of the Info window. </p>
]]></content:encoded>
			<wfw:commentRss>http://logicalshift.co.uk/rotate/2007/06/03/image-not-found-error-while-trying-to-run-cocoaglk-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GlkTerm</title>
		<link>http://logicalshift.co.uk/rotate/2007/06/02/glkterm/</link>
		<comments>http://logicalshift.co.uk/rotate/2007/06/02/glkterm/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 17:37:01 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[CocoaGlk]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://logicalshift.co.uk/rotate/2007/06/02/glkterm/</guid>
		<description><![CDATA[GlkTerm is a simple application designed to help with writing glk client applications. Download this if you want to write a new IF interpreter on OS X, or if you want to port an existing one.

GlkTerm uses the CocoaGlk library to provide a client interface for developing Glk applications. This allows you to develop a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://logicalshift.co.uk/rotate/wp-content/uploads/2007/06/glkterm.zip" title="GlkTerm">GlkTerm</a> is a simple application designed to help with writing <a href="http://www.eblong.com/zarf/glk/">glk</a> client applications. Download this if you want to write a new IF interpreter on OS X, or if you want to port an existing one.</p>
<p><span id="more-14"></span></p>
<p>GlkTerm uses the <a href="http://www.logicalshift.co.uk/mac/CocoaGlk-1.0.2.tar.gz">CocoaGlk</a> library to provide a client interface for developing Glk applications. This allows you to develop a Glk application using XCode or the command line and run it immediately.</p>
<p>I&#8217;m going to write some more about developing glk applications for CocoaGlk, but to get started, you&#8217;ll need to link to GlkClient framework (included in the download). You will also need to modify your glk source code a bit, and write a main function.</p>
<p>Instead of just including glk.h, you should include the glk.h file for CocoaGlk using:</p>
<p>{[.include-glk /enzymes/chili-cplusplus.php]}</p>
<p>You might also add a glk.h file to your project including just that line if you don&#8217;t want to edit your sources. This is required because of the way frameworks work on OS X.</p>
<p>CocoaGlk doesn&#8217;t provide a main function, as it is not possible to have a main function in a shared library in OS X, so you&#8217;ll need to add this yourself. Unless you&#8217;re doing something really unusual, this will always be the same:</p>
<p>{[.glk-main /enzymes/chili-cplusplus.php]}</p>
<p>If you just want to play with GlkTerm, the version of glulxe included with Zoom may be a good starting point. Use the Finder to display the contents of the Zoom package, then navigate to the Glulxe plugin, and display the contents of that to find the client executable. The easiest way to get it to run is to launch GlkTerm and then drag the glulxe-client file to a terminal window.</p>
]]></content:encoded>
			<wfw:commentRss>http://logicalshift.co.uk/rotate/2007/06/02/glkterm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zoom 1.1.0 and CocoaGlk 1.0.2 are out</title>
		<link>http://logicalshift.co.uk/rotate/2007/04/28/zoom-110-and-cocoaglk-102-are-out/</link>
		<comments>http://logicalshift.co.uk/rotate/2007/04/28/zoom-110-and-cocoaglk-102-are-out/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 12:43:10 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[CocoaGlk]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Zoom]]></category>

		<guid isPermaLink="false">http://logicalshift.co.uk/rotate/2007/04/28/zoom-110-and-cocoaglk-102-are-out/</guid>
		<description><![CDATA[Zoom 1.1.0 has been released. This version fixes all the remaining known major bugs in 1.1.0beta3. As usual, accompanying this release is an updated version of CocoaGlk, version 1.0.2.
There is also an updated manual for this version of Zoom.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.logicalshift.co.uk/unix/zoom/">Zoom 1.1.0</a> has been released. This version fixes all the remaining known major bugs in 1.1.0beta3. As usual, accompanying this release is an updated version of CocoaGlk, version <a href="http://www.logicalshift.co.uk/mac/CocoaGlk-1.0.2.tar.gz">1.0.2</a>.</p>
<p>There is also an updated <a href="http://logicalshift.co.uk/mac/zoom/manual/">manual</a> for this version of Zoom.</p>
]]></content:encoded>
			<wfw:commentRss>http://logicalshift.co.uk/rotate/2007/04/28/zoom-110-and-cocoaglk-102-are-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
