25 August 2013

Anatomy of a Scene

Thinking of entering the Scene Contest, but not quite sure where to start? Let’s look at the basics of scenes.

A “scene” is what we call the basic interactive situation in King of Dragon Pass. It always has an illustration and a choice of responses. In most cases, it also has advice, provided to the player by the most appropriate ring member.

Since the story arc of the long game can take multiple generations, many scenes are designed to repeat within a game. (For the farmers to be unhappy is not unusual.) Others happen only once (babies in shield don’t show up every day), or happen in response to specific situations (tribes only form once, so you only get news about this once, though hopefully in every game).

Here’s a typical scene that happens to occur in the tutorial, as coded in our scripting language. (It’s edited to show only the more interesting parts.)

scene: scene_48SoraWantsWhiteHorse
scene002, right, [sora >= 0 AND .horses > 5], mayRepeat

The second line indicates which piece of art to use (here we reuse the illustration of Sora Goodseller) and which side the text appears (in other words, usually the less interesting part of the art). Next is a condition. It doesn’t make sense for Sora to live forever, so the scene shouldn’t happen after her death. And it’s no fun being asked for a horse when you have none. Assuming the condition is met, this scene occurs randomly. Finally, this scene can repeat during a game (horses don’t live forever either). Scenes don’t repeat for a number of years, however.

Scenes start by setting the, well, scene. Here, there’s a little logic so the text flows better if she has been by before. Note that the situation is also written to the saga.

if [sora > 0] then {
text: Sora Goodseller, a trader-priestess of the talking god, Issaries, returns to trade.
} else {
text: Sora Goodseller, a trader-priestess of the talking god, Issaries, comes to trade.
text: In addition to the usual exchange of goods, she asks if we have any white horses.
saga: The Issaries priestess Sora Goodseller came to our clan and asked if we had any white horses to trade.
if [d3 = 1 AND .horses > 5 AND walkthrough = false] then {
w = true
h = "<d2:mare/stallion>"
text: We do have a single white <h> in our herd. Sora made an opening offer of 3 cows worth of goods.
} else {
text: Although we have some light grey horses, none can truly be called white.
saga: We had no white horses.

To make things more repeatable, there is a random chance of having a white horse (tracked in the variable w). (For simplicity, the tutorial never has one.)

music: "CouldBeGood"

Each scene has accompanying music relating to the situation.

And now to the responses. These may be shown depending on various conditions. In this case, whether we have a white horse or not. (Remember that the scene won’t run unless we have at least 5 horses, so the response doesn’t need an additional condition.)

[NOT w] response 2: Apologize for not having one, and throw her a feast.
text: Sora said that the lack of a white horse reflected poorly on neither our generosity nor our hospitality, and the feast was proof of both.
saga: Embarrassed that we had no white horse, we gave her a feast instead.
.mood += 2
.cattle -= 5
[w] response 3: Give her the white horse.
otherClan = RandomClan(KnownClans)
text: Sora inspected the horse closely, then insisted on paying for it. She seemed very pleased with the <h>, which she named Snowflower. After taking it for a ride, she told us about her visit to the <otherClan> clan, which had spoken ill of us. However, we realized it was due to a misunderstanding, and she agreed to let them know of this.
saga: We gifted Sora with a white <h>, but she insisted on paying. She helped clear up a misunderstanding with the <otherClan.plural>.
otherClan.attitude += 3
.goods += 4
.horses -= 1

These two responses are fairly self-contained. In response 2, we slaughter some cows for a feast, and the people’s spirits raise. Response 3 has some other consequences.

[w] response 9: Sell the white horse for a treasure.
text: “I have no magical treasures I can offer, I’m afraid.”

This response doesn’t end the scene. Responses like this can make the scene a bit more complex, or allow the player to make multiple choices (such as sacrificing for magical aid before embarking on a mission).

Most scenes don’t have 9 responses! This one basically has twice as many because it needs to be interesting if you have a horse or not. Our original plan was that every scene have 5 responses. But 3 is enough. The main thing is that there shouldn’t be a response that is so obviously good that players would always pick it, or so obviously bad that they would never choose it. In the first cases, there wouldn’t really be a choice at all. In the second, we would be writing (and testing) a useless response.

Of course, it’s OK to mention other choices, as in some of the advice.

[Animals >= 2] A horse is usually worth four cows. [46]
[Animals >= 3] A horse is usually worth four cows, but white horses are fairly rare. [4789]
[Elmal] White horses are sacred to Elmal and to his wife Redalda, the horse goddess. [0]
[Uralda] You can’t get cheese or cream from a horse. [36]
[Trickster AND NOT w] We could paint a horse white, I’ve done it before. [5]
[Daring AND NOT w] Let’s go steal her a white horse! [0]

Advice can be conditional as well. Note that the quality of the advice depends on the speaker’s Animals skill. In general, the game gives skill-based advice first, and then advice that depends on religion or personality. Also note that most of the advice includes recommended responses.

That’s the basics: situation, a few responses, advice. Scenes can be a bit more complex by asking for additional responses. Here’s one from a scene about a suitor.

response 2: “He must first prove himself worthy.”
saga: We required him to prove his worthiness.
text: <l> asks you to name a test for <suitor>:
response Skill at arms
response Poetry
response Pig calling
response Plowing

Although the examples here are in our OSL scene language, we didn’t expect our authors to write code. Nor do we for the scene contest — just come up with the basic situation (and optionally a way to illustrate it), reasonable responses, plausible consequences, and some advice.


  1. Just listening to you on the Game Design Round Table, about half way through.
    Any update on an Android version since 2011?
    From what I understand google has some ways of dealing with piracy these days, I read something a few weeks ago about disabling pirated versions.
    Here is a link, http://venturebeat.com/2013/05/15/google-play-game-services-can-shut-down-a-pirated-game/

    1. Don’t really have any more to say about Android right now.

  2. Any new about the scene contest? Are all of them over the top or could you find some hidden gems among them?

  3. Do you plan to eventually update the gog version of the game as well btw? I bought it last week, it's really enjoyable! :-)

    1. No, we can’t upgrade the Windows version for technical reasons (e.g. http://kingofdragonpass.blogspot.com/2013/06/architecture-redux.html).

  4. Dang. Looks like i will buy an ipad in the near future.

    1. It is likely that new models come out next month.

    2. I imagine the game will play really well on an iPad Mini.

    3. Yes. The text looks better on a Retina display, so I hope that Apple comes out with a Retina mini.