I originally created King of Dragon Pass mostly with a Mac, and all of the iOS adaptation used a Mac. But the original game ran only under Mac Classic, so I haven’t been able to play the game on a Mac since Apple removed Classic support.
So I’m really happy that HeroCraft is bringing the game back to Mac OS X. King of Dragon Pass for Windows and Mac is now available on Steam! (You can also discuss it in the Steam Community.)
I’ve talked more about King of Dragon Pass at the Development Blog over the past few years.
Showing posts with label Macintosh. Show all posts
Showing posts with label Macintosh. Show all posts
28 July 2015
22 June 2010
Is the Future the Past?
One thing that struck me about John Siracusa’s interesting article on Apple’s language and API future: Apple did a high-level language once before. NewtonScript.
Whenever I see Python or Lua code, I think back to when I was coding in NewtonScript, which had a similar syntax and similar concepts. Here’s a bit of code from the original implementation of Jigami:
regTile := {_proto: pt_Tile, _parent: self, viewBounds: RelBounds(11, 112, 34, 34)};
regTile.edges := pt_Tile.possibleEdges[tileNum];
regTile:CalcEdges();
regTile.symbols := NIL;
Whenever I see Python or Lua code, I think back to when I was coding in NewtonScript, which had a similar syntax and similar concepts. Here’s a bit of code from the original implementation of Jigami:
regTile := {_proto: pt_Tile, _parent: self, viewBounds: RelBounds(11, 112, 34, 34)};
regTile.edges := pt_Tile.possibleEdges[tileNum];
regTile:CalcEdges();
regTile.symbols := NIL;
There was also a visual design tool, Newton ToolKit (NTK). The combination of a dynamic language, no pointers, and a graphical editor was quite productive. And NewtonScript was good enough to use for all of the system apps. Yes, there was a little C++ code in parts, but a lot of it was probably premature optimization (there was nothing like Shark or Instruments for Newton).
I don’t know what direction Apple is moving, but at the very least it’s an interesting proof of concept for something that works well in a mobile device.
13 June 2010
WWDC Thoughts
Others have reported already, and everything except the keynote is covered by nondisclosure. But here are a few random thoughts on Apple’s Worldwide Developers Conference, held last week in San Francisco.
Apple made it very hard to plan — about 6 weeks notice. Luckily my employer, Rogue Amoeba, was waiting to pounce, because the event sold out in only 8 days.
I’ve been to the conference a number of times (I think my first was 1989), so I knew I’d be getting a t-shirt, and packed accordingly. Except this year they no longer handed out a t-shirt and a bag (sadly I didn’t go last year, when they handed out a slim laptop backpack). This year it was a lightweight jacket. This was actually pretty useful, given the temperature, but meant I had to get my own WWDC shirt so I didn’t stink on Friday.
Oddly, unwashed developer wasn’t something I noticed. I did however have to sit through a session next to someone with bad breath, someone smelling of alcohol (in a 09:00 session), and a smoker.
It was pretty obvious from the event list going in that it was going to be an iPhone-centric show. Apple doesn’t release all the event names until after the keynote, so I had some hopes that there would be a little more Macintosh content. Sadly, there wasn’t. On the other hand, I did manage to get to one session (the last one as it happened) that was directly helpful to my current work on Pulsar.
More surprising was the number of women. There are never a lot (you inevitably hear someone joking about the lines for the men’s toilet and the lack of line for the women’s), but this year seemed worse than I remember. Perhaps I was especially surprised because the very capable programmer I hired to do an iPhone game while at GameHouse was a woman.
Overall numbers seemed bigger than I recalled from 2 years ago as well. I remember lining up for the keynote, but I didn’t remember having to line up for other sessions — and some of these lines snaked around two corners.
I believe the conference cost significantly more this year ($1600), but the amenities seemed cut back. I already mentioned the reduction in attendee premium. There was also no reception, and no espresso bars inside Moscone. And the Beer Bash didn’t serve sushi.
We also got nothing at registration except the jacket and badge. Going paperless seemed reasonable though, because there was a custom application (apparently this was first available last year). It had some usability problems, and crashed relatively often. It was handy to have on both my iPhone and iPad despite that.
Speaking of iPad, this year I decided to try leaving my laptop home and using just an iPad (with Bluetooth keyboard) to take notes. This made it the first year I didn’t have to worry about keeping my battery charged (although several of the session rooms had electrical outlets attached to the seats, a great feature I made use of 2 years ago). I plan on discussing this more in a later post.
All in all, I found the week worthwhile, though I would have liked more on Macintosh.
Apple made it very hard to plan — about 6 weeks notice. Luckily my employer, Rogue Amoeba, was waiting to pounce, because the event sold out in only 8 days.
I’ve been to the conference a number of times (I think my first was 1989), so I knew I’d be getting a t-shirt, and packed accordingly. Except this year they no longer handed out a t-shirt and a bag (sadly I didn’t go last year, when they handed out a slim laptop backpack). This year it was a lightweight jacket. This was actually pretty useful, given the temperature, but meant I had to get my own WWDC shirt so I didn’t stink on Friday.
Oddly, unwashed developer wasn’t something I noticed. I did however have to sit through a session next to someone with bad breath, someone smelling of alcohol (in a 09:00 session), and a smoker.
It was pretty obvious from the event list going in that it was going to be an iPhone-centric show. Apple doesn’t release all the event names until after the keynote, so I had some hopes that there would be a little more Macintosh content. Sadly, there wasn’t. On the other hand, I did manage to get to one session (the last one as it happened) that was directly helpful to my current work on Pulsar.
More surprising was the number of women. There are never a lot (you inevitably hear someone joking about the lines for the men’s toilet and the lack of line for the women’s), but this year seemed worse than I remember. Perhaps I was especially surprised because the very capable programmer I hired to do an iPhone game while at GameHouse was a woman.
Overall numbers seemed bigger than I recalled from 2 years ago as well. I remember lining up for the keynote, but I didn’t remember having to line up for other sessions — and some of these lines snaked around two corners.
I believe the conference cost significantly more this year ($1600), but the amenities seemed cut back. I already mentioned the reduction in attendee premium. There was also no reception, and no espresso bars inside Moscone. And the Beer Bash didn’t serve sushi.
We also got nothing at registration except the jacket and badge. Going paperless seemed reasonable though, because there was a custom application (apparently this was first available last year). It had some usability problems, and crashed relatively often. It was handy to have on both my iPhone and iPad despite that.
Speaking of iPad, this year I decided to try leaving my laptop home and using just an iPad (with Bluetooth keyboard) to take notes. This made it the first year I didn’t have to worry about keeping my battery charged (although several of the session rooms had electrical outlets attached to the seats, a great feature I made use of 2 years ago). I plan on discussing this more in a later post.
All in all, I found the week worthwhile, though I would have liked more on Macintosh.
15 February 2010
Weren’t those my pixels?
As you can see at Microsoft’s Mac blog, Word 2011 will have (counting the menu bar) 8 horizontal strips of controls.
I love portrait displays, and have one, but I often use my laptop without one. And the laptop screen is wide, not tall. This seems like a terrible use of space, when they should be figuring out how to get more of my content visible without scrolling.
They say you gain vertical space compared to Office 2008, so maybe it’s a good thing I haven’t installed that yet!
I’m not even going to discuss visual clutter or whether you can find things — the ribbon may indeed make Word’s vast number of features more approachable.
For contrast, Pages has 5 strips of controls (menu bar, toolbar, format bar, ruler, and stuff at the bottom), and one of those is shared with the horizontal scroll bar so it doesn’t steal vertical space. Yes, there are palettes, but they use space on the side and don’t steal content area from typical documents.
12 February 2010
Switching Email
I just took a couple of steps in the email world: I switched both my server and client.
I blame Apple. They announced iPad, and I’m making sure I’ll be able to fully use it.
For various reasons, I have multiple email accounts. Until now, I’ve been reading some with Apple Mail on my Mac, and also on my iPhone. The accounts are set up to use IMAP, which means mail is on the server (or if you will, the cloud). I can get it anywhere.
But for my oldest accounts, I’d used Eudora as my client, and Eudora Internet Mail Server for the actual server I ran. And I’d set things up with the POP protocol (which is essentially client-centric). This meant that I needed a master device that sucked the messages off the server. I couldn’t retrieve mail from my iPhone, because my laptop was the master owner. And EIMS didn’t support SSL anyway. EIMS also supports IMAP to the standard, and Apple Mail is apparently buggy, and doesn’t play well with EIMS.
I thought about buying a mini with Snow Leopard Server and running mail off it. That would give me the cloud and the security. But it costs $1000. I might have been able to add SSL on top of EIMS, but I’d still be dealing with the mismatch between it and my IMAP client.
What I ended up doing was using Google Apps Standard Edition. I don’t care about the actual apps (Calendar, Chat, Docs), but they do provide what is essentially Gmail for your domain. In my case, domains (since my wife and I get mail at three different domains). Although they push for the Premier Edition ($50/year/user), the free Standard Edition provides domain aliases (so we can handle our three domains via the same site) and nicknames (so I can have app-specific addresses).
Basic setup was easy. I had to prove I owned my domain, which I could do by putting a file on my server. The domain aliases were a bit trickier — Google checks for “domain.com/file” but I’d set up Apache so it was actually at “www.domain.com/file”. There was no error message — and since it’s free, support is only via a forum (which I still haven’t gotten an answer from). But I eventually figured out what was going on. But then, one of the domains took, but the other did not. (After several hours, it finally did.)
Google provides a way to test things, so I created an account on my iPhone and made sure I could send and receive via IMAP.
I don’t do my own DNS so I had to contact my ISP. They threw the switch, and things pretty quickly were working!
While I get no spam on my Gmail account, I get a fair amount to my older addresses (the fact that it’s multiple addresses probably works against me). Google has so far filtered all of this about as well as SpamSieve did on the client side — I get a bunch that’s not blocked by the server, and (being paranoid) go through it for false positives on occasion. (I have gotten two false positives in almost a week.)
On the client side, I had to learn Gmail’s idiosyncratic approach to IMAP. You will need to enable the advanced IMAP controls via Gmail Labs, and expose the labels. Then the important thing, if you want things to look more or less like IMAP, is to ensure that any message has only one label. I had originally used the tagging model, and assigned labels liberally. After all, Google wasn’t duplicating a message in the In folder and the Developer folder. But IMAP (at least as implemented in the Apple client), does.
Luckily, it’s easy to set up your filters so that an incoming message that’s filtered skips the inbox. At this point, the IMAP client can move things between folders, and the right thing happens. Well, you’ll probably want to read Google’s documentation on how to set up for IMAP, since some of the system folders should be set up in a less intuitive way.
So far I’m pretty happy with this. As far as I can tell, it’s been totally transparent — I still get and send email with the same addresses. I can get mail via IMAP or the Web-based Gmail interface. And I’ll no longer need to administer my own server (as easy as that was with EIMS).
15 October 2009
Open Project in Xcode
One really nice feature (not sure if it’s new in 3.2 or if I hadn’t noticed it before) is how you can look at sample code.API documentation has a link to sample code that uses the call. Click that link, and from the sample code page, click “Open Project in Xcode.” The project is downloaded and, well, opens in Xcode. Very nice integration.
14 October 2009
Update to Opal
As I mentioned, I am using the new clang compiler and LLVM back end in the latest update (version 1.2.5) to my Opal outliner. I couldn’t really detect any differences in performance, but I’ll take the faster compiles!
The clang code analyzer did find a number of minor memory leaks, mostly in things that are less common, like printing or using the bookmark popup. So this release is cleaner than ever.
14 September 2009
NSUserDefaults Is Picky
If you’re not programming Mac or iPhone, you might want to skip this post…
I’m saving some state in an array, to be saved via NSUserDefaults. I know that NSArray can’t contain a nil value, but you can instead use [NSNull null]. BUT, property lists save only a limited number of classes, and NSNull is not one of them.
The confusing thing was that NSUserDefaults silently rejected an entire NSDictionary containing an NSArray containing an NSNull, while saving all the other changes I was making. So my testing showed that saving and restoring worked. And worked. And worked. Until the one case where there happened to be a nil. And then loading used the previous state.
So I had to come up with another way to save and restore a C array that can contain a nil. (In this case I was able to use a string.)
07 September 2009
Clang Is Fast
As I’ve written, the developer tools in Snow Leopard are a great reason to upgrade.
Snow Leopard includes a new compiler, clang. Much of my work involves C++, which clang can’t handle. Which is a bummer, as the static analysis is so useful. But Opal is an Objective-C application, so I tried switching from GCC 4.2. I had to tweak a few things (clang doesn’t like the GCC -Wunreachable-code option), but mostly it gave a few different warnings.
And it’s about twice as fast. On my MacBook Air 2.13 GHz, it took GCC about 58 seconds to build Opal (with its plugins). Clang took about 32 seconds. (This isn’t all compile time — it also includes copying files into the bundle.) I built twice each time in case caching made a difference.
Opal isn’t very compute-bound, so I didn’t notice any speed differences from using the LLVM backend. As for code size, the bundle is 4,463,702 bytes, compared to 4,328,838 from GCC 4.2 and 4,349,342 from GCC 4.0. In many cases, bigger code runs slower, but Apple claims that LLVM generates better code. They pay a lot of attention to performance, so I’m going to believe them on this.
So I’m planning on using clang for the next Opal update.
05 September 2009
Snow Leopard Notes
I’ve been using Snow Leopard (Mac OS X 10.6) since official release. See John Siracusa for a very thorough and technical review. I just want to post a few random notes.



