Design and documentation journal for my interactive fiction (text games); also reviews and other miscellaneous stuff.

Monday, September 27, 2010

Integrating Help

One of my ongoing goals is to integrate as much help as possible into the game.  FTA isn't really meant to be a beginner IF, but there's a number of new actions and complications that aren't meant to bewilder. 

A tutorial option is Plan A.  I'm putting it off until I'm got most of the mechanics in place, for fairly obvious reasons.  It's a bit tricky, since integrating the tutorial into the current beginning of the game means dealing with different choices people have already made.  Since players have a chance to buy stuff before "arrival", they need guidance through the "what to purchase" phase as well as the "what to do with it" phase.  At this point, I'll probably do a tutorial "build": set all the difficulty toggles to easy, give the stage a set of standard equipment, including the various kinds of things the player should know about.

A separate tutorial that segues into the main game is an option, but the immediate lead-up to the game opening is travelling, not survival, so I'd have to set the tutorial in another time/place, which I'm not thrilled about.  I suppose I could do a separate mini-game theoretically unrelated to the main game, but I really don't like that option - playing a game to get to another game just seems like work.  Besides, I like built-in tutorials in other games.

Of course, not everyone is going to play the tutorial, even if I encourage them to do so.  So there needs to be a readily accessible option for players that are in over their heads and don't want to restart, or for players who played the tutorial but can't remember the specific details.

Secondary to that is a universally accessible set of quick references: the player can type "HELP ON [something]".  For verbs, that includes a description and quirks, the specific command structure to use it, and related topics the player might want to check. 

  Here's the entry for the climbing verb:

This part of the world is relatively flat, according to the survey maps you’ve seen.  There’s a few boulders and maybe an old limestone cliff or two in the region, but there’s bound to be a path somewhere that doesn’t include risking life and limb.
If you’re really determined, you can always try CLIMB CLIFFS.  If you’re feeling less adventurous, you can also CLIMB STAIRSRelated verbs: Go.  Related topics: Injuries.
In this case, the verb help is mostly a redirect - letting the player know that climbing isn't an important part of the game.  (It's alpha text, in case you couldn't tell.)

Other help topics cover the major kinds of things and game concepts: a brief overview, followed by specific uses of the thing in question, or the rules governing it, and the commands for making or using it, with pointers to related topics or verbs used.  The nice thing about this is that (theoretically!) the player can type the name of something she's having difficulty with, and get the proper command structure directly:

Bessie doesn't even budge.


Bessie doesn't even budge.


[Other info, verbs here]

You can move a herd of animals, or a single animal, with MOVE [animal] TO [place].  You can also use the verb DRIVE instead of MOVE.  You'll most often want to MOVE HERD TO BARN or DRIVE COW TO EAST PASTURE

In this example, there's partly a failure on the part of the author, but there's also an easy recourse for the player - rather than playing too much guess the verb, she can skip ahead.  Of course, if I forget to mention something in help, the player is screwed, but if I get it right, then the lack of mention means the player doesn't have to worry about it.

The major upside to doing this is that I'm finding it clarifies a lot of the details of verbs.  I've had ideas for movement, but having to make it concrete, even in a alpha kind of way, helps other things fall into place.  It's sort of like design documentation, but it has an in-game purpose, which makes it easier to write and follow. 

Part of the difficulty I'm having is that I'd like to speak to the player-as-character as much as possible, so ideally I'd like both verbs and topics to be a sort of mental dialogue.  I thought about separating verbs (which are clearly mechanics) from topics (which are actually things a character might think about) by using different commands for them, but immersion loses out over playability here.  Also, by the time the player is asking for help, immersion is already gone; getting her back quickly is more important than pretending she's still there.

Ideally, this is available in a menu-based help system, for those that prefer it, but I'm not sure how feasible that is.  (Also, I hate menus as both a player and an author, so I'm sure that bias factors in.)  A separate, printable document with lists of help topics available might be just as useful.  

The big thing is making sure the interlinkages are present; ideally I'd like to have a response to HELP that redirects the player to a few main topics, which send the player on to specific things.  Sort of a tree thing.  I can't quite come up with a good structure yet, so they're all currently individual (and mostly unfinished).

Plan C was gentle nudging messages; after failure of a certain verb or a certain number of tries at something.  This is basically a redirect to the verb used, but I'm finding it incredibly intrusive and irritating, so it's been dropped for now. 

Other helper type things: The character has a goal list for overarching projects, so if there's nothing to do, she can check her list and go work on a project.

I'm considering how feasible it would be to give the character a sort of "memory" to help prevent crisis.  So if the animals haven't been fed all day, and the character tries to go to bed, she might remember suddenly that she forgot to feed the chickens.  Some damage will have already been done, but not nearly as much as it would be later.  I like this idea, since it's somewhat true to life, and would be easily toggleable for harder difficulties. 

Wednesday, September 22, 2010

Innards: Growing Degree Days

Growing Degree Days is one of those wonky agricultural concepts that appears initially to make no sense whatsoever and then you realize that everyone ought to be using this. Like the metric system. (If you are living in a metric country: kudos.)

