Archive for the ‘CocoaGlk’ Category

CocoaGlk 1.0.7 has been released June 2nd, 2009

To go along with the release of Zoom 1.1.4, I’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.

Challenges for iPhone CocoaGlk March 11th, 2008

Development so far has actually been quite quick as I’ve been focusing on the things that are the same on the iPhone as on desktop OS X. Eventually, I’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 when you plug your iPhone in, all your latest saved games are copied between the two applications, and any story files that you’ve selected get copied onto the phone.

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.

Obtaining games

I haven’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’t be the only way that stories are put onto the phone, because PC users would be left out in the cold.

Auto-save

Interpreters running on the iPhone are really going to need this. I doubt users would appreciate a ‘are you sure’ dialog when you hit the home button and losing game state just because a phone call has arrived is really poor form.

Zoom supports this, so this should be easy for Z-Code. glulx doesn’t, though: I’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)

Licensing

CocoaGlk is currently licensed under the LGPL and distributed as a framework. This isn’t appropriate for the iPhone, as there’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.

The solution is to change the license to one that is less restrictive: probably the MIT or modified BSD license.

A more serious issue is that Apple’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 – plus it would mean no Zork, ever.

User Interface

I haven’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:

Complex graphics

Games like moments out of time use a complex window layout that won’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.

However, games with a more traditional layout won’t really benefit from this, so we’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 – some experimentation is required! The initial version will go for the ‘big but simple’ approach, which should work with the majority of IF games that are out there, but I’m not going to be satisfied until games like City of Secrets and Moments Out of Time run and look good.

Text entry

This is pretty crucial to get right. The iPhone keyboard isn’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:

  • Tapping on a word in a text window should insert it as input (with an animation + a quick way of undoing accidental taps)
  • 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.
  • If possible, I’d like any words the game prints that don’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.
  • There also needs to be a way of getting a list of common verbs. I’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 – drag to select a verb (the verb under where the user taps would be blank to avoid accidental input)
  • 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)

There’s a tap+hold gesture on the left hand side that’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.


That’s it for now.. I’ll try to get something more exciting for the next screenshot. Honest.

IF and the iPhone March 7th, 2008

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’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 least assuming the requirements for distributing free software aren’t too onerous. $99 for a key doesn’t sound too bad to me, anyway.

I’m not entirely sure what to expect; I haven’t played around with jailbreaking my iPhone, so I’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’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.

Getting games onto the phone is also a bit of a challenge. I think that taking some of Zoom’s existing inventory management and connecting to IFDB might be a good idea.

I’ll post a beta when I get things working: I imagine a glulx or frotz-based interpreter is likely to be released first. I’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.

GlkTerm 1.0.3 August 4th, 2007

I’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.

CocoaGlk 1.0.3 July 27th, 2007

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.

Read the rest of this entry »

‘Image not found’ error while trying to run CocoaGlk clients June 3rd, 2007

This post deals quickly with how to solve the issue of seeing an ‘Image not found’ error while running an application linked to the GlkClient framework.

Read the rest of this entry »

GlkTerm June 2nd, 2007

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.

Read the rest of this entry »

Zoom 1.1.0 and CocoaGlk 1.0.2 are out April 28th, 2007

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.