I forgot to be scientific about measuring the disk space savings, but I think I got 5 GB back (and I had never installed all the printer drivers). That’s a pretty valuable upgrade right there!

While people have noted it’s a plus that you can now show the date in the menu bar, in fact you don’t get to choose the date format, so it’s not very useful.
It’s pretty cool that Cisco VPN is now built in — the client from Cisco was pretty unreliable. Unfortunately, we use a shared secret that’s only distributed via a .pcf file, in encrypted form. Luckily, there’s a security hole and it’s possible to retrieve the plaintext password. Armed with this, I can use the Snow Leopard client.

I haven’t seen mention of a change in Time Machine: if you back up to a Time Capsule, you’re no longer saving to the top level of the volume but rather using your own account. (The screen shot shows the new approach above the old.) This should make things a little more secure, but it also means your old backup is ignored, and things start from scratch. (I couldn’t really verify Apple’s claims that the initial backup is a lot faster — it still seemed awfully slow over USB Ethernet.) On the other hand, I had to restart the initial backup since I didn’t have enough space for an entire new backup. Once I freed up space, the initial scan was pretty much instant.

So far, most of my software has been compatible (including those I wrote: Addressix and Opal). I was using an older version of Parallels Desktop, which for some reason was not moved to an “Incompatible” folder but won’t launch (with a message that it’s incompatible). I think I’ll be switching to VMWare Fusion.
While there are some features that I appreciate (minimizing windows to the application icon instead of cluttering the Dock), for the most part it’s the same Mac, slightly improved.
Except as a development machine. The new version of Xcode offers some significant improvements for developers, ranging from better Subversion support to new compilers. I’m still in the process of using clang and the updated Instruments to track down subtle issues.
At the same time, one of the most annoying bugs is in the new developer tools: we can no longer use distcc to compile on 8 different machines simultaneously. Apple is aware of the problem.
As a user, it’s not a whizzy update, but I think still worth it. As a developer, I’m really happy to be using the new tools. I’m also hoping that this becomes the new baseline — it would be great to develop for 10.6+ rather than 10.4+.
20 July 2009
Less Flash!
I’d been using Click to Flash for some time, but didn’t realize there has been a lot of improvement (I think I had version 1.0, and it’s now up to 1.4.2).
Click To Flash is a simple plug-in for Safari that handles all Flash content — by not playing it until you click. This means you can visit web sites without running a handful of programs masquerading as ads. The problem is that many (if not most) Flash apps are extremely greedy in their use of the processor. This means the computer heats up, which means the fan runs louder. In fact, Elise’s machine appears to heat up to the point that it abruptly shuts down to prevent damage. And if you’re running on batteries, you run down the charge faster. Click To Flash simply shows the word “Flash” instead of running the app.
But what if you want to actually play a Flash game? That’s where the “Click to” comes in. Click on the blocked Flash content and it loads and runs.
Like I said, I had an older version that was functional, but doesn’t offer the ease of use for white listing sites, or a number of tweaks (such as using H.264 video on YouTube). I don’t know how I missed the update. You shouldn’t.
28 June 2009
Review of Opal
Nicely detailed review of my Opal outliner at The Mac OS X Guru. He concludes, “It is fast, extremely responsive and very intuitive.”
Xcode comments
I knew that if you specified certain strings in comments, Xcode would put an entry in the function popup. But I just discovered there were some I didn't know about. Here’s the ones I now know of:

