02 September 2012

How Many Scenes?

A long-time player recently commented about how he had just gotten an interactive event he had never seen before. This is not as surprising as it sounds, even for a player who has had the game over a year, because many events are conditional, and the raw number is such that you won’t get each one every game. But I was curious about the exact odds.

Counting

The game calls interactive events “scenes,” which is biased towards the illustrated events. There are 1624 in total, but they aren’t all story events (scenes). They can be divided into:

code: A chunk of OSL script used to set state or conditionally trigger scenes. These have names like code_InitialTribalAgreements, fragment_BeSureToHaveElection, or code_R115MiddlingPenaltyOver. None of these have any player interaction. There are 464 of these.

news: Some sort of report, given by (or relating to) a single leader. These have no illustration. Most have no interaction, but some do give player choices. A notable subset of interactive news is heroic combat during a battle. Battle results is treated as a special case, and is shown with two illustrations. News scenes have names like news_TradeRouteEnded, news_R45aGrainHeFound, mission_EmissaryBanditAttack, or battle_HesGoneBerserk. There are 462 news scenes.

scenes: Interactive events are the core of the game. They always have an illustration, and at least one leader giving advice. They have names like scene_2Trader, scene_R194WeddingCelebration, or mission_ProposeAlliance. There are 614 of these.

quests: Heroquests are essentially a special type of interactive event, with no advice. There are 84 of these.

So there are 614 scenes defined in OSL, but it’s not really accurate to call all of those interactive events. That’s because when we designed an event, we sometimes wanted to show new advice in response to player choices, or change the background music to reflect a change in situation. This was implemented as switching to a new scene. So scene_R59TheChallenge might trigger scene_R59aChallengeResult, but that’s really just one event to the player.

Luckily, we were pretty consistent about naming scenes, and by looking for that pattern (R59a as opposed to R59), there are 70 scenes that are followups within an overall event.

That leaves 544 distinct interactive events. It’s worth noting that 28 of these are new in the iOS version (25 were in version 2.0, and one is new in the upcoming 2.1).

Calculating

But, what are the odds of not getting one of the 544? All scenes are not created equally (we kept the amount of branching in the game to a minimum, but some scenes directly depend on earlier choices), and many have specific preconditions. There’s no good way to figure that, so we’ll assume each does have an equal chance of showing up. If there are 5 random events each year, the odds of not getting a specific one each year is 99.1%. How long is a game? That can vary widely, but looking at two sagas of complete long games that are in our bug tracking system 48 to 58 years. For this quick calculation, let’s call it 53. So the odds of not getting a particular scene during a game are over 61%. Now we have to figure how many games. King of Dragon Pass is highly replayable, but even a hard-core player might not play more than 12 games in a year. The odds of not getting a random scene in a year of play are thus only around 0.3%.
A (thankfully) rare scene

It turns out the scene in question was not random, however. It related to the harvest, so it could only occur in Earth season. That means each game has over a 90% chance of not getting it, and thus he had a 31% chance of not seeing it in 12 games. Except that there was another condition on the scene, so the odds of getting it plunge even more.

(The odds would be slightly different for the original Windows version, but I’ll leave that as an exercise for the reader.)

Conclusion

So what does this analysis say? I think it verifies our design goal of replay, since you will not see many scenes your first game. (And this is only talking about events, not your responses to them.) And even if you have played a dozen games, you have a pretty good chance of getting something completely new if you play one more.

Also, our marketing copy of “nearly 500 interactive scenes” is conservative, and we should have done the math before.

29 August 2012

KoDP 20K


Some more good news about the game: we have now sold over 20000 copies on the iOS App Store. When we released the game almost a year ago, we really didn’t know what to expect in terms of sales. King of Dragon Pass is a unique title from an indie developer, which are usually two strikes against it. But I think this counts as success. Most copies were sold when the game was fairly new, but it has continued to sell.

Worldwide Sales
Along with yesterday’s release of the original Windows version by GOG.com, the game has now reached a much larger audience than it found when it came out in 1999.

To celebrate this achievement, as well as the game’s upcoming anniversary (the iPhone version came out on 7 September 2011), the game is on sale in the App Store for $2 off, for two days only.

28 August 2012

Download King of Dragon Pass


We’re delighted to announce that the original King of Dragon Pass game is now available as a digital download, thanks to Good Old Games.

We have long wanted to provide a way for players to download the game. (When it came out in 1999, it was distributed on CD, as the most practical way to distribute 450 MB of data.) Back in 2006, we actually had a signed distribution deal (with another company). However, we were unable to rebuild the game in such a way that it didn’t require a CD, and still worked correctly. The fact that we were using a development system that had been discontinued in 1998 didn’t help.

Good Old Games took a different approach. I don’t know exactly what they did, but I assume it was some sort of patch. They do this sort of thing all the time, so they’re obviously good at it.

So if you can’t play the updated iOS version of the game, or are just interested in the game’s evolution, you can now buy the Windows version from GOG.com.

15 August 2012

Bugs

Like any large software product, King of Dragon Pass is not perfect. We wish it were, so we track bug reports and try to fix things when we do an update.

When we created the original game, we had a quality assurance team to find bugs. We also relied on beta testers. For the iOS version, we don’t have a paid team, and Apple limits the number of outside testers. So we have to rely on players to do much of the bug finding.