Here's the basic idea: Plant growth is a function not only of light, but temperature. Sure, plants need to be above a certain temperature to survive, but also above a certain temperature to grow. This temperature is different from plant to plant, but usually it's about 50F. Any lower than that, and it's better for the plant to wait for the temp to rise. Above that point, growth is not purely arithmetical; photosynthesis is temperature dependent (assuming full sun).There's a peak to the photosynthesis rate as well; as temperature rises past that point, proteins in the plant become less stable, and the rates slow pretty quickly. This is one reason that you're not necessarily better off in a greenhouse; if that thing overheats, you'll find growth slowing to a crawl even before heat stress kills your plants. That point is around 85-90F; usually plants will cope up to about 100F, and then flounder. Photosynthesis isn't the only reason for this, of course, but it is a major one.

If photosynthesis and growth were just tied to day length, farmers and gardeners could predict harvest dates with a high rate of accuracy. Unfortunately, while sun exposure is pretty constant, temperature swings way up in the summer. In about two months, the average temperature increases by 30-40F/day, with a corresponding burgeoning of plant growth. The bulk of growth happens in July-August because that tends to hit the ideal temperature range.*

There is a fantastically complex equation for putting all this together and calculating how much heat a plant has gotten, but it's complicated and involves curves and people like nice easy numbers. Growing Degree Days gets you pretty close to the real thing: The average of the highest and lowest temperature for the day, minus your base. If the number is less than 1, no growth happens (but neither is it reversed). You'll notice that most normal temperatures will give you more than one degree "day" per 24-hour period, but that's scientific acronyms for you.

The good news about GDD for FTA is that it gives you a single data point for maturity, and a single data point determining how close the plant is to maturity. The growing degree days to maturity for a given plant does not vary much, if at all; the growing degree days for a given day are easy to calculate and track. As an internal mechanism, it's hard to mess up, since it doesn't rely on anything except one extension.

Each day, the game grabs the high/low temp (Weather presents these as NTemp and Dtemp), averages them, subtracts 50, and adds any result above zero to any living, growing crop. A few crops, like cabbages, actually will grow below 50, so I may need to tweak stuff there.

The downside of this method is I need to track down these numbers and calculate them for any crop I want to put in the game. Despite the niftiness of GDD, pretty much every seed catalog uses plain old days (ie 110 days to harvest). This is subpar, since they rarely tell you where those 110 days take place. 110 days in Georgia are a far cry from 110 days in Maine, so there's a surprising amount of guesswork involved, but at least the chosen numbers will be internally consistent.

(The other nice thing this opens up is letting weather changes affect the whole crop without having to tweak various conditions. Which is nice.)

Small steps, but it's nice to get hold of helpful equations to drive the internal mechanisms - writing those is always the hardest bit.


* This also explains why you can plant, say, one tomato plant two weeks earlier than another, and they both ripen at just about the same point. The growth rate later outstrips the earlier growth dramatically, decreasing any advantage the early tomato might have gotten. Also, the earlier tomato may have had to deal with frost risk and a wider spectrum of hungry predators. The moral of this story is to let your neighbors plant the early tomatoes; you won't lose anything if you wait.

Monday, September 20, 2010

Quick update - fishing

Fishing has turned out to be a load of fun to research, in no small part thanks to the New York Public Library's archive of awesome. Did you know hammerhead sharks used to be called balancefish?

In terms of coding, I am way behind. There are a lot of really boring bits to do, like specifying how the game should put together a fishing pole. Because of the way Inform's set up, verbs with two nouns require a lot of repetitive disambiguation and referencing commands. "Doing something with a fishing pole" only counts for one of the nouns in putting it on, so you also have to write a whole series of commands about putting things on fishing poles. Which, you know, gets really old. I totally understand why this is here, but on the other hand: putting something on a fishing pole *is* doing something with it.

I have, finally, got fishing poles to assemble properly, although not automatically, which is the goal. My original idea was just that the character would rummage up some appropriate items for a crude rod, line, and hook. "But then," I thought cleverly, "what if they want to upgrade to a better rod, or I want to break the line? Those had better be separate parts." Then I looked at it and realized the player might actually try to manipulate those parts - untie a line, or specify which hook to use. And players might use verbs like "tie X to Y" to do so, and "tie" wasn't really equivalent to "put on", and from there was madness.

Now I get to buckle down to the real nuts and bolts of the thing, which I have enjoyed envisioning, but am not so much looking forward to implementing.

(Interesting note: Scientific names have changed a *lot* over the past 300 years. Very few fish have the same genus and species names as they used to. Lots of fish are findable under their common names, though - something they don't mention in biology much. Hopefully that period of reclassification is over, but I'm not holding my breath.)

Thursday, September 9, 2010

Feelie Creation - the trees

Yeah. Trees are not quite what I want, but I am very proud of my gorge, which emerged after a lot of experimentation and pig-headed erasing.

Here's the no-trees one. Hopefully I'll find a tree style that I like, because it's sort of naked without them.