26 December 2010

Sweeps

King of Dragon Pass is a big game, and while there’s lots of special purpose code, frequently the same basic idea occurs more than once.

One of the techniques we made extensive use of in 1.0, and I’m using again for 2.0, is the sweep. If you find a bug, you need to be sure it’s not present somewhere else. A global text search can find an awful lot. (Apparently the search tools available today are better than they were 11 years ago, because I’ve found a number of textual issues that slipped through the cracks in the original release.)

We also used a change log — revision control systems tend not to be as visible, and Subversion wasn’t even dreamed of in 1997. So quickly searching (sweeping?) for “sweep” reveals some of what we did in script (OSL) files:
  • news_FF54 found a bug with 0 clan, did sweep on this file for similar predicaments
  • music & qmark sweep
  • Qland -> Dragon Pass
  • exPoint sweep
  • dx sweep
  • testee sweep - add (quester) to test where needed
  • typo sweep
  • +- sweep
  • Music sweep
  • sweep for bob dole-isms in exploration news
  • WhoopBonus/moot sweep
More recently, resolving the bloat issue revealed a problem with cleaning up after some objects. This warranted a sweep, and sure enough, two other screens had a similar issue.

On the flip side, sweeping and finding nothing can give you more confidence that there aren’t hidden bugs.

23 December 2010

Status Update

Back in August, a lot of the scene interaction wasn’t implemented.

As you can see, it now is! While it’s not exhaustively tested, all of the scenes should work.

In other words, all the sliders, text input, people picking, etc. is part of the user interface. And winning and losing are hooked up.

The major remaining areas in porting are some special cases in dialogs. For example, you can’t pick a specific divination from the Sacrifice dialog.

There are still references to livestock such as sheep and pigs, that will no longer be something players have to worry about. (No more running out of sheep and being unable to trade for them!)

There’s also some new features still to do: Game Center achievements, some sort of Twitter and Facebook hookup, and an in-game manual.

And I have one new scene completed, and plan on a few more.

Then of course, testing.

I don’t have a release date, but the game is getting closer.

11 December 2010

Big Game

I mentioned that King of Dragon Pass is a big game. The original was something like 450 megabytes. (We fit both Mac and Windows on the same 650 MB CD by sharing files between the two file systems.) Now, that’s without any compression (I don’t think we had the option, though since it fit without compression we might have avoided it for speed). And the iOS version is for a smaller 480 x 320 pixel display, so the assets will be smaller. So the iOS version won’t be that large.

For development, I’ve exported all the scene artwork at the highest JPEG compression — also known as the worst quality JPEG compression. Since the game needs to be copied to a device for testing, smaller is definitely better. It will be easy to drop in higher quality art at the end (it takes the same amount of memory when decompressed, and reading from flash memory is quick, so I don’t expect any changes).

So right now, the game is about 57 MB. My worst case estimate is that it’ll jump up to about 150 MB with the right art. That’s pretty big, but the largest game I have is Monkey Island 2 at 398 MB. And the largest Apple will allow is 2 GB. You won’t be able to download King of Dragon Pass over the cellular network (the limit for that is 20 MB), but over WiFi or with iTunes on your computer it shouldn’t be that bad.

I just learned that the Android Market is raising its size cap, from 25 MB to 50 MB. I wasn’t planning an Android version for various other reasons, but I hadn’t realized that King of Dragon Pass could not be sold through the easiest channel. This puts any future Android version in serious doubt, I’m afraid. Maybe things will change next year.

05 December 2010

The Tribe Map

This screen shot from today’s build tells a lot.

It’s a Big Game
We put a lot of effort into making things feel right. When you’re making a tribe, chances are you’ll want to see where they are. So we had special code to show the current map, rather than a static picture. Similar code is now in the iOS version. (It renders the map into an image, and uses that like any other picture.)

There are other places where we did something just for one scene. Of course we tried to generalize (programmer Shawn Steele was particularly good at this), but if it was important enough (i.e. it supported the story), we did it. The Kallyr storyline needed at least three custom features (for example, she’s the only person who can appear on the clan ring as a teenager).

Better in iOS
Obviously the screen’s smaller, but I’m trying to make things better than the original. This screen shows the new anti-aliased font. Less obvious may be the tribal boundaries.

Originally, we had separate Mac and Windows code to draw this. The Mac code was much simpler, because it used QuickDraw regions. On Windows, we had to manually set each white pixel. iOS doesn’t have QuickDraw, so I used the pixel-drawing code pretty much unchanged. But the pixels no longer need to be white — they’re now drawn with alpha, and are translucent. This means you can see that the river forms a natural boundary — it shows through.

The Same
I hope it also helps allay people’s fears that the game is being changed to fit the smaller device. There are obviously some changes, but playing through the tribe-making sequence today certainly felt the same to me.

01 December 2010

Saving

In the original King of Dragon Pass, you could save at any time. Well, from any management screen — saving in the middle of an interactive scene would have been way too complicated, let alone odd from a game design standpoint.

The game would put up a platform dialog (Windows or Mac), where you could type a name if you didn’t like the default (which was just the year and season).

Later, you could choose to restore. The game would put up a standard open dialog, you’d pick the save, and you’d be back at that point.

I wanted to improve on this in a few ways for the iOS version. First, saving is automatic. This needs to be done anyway, so you can take a phone call or check your calendar and not lose your progress. It also means you won’t forget to save.

The date gave you some idea of how far back you were going, but it wasn’t very useful as a guide to exactly what the situation was. And while iOS has a file system, there’s no standard dialogs for selecting files. So this is the interface for choosing when to rewind to:



It’s the Saga screen. The end of each completed year has a Restore button. Tap that, and you’re back at the end-of-year rituals. (It’s a one way trip through time, so you’ll get to confirm that you’re losing progress.)

Interestingly, it also is at least a partial answer to those who call saving just before a heroquest, and restoring if you fail “save-scumming.” You can still go back to a save, but you might have to replay several seasons.

The UI is a little bit hidden, since the saga isn’t the first place you think of to restore. But unlike the original, you don’t need to restore (I assume few people could play a game straight through without needing to quit for some reason). And you will certainly know exactly what you’re going back to, which I think outweighs any drawbacks.

You can only go back, but that’s typically what you want anyway. And while you give up the flexibility of jumping around in time, you don’t have to manage save games. (I saved often, in case some other application crashed my computer — this was the 1990s before preemptive multitasking — so I’d always have a lot of files to delete when I completed a game.)

Other games have dealt with the management issue by having a limited number of slots. It’s possible I’ll keep only the last 10 years (or whatever), but I don’t think there’s much need to worry about it. Saved games are only about 80K, plus the saga. A 100 year game is fairly long, but 8 MB is only the size of a song or two. Let me know (comments here, or on Twitter or Facebook) what your longest game was.