// TODO:
// FIXME:
// ???:
// !!!:
// MARK:
24 June 2009
Mouse Repair
I had an Apple Mighty Mouse whose scroll ball stopped working in one direction — I could scroll down but not up (or the other way around, can’t recall). I happened to have a spare, and used it for a fair while. But then it stopped working in one direction!Desperate, I decided to push the scroll ball button (which I never use). When I did so, I could scroll both directions. I got out the old mouse and did the same, and it too now works. It happens to have a shorter cable, which I preferred, so I’m now back in operation.
13 June 2009
New MacBook Air
I upgraded my original MacBook Air (1.8 GHz, 80 GB hard disk) to the latest model (2.16 GHz, 128 GB solid state disk). I was happy with the old one most of the time, but sometimes it felt too slow.
I’ve only been using the new machine for about 3 days (and on vacation, so not at all heavily), but so far so good. The Xbench rating for the old machine was 54.2, the new one 144.88. I’ll have to do some real world tests once I’m home, but if it’s really almost 3 times as fast, I’m happy.
09 June 2009
Fixing the Safari 4 toolbar
Safari 4.0 comes configured (on the Mac at least) with a toolbar that incorporates the seldom-used Add Bookmark button with the Address field.
And there’s no apparent way to turn it off via View > Customize Toolbar — there’s no Address Field item without Add Bookmark attached.
And there’s no apparent way to turn it off via View > Customize Toolbar — there’s no Address Field item without Add Bookmark attached.There is, however, a separate Add Bookmark item. To get rid of Add Bookmark, you need to drag in the separate item (which makes it disappear from its attached position), and then remove it from the toolbar.
(I had filed a bug against the beta build for this limitation; I don’t know if the workaround existed because I didn’t think of it until the final release.)
18 March 2009
Apple Keyboard

