31 August 2010


Like many games, King of Dragon Pass has a map that’s gradually revealed as you explore. Since your ancestors originally lived in Dragon Pass, you have a rough idea of what’s there. The modern map is superimposed atop the historic one. For simplicity, the map is divided into hexagons, and an entire hex is either known (explored) or unknown (historic memory).

Drawing the map was fairly different for the Mac and Windows versions, and pretty much none of the old code that drew hexes could be used. So until now, I’d just been using the historic map as a placeholder.

I’ve now implemented the hex drawing. The game no longer draws individual pixels — even the iPhone has a graphics accelerator. Instead, it creates a mask, and lets the graphics system draw.

Performance seems adequate on an iPod touch, but I plan to come back and optimize if I can (iOS has some excellent performance analysis tools).

One thing that got dropped in the original version was zooming of the map. (I think it may have been partially implemented for Mac only.) But zooming is basically free in iOS. So here’s how much of the entire map you know at the start of the game. Note the scale changes as you pinch-zoom. (You can also double-tap to zoom in or out.)

26 August 2010

User Choices In

As I mentioned earlier, King of Dragon Pass has a pretty wide range of interactivity during a scene. There are almost two dozen ways a script can ask the user for input. All of them are now implemented (though not exhaustively tested). The last was ChooseName, which is actually used in more than two scenes becaue there’s more than one route to a tribe. Here’s a typical one:

response 3: Pick a new name for the tribe.
n = "<.chief>i"
n = ChooseName("What do you call your tribe?", n)

Sliders are used in many of these functions. Here’s what ChooseWealthAndFood looks like in the game. They work pretty well on the small screen (at least for me!), and there’s generally space to show them.

There’s still more scene interaction to implement, but this is mostly running other types of interactivity from within a scene: heroquest, raid, exploration.

A note on prerelease graphics: not only is the art not final (the sliders don’t have the correct transparency), but the scene art intentionally has the highest JPEG compression, so the game loads onto a device more quickly.

19 August 2010

Debugging KoDP

When we did the original King of Dragon Pass, internal builds had some arcane keystroke that brought up an ugly dialog that let you type a scene number, or click one of dozens of buttons to set state or trigger raids. This was invaluable both for developers and for testers — who wants to play until you run out of cows, just to make sure the game handles that right?

Causing a Scene
The game is far enough along that this would be useful. Instead of an arcane keystroke, it’s invoked by an arcane gesture.

The new version is actually a little easier to use, because it shows the scene name.

Once we have external testers, I want to add another feature which will also be much easier thanks to ten years of operating system progress: the ability to email the debug logs to accompany bug reports.

Wreaking Chaos
This has already been invaluable in testing the interactivity code mentioned in the last post.

13 August 2010

Lots to Do

King of Dragon Pass is a pretty big game — over 400 crisis management activities, 75 individual clan leaders, 500 hand-drawn color illustrations, 28 musical compositions. Or you can look at how many words of text are in the game: about 462,000.

But those numbers don’t really have much to do with converting the original game to iOS (the operating system of iPhone, iPod touch, and iPad). The assets can be converted to the small screen with Photoshop batch actions.

King of Dragon Pass has three parts: the game engine (written in C++), interactive scenes (written in our custom scripting language, OSL), and UI code (originally done with mTropolis). It’s the UI that needs redoing for iOS.

The game has something like 30-40 screens or dialogs (not counting help screens). All have to be redone. Many need new layout or simplification, and sliders and buttons have to be hooked up.

We also need to handle the UI for OSL functions like ChooseClan, which lets you pick a clan in the middle of an interactive scene. Here’s a quick look at where we stand so far:
Some of these are relatively rare (if I recall correctly kChooseName is used in only two scenes), but they all need to be reimplemented, and tested.

King of Dragon Pass for iOS

As mentioned elsewhere, A Sharp is bringing its award-winning game King of Dragon Pass to iPhone and iPod touch. The original game was released in 1999, for Windows 95 and Mac OS 7.5. (Amazingly, the game still runs on today’s computers, though not necessarily with ease.)

We have a Twitter feed (@KingDragonPass) to post news and get your comments, but some things don’t fit well in 140 characters. So this blog will talk about the development process.