Today, a blog comment read “the game seems to be crashing often.” My first thought was “no, it doesn’t!” The second was “that’s not a very good report.” But then I thought, “what if it is crashing more often than I think it is? If so, I want to fix it!”

I remembered that Apple makes crash logs available to developers. Normally, if an app on your iPhone crashes, a log is saved on the device. When you synchronize, it’s copied to your computer. And if you’ve given the OK, it is also sent to Apple. (I believe only when you synchronize, though I’m not sure of the details.)

This is especially handy because Apple will combine duplicate reports. When I logged into iTunesConnect and checked, the top 3 crashes accounted for 71% of the reports. I grabbed these.

The logs by themselves aren’t very useful. They include a stack trace which shows exactly where the crash occurred, but only in numeric form. They need to be symbolicated — cross-referenced against the symbols (typically method or functions) of your app. For this to work, you need to save the symbols with each build. Luckily, when you make an archive to submit to the App store, the symbol table is saved. Unfortunately, Apple’s development tool Xcode is terrible about symbolicating. In fact, I was only able to symbolicate about half of the logs. Luckily, I could get one log from each of the top three crashes. And they all pointed at a method in my AdviceView. In one of them, the call stack included showQuestDialog, so I started showing advice and opening and closing the Quest dialog. Sure enough, I got the crash. From there it was pretty short work identifying what was going on (it was a message sent to zombie object, one that should have been dead). And easy to fix.

So this story has a happy ending, and one that makes me glad I’m an iOS developer and a lot of the work was done for me. (Bigger software developers often create a similar infrastructure themselves, to capture crashes in the field.)

But the moral of the story is: we can’t fix bugs we don’t know about! The 2.0.5 build has been played since February. Nobody mentioned anything until now. Please let us know about problems! http://a-sharp.com/kodp/bug.html explains how to send a report from the game itself. (This won’t do anything with crashes, but you can email bugz «at» a-sharp.com with the reproduction steps, and we can send back the somewhat picky details of finding the logs on your computer.

13 August 2012

iPad in Beta

Last month I mentioned that we were still converting screens to use final iPad-sized artwork. That process is complete, and the game has gone out to a number of beta testers, to make sure everything is good on a variety of devices and versions of iOS. (We’re making a universal release, so the same game still needs to run properly on iPhone and iPod touch.) We’re testing here too, and have been squashing a number of bugs.

It hasn’t been in testing long enough to have confidence in the code quality, but things look pretty good so far.

As a developer, most of my testing consists of looking at specific parts of the program (either something I just changed, or to investigate a problem someone else has reported). But I finally got a chance to play a complete short game from beginning to end. This did reveal some issues that needed to be fixed. But it also felt like the game is finally on its native platform. You hold the iPad much like a book, and this meant that King of Dragon Pass really felt like an interactive story (and less like a computer game).

The iPad layout was actually constrained by not having artwork at any higher resolution than you see here. But the results are that text never covers artwork, and you almost never have to scroll. The text is super crisp (on a new iPad) and the iPad screen is bright and gorgeous, so the art looks great. It’s all a really good experience. And as you can see, we don’t need to hide the extra information (the list of clans was behind a button even on the Mac/Windows version), and the manual is available from within a scene.

So if you don’t have an iOS device and want to play King of Dragon Pass, get an iPad.

08 July 2012

iPad Update

Yes, we are working on a Universal update. Yes, it is taking a long time. No, iPad users won’t have to pay for this separately. No, we don’t know when it will come out.

But that’s not really news. We do at least have some concepts and user interface artwork that can go in the game (instead of the placeholder artwork we’ve been using).

Here is a sneak preview of one of the dialogs. You can see that we’ve enlarged text and buttons (since you hold an iPad differently than an iPhone). And since there is room to fit all the advisors all the time, it’s easier to consult them. But it’s the same dialog as always — you won’t have a different play experience on iPad (although the larger screen does make some things easier, such as less need for scrolling text).

This is the only dialog that’s completely converted to the new look, so there is a lot more work to do. And we still don’t have all the new artwork. But there has been progress.

25 June 2012

Gone Missing?

A recent App Store review (five stars, if you were wondering) wrote:
I have noticed some things are missing from the iPhone version (this one) that the old PC version had. Like allotting magic points to children and hunting and the ability to slaughter sheep, pigs and horses for food when the clan is starving. I can only guess what else is missing, though I hope it's not a lot. I'm not sure exactly what is affected but I personally am something of a perfectionist and would love to have the entire full game same as before.
I’ve written about this before, but in summary: I disagree. The new edition is better. A lot better. It removes a lot of fiddly bits that made little difference (Children magic, for example, was very rarely used), and we added over two dozen new scenes and a bunch of treasures. We improved the maps and added Game Center achievements. There are new advisors, and a lot of new advice. And you can play the game via VoiceOver.

One thing that was removed for practical, rather than design reasons, was the Tula screen. It was certainly a fun screen, but it really didn’t impact game play a lot. (And to answer another App Store review, no, it will not be in a Universal update.)
list of fixed bugs
Fixed Bugs

We also made a lot of bug fixes, many of which were impossible to fix for the original.

Oh, and you can still slaughter horses if you’re desperate for food.

So, I too am a perfectionist, which is why the game is not the same. I believe it’s a much better game than the original.



For more details about what’s changed, see these articles:

What’s New
Crafters
Livestock
Treasures
Map
Automatic Save
Choices
Back-Patching
(Or search all Design articles)