I think I’ve requested a rationally sized keyboard several times over the years, so when Apple finally came out with one, I figured I needed to put my money where my mouth is, and buy one.
I plugged it into a KVM, and it works fine (typing on either a 20 inch aluminum iMac running Mac OS X 10.5.6, or a G5 tower running 10.4.11).
As with my MacBook Air, I missed the Enter key. So I installed KeyRemap4MacBook. Despite the name, it works fine with the Apple Keyboard as well as the MacBook Air.
The only problem was that for some reason, I wanted to put my right hand too far to the left —apparently I’m too used to positioning it away from the right side of the keyboard.
It’s really nice having all that desk space back!
03 March 2009
Small At Last!

Hallelujah! Apple is once again offering a keyboard that doesn’t take up excess space on your desktop, and will work without draining batteries!
30 January 2009
Mac Box Set & Leopard
Just got my Mac Box Set (Mac OS X, iLife and iWork). At $149 (Amazon price as of 30 Jan), it’s the same price as iLife and iWork bought separately. I wanted both of those.
As it happened, I used the Mac OS X DVD to update a machine to 10.5.6, and tried to use that computer as part of my compile farm (using Xcode’s Distributed Build feature). It showed up as incompatible with the others. Apparently Mac Box Set includes 9G66, while the combo update installs 9G55. I didn’t realize Apple was distributing multiple builds of 10.5.6. Normally no one would really care, but distributed builds need perfect configuration matches.
So I probably won’t be able to use this machine in my compile farm until the next Mac OS X update.
05 January 2009
Class Names under gcc
We recently changed our C++ framework to use the language’s RTTI (historically we didn’t because some compilers didn’t do a good job with it, but that’s pretty ancient history by now). Previously we used a bunch of macros to roll our own, including the ability to print an object’s class (for debugging purposes), something like “ResourceImage.” The first cut at “native” support showed this as “N3GF213ResourceImageE,” which is too ugly for my liking. (It’s essentially a mangled name.)
So Chris Blackwell pointed me in the right direction, and we now have
#include <cxxabi.h>which returns a human-readable name.
template <typename ObjType> std::string class_name(ObjType* anObject)
{
int status;
char *realName;
realName = abi::__cxa_demangle(typeid(*anObject).name(), 0, 0, &status);
std::string retVal(realName);
free(realName);
return retVal;
}
Subscribe to:
Posts (Atom)

