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

Sunday, October 25, 2009

Modeling Fruit Trees

I currently have a separate space set aside for the Orchard, and plan to prevent the deliberate seeding of trees in fields or gardens. I hope to figure out workarounds, but there's kind of a lot of issues with planting trees, especially fruit trees, amongst annual crops. Mature fruit trees are going to shade out most vegetables, for one thing - also, their root systems are shallow, so limiting plowing and stuff becomes a real headache.

On the other hand, there's significant benefits to planting trees in pasture - the trees provide shade and shelter, and provide food, and grass will grow under them. On the other hand, I don't really want players taking the orchard and pasture as the same place, so there need to be limits there, too.

There might also be clever players who try to establish fruit trees in the wild, and that should be difficult, but possible, at lest for the heartier species/cultivars. Not everywhere, though, and not too many. And, of course, there are wild food trees as well.

Anyway, until I figure that mess out, I will be restricting fruit trees to fruit-tree-approved locations - namely, a section I am calling the Orchard. My original plan was to divide the Orchard up into several rooms, and allow the player to plant up to 9 trees a room. I was thinking of this as a quantity of trees that's generous but not overwhelming, and a mental space that I can clearly visualize.

I haven't started coding the Orchard yet, partly because I'm not convinced of the wisdom of this implementation.

One problem I'm having is the artificial restriction. Unlike rows, where you can run out of space convincingly, tree planting is more of an art. Sure, the books say you should plant large trees (standard apples, nut, peaches, sweet cherries) 30-35' apart. But homeowners don't, and the character (someone with limited gardening experience, scrabbling for survival) might not, either. Plus, there's smaller trees, like plums, that might not take up that much space (20', assuming a bigger rootstock). So you might expect 16 smaller trees to fit comfortably in the same space as 9 larger trees - and, of course, the player is not planting mature trees - only saplings.

So I'm considering the benefits/disadvantages of faking a square footage thing. That is, every room has square footage X (hidden from the player). That can be taken up by a variety of perennial crops - maybe the player wants a few acres of raspberries! A tree takes up a set amount of space (which I'm probably going to declare as a block, even though it's more of a circle area.) You can plant without problem until the available square footage is taken. Then the player may get a warning that continuing to plant will overcrowd the saplings, or maybe there's a warning in the description somewhere. The player can continue to plant, crowding the trees more and more tightly (with more and more adverse consequences along the way).

This would be mildly more difficult, but not that much more difficult, than individual tree spots. It would take away some of the clear vision of the space - I think vivid descriptors, perhaps even location descriptors, would be vital. Something like "A row of raspberry bushes grows against the wall, bracketed by a pair of plums and an apple in full flower. A young cherry is still holding onto the last of its blooms." rather than "You see a row of raspberries, two apple trees, two plum trees, and a cherry tree."

I don't think I'd want much more than that - nine apples is pushing it, and sixteen plums definitely would be, for a dynamically generated description. That description is 3500 square feet plus the raspberries (maybe another 200 sq ft?) - if I could push it to 4400, I could call each room a tenth acre. (In my head, if not in the game.) It might also allow for row implementation if I wanted - that is, I could "make" short rows take a certain amount of space as well, so the player could grow corn between apples if she wanted to. Not a good idea in my opinion, but feasible? Maybe. And it might allow for tree planting elsewhere if I wanted. Maybe even a better overall space management allocation? Hmmm . . .

I don't really want to get into exact measurements with the player, partly because I think distances are not a helpful way for most people to imagine space, and partly because I think it encourages powerplay behavior. (And there's more than enough of that encouragement in-game already, as far as I'm concerned.) Plus, there's the whole metric/imperial thing.

Saturday, October 24, 2009

Weight and Volume Extension

Finished first draft of a weight and volume extension last night. It is currently strongly based on Eric Eve's Bulk Limiter. That is, the volume piece is currently cribbed from it, and the weight piece is an easy amalgam of that and the weight stuff in the new version of Inform 7.

Here's how the weight stuff works now:
- Every thing has a weight called mass, which is how much it weighs. (WOW!)
- Weight is currently handled in kg, but can be printed in lbs, which is how I generally think of things, so is helpful to me, while maintaining the deliciously natural internal logic of the metric system.
- Every container and every player has a weight called strength, which is how much it can hold. Anything over than that is refused using the blandest reply ever.

Here's what I want to consider:
- I don't think there's much advantage to handling density, but I certainly could, especially if I get an idea of how much volume one "bulk" is. The only thing I can think of is whether something sinks or floats when you throw it in water, which is interesting, but maybe not a gameplay necessity. Anyway, it should be a fairly easy thing if I decide to use it.
- I expect furniture will be made of materials - almost exclusively wood. It might be nice to model basic size and strength for supporters.
- Ways to manipulate heavy things. So you can't lift a log, but can you roll it? You can't lift an animal - can you push it instead?
- Strain limits. I can pack 50 lbs in my backpack, but the odds the bottom will tear out increase pretty dramatically. I can carry that pack around all day, but it will get more challenging, and my back will hurt tomorrow, and I'll be sore. Also, I might wrench a muscle or something.
- Things of near-negligible weight and size. Mostly these will be handled by bundling them together (a handful of feathers still has negligible weight but noticeable volume), but I should keep an eye out for exceptions.

Friday, October 23, 2009

Dear Inform, why do you hate me?

So after I updated Inform 7, I had to go in and redo all the nomenclature stuff. No problem - boring but solvable. Well, I got that patched up, plus another few things it was unhappy about, and then it compiled . . . and gave me an error page without any information.

That is, it's the "This really should have worked, but didn't" page. ARGH.

So I spent a solid day putting the game through the compiler piece by piece, and I can't figure out what's wrong with my code. It's pulling some really wonky stuff with the "this line is misaligned" errors, so I commented those out, and then it went right back to "This really should have worked but didn't," but in a very strange spot. At which point, I double checked my extensions.

And while there's a note on the Inform 7 website that Dynamic Objects works with the *last* version of Inform 7, there's no note that says it works with *this* version, and neither Dynamic Tables nor Dynamic Objects has been updated since the last release date. If it doesn't work, I am completely fucked, because pretty much all my code depends on it.

FUCK.

Thursday, October 22, 2009

Nomenclature finished!

Got all the names sort appropriately. There's a lot of very strange things people name children. There were a lot of gigglicious moments.

I have a couple concerns with the list I have:

- I may have inadvertently skewed the names towards European names, since those are the ones I encounter more and type more, and so find easier to type correctly.

- The list itself is inadvertently skewed towards Western names, given the time periods I used, and that the names weren't a random sampling - only the top 1,000, so names from small groups are bound to be left out. I don't remember seeing any Vietnamese or Thai names, and only a couple of Korean names. Japanese names have minimal representation.

- I left in a fair number of names I'd feel queasy about using for people. I mean, at some point, Commodore was a popular enough boy's name to make it on the list. I'm a little uncomfortable with the gender binary here. There were an amusing number of names that I'd tag feminine on the male names list, but since there can't be duplicates, I took them off. So there's no Rose, Marian, Ethel, or Edith in the male names list. On the other hand, I left a lot of the action names, job names, and war hero names on the male list. I may go back and change that. On the other hand, I kind of love the idea of having ram named Napoleon or Admiral.

I'm changing the instances to where the code picks names to use variables, rather than hard numbers, so it'll be easier to update the list numbers when I add/remove names.
(So instead of saying "Let R be a random number from 1 to 1000 . . ." I say "Let R be a random number from 1 to numberoffemalenames . . .")

It should clear up issues down the line. I hope. It's kind of hard to plan ahead, since I'm still figuring out Inform's little quirks. Stuff I think should work *awesomely* doesn't.

Modeling Plants

One of the tough things about plants is there's just too much to model. So I've got to decide how to do some basic divisions, and which features will add the most without being a complete deal-breaker in terms of coding.

Here's how I'm considering modeling annual vegetable crops now:
There's an object called a row - each row can be planted independently, although I don't think I will implement half rows and quarter rows. I am considering two row lengths: short ones for the garden, where most of the vegetables will be grown, and long ones for the larger fields, where I expect players will grow grain. (Pasture grasses are going to be modeled relatively shallowly, and since very different concerns are at stake, that will all be handled by a pasture object.)

Each row will store values for its particular growing conditions: soil fertility, friability, pest levels, weed levels, etc. At intervals, probably every hour, the row will update the growing conditions for the plants growing there - whether there's been more water or more sun, if there's a frost. (I expect to do this with a relation (growing in), but I'm fuzzy on relations now, so I have to experiment. I'm hoping something like "Repeat with R going through all rows: if a crop plant is growing in the row, blahblahblah" will work.)

The advantage to this over handling each plant individually is processor speed; plus, unless the player is trying to breed plants, there's no real benefit to treating each plant separately. Why would it matter if Tomato A or Tomato B dies? (In contrast, there may be a genuine loss if Bessie the cow dies but Pete the bull lives, rather than vice versa.) A player experimenting with different conditions will need to plant two rows of a plant to compare effects, but that seems like a small penalty to pay. Plus, the row can "fake" death of part of a row if necessary.

I'm hoping to get it so the player can address commands to either the row or the plants, and that I can get the parser to choose the right rows as necessary. I'll be limited the number of rows per screen, but it'll definitely be easier in the fields if ">WEED CORN" means the player spends a few hours pulling weeds, rather than getting a disambiguation like "Which corn do you mean: the corn, the corn, the corn, the corn, the corn, the corn, or the corn?" Playing with the parser is yet another thing I don't really get, so it'll be an interesting experience all round. I suspect it will be difficult to implement basically two actions from one command (>WEED [PLANT] vs. >WEED ROW), but if nothing else, I can implement a meta-command, like >WEED GARDEN.

Naturally, this brings up issues if the field is very weedy and large - there has to be a way to stop the action in the middle if the player gets hungry or injured or whatever. My, isn't that going to be fun? Still, there's got to be a way to do it. If Nethack can do it, I bet I can. Still, I think I might leave that aside, as that's going to be tricky meta-behavior, and will need to vary from action to action. That is, it's not just "Instead of doing something when the player is hungry:" behavior - I think I may need to classify actions into crucial and non-crucial, with crucial being ones that shouldn't be interrupted (ie cooking, going home) and non-crucial interruptable (sleeping, weeding, fishing, etc.). I do think the game shouldn't prevent the player from doing non-crucial things if she wants; sometimes it might be vital to get a field harvested before a storm, say, and the game would have a tough time predicting all those occasions.

Wednesday, October 21, 2009

Nomenclature updates

So, an update to the animal name debacle. Well, I guess it wasn't that bad - just a bunch of boring, boring work that's not quite done.

I was feeling strong this weekend, so I went into this handy excel sheet cribbed from Dan Meyers. I'm not sure how he extracted the data, but he has a solid 100 years of the top male and female names born in the US in one handy excel spreadsheet. Well, okay, semi-handy.

I basically did interval selection on the names, figuring that the difference between 1890 and 1891 would be pretty small, so I did each decade instead, from 1890 to 2000. Put all the names in one column, and filtered out the duplicates. As a result, I got 2500-odd male names that were semi-popular in the last 120 years, and 3500-odd female names. It's surprisingly interesting work going through them all, although I will be grateful when I'm done. I'm up to about name 1000 in each of them. Basically, what I'm doing is pulling out spellings I find difficult or confusing, names that are either completely off the wall or that are too close to another name I want (ie Brian vs Bryan vs Brion vs Bryon). Some of the silly names I'm leaving in, as I can imagine a sheep named Commander.

I'm less picky with the male names than the female ones, because the ratio of male:female names is likely to be pretty low amongst farm animals, and so the player will be typing them less often. We'll see how the numbers come out; I'm hoping for 1,000-1,500 for the females, and about 1,000 for the males.

I did look at replacing the nomenclature values with indexed text, but it got kind of ugly pretty quickly. Since there's a rename option, I'm not too worried. The players will give up the ability to name all their chickens "SOUP", but so be it. I am planning on keeping a list of gender neutral names for insertion later, so there's a chance of a silly name somewhere along the way. Actually, there's plenty of human names that are plenty funny as is (Armani got cut, I'm afraid), and others that are funny in context (a ram named Byron? WIN.)

I've made a note to play with using these as external files, so people can tweak their own, but I think that will wait until I'm in a mood for frustration.

Monday, October 19, 2009

A word on betas

I've been reading a lot of reviews of games where people say things like "the betas must be good at puzzles" or "the betas must not have gotten this far" or something along those lines. In my (very very limited) experience as a beta, just because you complain or point something out or create funny little stories pointing out how something needs to be fixed does not necessarily mean that it's going to be fixed.

Often authors are too far along to do the rewrite they need to, or too caught up (even with betas) to embrace the need to better clue puzzles. So, sure, it *could* be the betas' fault, but it could also be, you know, the person who wrote the story. I'm not sure that it's at all kosher to point out that I *noticed* and *warned* the author about some of the bad stuff in reviews, so I just want to say, generally speaking, please don't assume it's my fault.

It's true for my games, assuming I ever complete them, too. I put the stuff in, misspelled or incoherent or unplayable, and I'm responsible for that.

There's no doubt that betas can make games much, much better, but it the author isn't willing or able, then the best beta in the world isn't going to help. I guess an argument could be made that the best beta in the world would be able to eloquently show the author the error of her ways, but ultimately I don't think of that as my job. I'm happy to make a case for something I feel strongly about, but I'm not a community spokesperson on the Importance of Grammar and Well-Hinted Puzzles.

Edit: Also, authors frequently just don't allow enough time for beta and fixing. It's well-nigh impossible to get a 2-hour competition game from beta to solid release in, say, a week, which is when some authors are ready to go. There needs to be plenty of time for adjustment, feedback, more adjustment, and then hopefully release to another set of fresh betas, and more tweaking.

Thursday, October 15, 2009

Dynamic Descriptions

Part of the challenge of trying to make a game that's going to be played over a long period of time is to keep the material fresh. Even in some of the shorter IF pieces, I've noticed that room descriptions can get stale; what to do when the player will probably see the same room description dozens of times throughout the story?

I'm toying with the idea of trying for semi-dynamic room descriptions - that is, some elements would be static (there's always a wall here, a house there), but mostly not. The game would pull together a description from various things - weather, time of day, player's physical/emotional state, what's in the location - and give a paragraph describing what the player notices.

Tricky to do in a way that feel fresh and coherent, but something to consider.

Thursday, October 8, 2009

Inform Update and Kind of Value (nomenclature)

I was so sure I had the latest version of Inform. Well, turns out I didn't. Downloading it broke my code big-time, and I'm not sure how to go from here.

Here's the issue:
Originally, I defined that animal names as a kind of value. Why? Well, partly incompetence, and partly because it seemed like a good idea at the time. The name values are defined in a Table of Names (I'm clever like that about naming stuff). The names were gleaned from the Social Security Administration, which apart from making sure people are using the right social security number, also publishes massive quantities of information about baby names. Great! I thought. An easy shortcut to having a significant number of animal names.

So I made a big list, with female gendered names at the beginning and male gendered names at the end, and called it a day. The last version of Inform handled this with aplomb.

Well, unfortunately, some names are used for both genders, and the current Inform doesn't want to add a value to a list of value when it's already defined. So it gets to the male names, finds Ashley, or Anton, or Armani, which apparently parents named their female babies this year, and freaks out.

The easy fix would be to remove/replace those names that conflict. Tedious. But at this point we're talking a tedious easy fix to a short-term solution.

I suspect that I would have been better off making names text originally, except I might run into trouble if the player wants to refer to the animal by name - I think that requires what Inform calls "indexed text" and what I call "WTF text." I have had real issues getting indexed text to work properly for me on the few occasions I've used it, and it edges dangerously close to rules I'm not comfortable with - a lot of that fiddly stuff is still in Inform 6 or something. (Hey, I remember why I made names a new kind of value now, and it wasn't pure laziness. It was fear. See, this is why I need to keep development notes.)

The other downside is pure laziness - I have to find a way to put double quotes around all those names. (Right now, there's ~2,000, plus the names of wild animals.)

Also, there's a bunch of names that are essentially nonsense. I need to weed out the names that are tough to spell. I love the idea of having a cow called Anastasia, but I'm not typing "milk Anastasia" twice a day. So I need to:
- figure out what I'm going to do. I could put mixed gender and generic animal names in a neutral gender section in the middle of the list, and allow either gender to pick from them, or I could eliminate the gender that doesn't seem "right" to me, or some of both. (Armani is not a girl's name in my game.)
- weed out all the difficult to type names
- weed out all the names I *hate*
- look at the longer ones and make sure they're names I can type and would be willing to type
- find replacements for the names I removed

This is not what I want to be doing right now, so I'm wondering how I can shelve it for later. Some days I feel like fiddly stuff, other days . . . not so much.

Tuesday, October 6, 2009

IF Comp 09: The Hangover

So same spiel as last time: here be spoilers, and there's no cut, because Blogger is evil and I am more interested in playing IF now than foiling the evil that is Blogger.

Right now I'm mostly posting comments as I go, and I'll write up more formal reviews of the ones I think deserve them.

So, unless you want spoilers for Hangover, which is "the story of you," you better get going. I mean, you wouldn't want to spoil yourself about you now, would you?

------------------------- Fake Cut! -----------------------------------------
Start : 8:57 PM

I was semi-interested in this first intro sentence. I mean, the story of me! Sweet! Except "You awake in your apartment with an unknown women and your bank informing you that you changed your name last night."

I've never woken to a bank in my apartment before, nor have I ever had an account with a bank open past 4:45, so this seems a little implausible. And I can't imagine the contortions I'd have to go through to change a name on my account. Or maybe I filed a change of name form with the government last night. It's unclear. Guess I better play the game and find out!

The game provides no intro text - it literally dumps you in, and smugly tells you pushing enter (to get to something that isn't a title) doesn't work. I'm chalking this up to ADRIFT, which I haven't used before. Dear ADRIFT: You suck.

First paragraph has rampant punctuation, spelling, and grammar issues ("your west"? Really, game?). This is the second game that has had issues with basic English competence in the first few lines. It's hard for me to believe that a game is bug-free if it doesn't look like anyone has bothered to read over the descriptions once or twice. (Okay, not everyone catches comma splices and its/it's errors. But "ill-loking bed" makes no sense.)

My robe is "so wretched George Carlin would faint." I know George only from his youtube video about the words you can't say. Did he have a bit about bathrobes?

Examining the bed brings up the delightful sentence "I'm pitty you for the sole fact that you actually sleep there." This makes me strongly suspect Red Conine is an ESL speaker, which makes me feel bad for being so mean about the language issues. Then not so bad, because if you wrote something in a foreign language, wouldn't you run it by a native speaker or two before releasing it? Regardless, I promise I won't poke fun too much at the English errors unless they're very very funny. Or I get really angry.

Your bathrobe is in the room description, even after you pick it up and put it on. Sigh.

I would like to say on behalf of poor housekeepers everywhere: I take excellent care of my teeth, thank you very much.

Uh - "women" doesn't seem to be a typo - everywhere that the one, single, mysterious woman is mentioned, she's "a women". And sometimes capitalized. I kind of like the idea you might have the Aristotelian ideal of Woman in your apartment. That would be cool. Unfortunately, this game seems creepy and borderline misogynistic, so I'm guessing that's not what's happening here.

The game is actively mocking player-me for having green plastic chairs. As much as my character is apparently a lush and a creep, I feel the need to say "Hey!" This is how much the game is actively pissing me off. I mean, who decided I had three 1980's green chairs anyway? And now it's mocking me? (Also, I'll have you know that retro is *very* in right now and I, personally, would like very much to have three cool green retro chairs in my apartment.)

The bank's grammar is awful. Also, apparently after the government changed my name last night, showing amazing speed for a beauracratic organization, the bank instantly was notified, and the post office must have been working overtime, because there's a letter on my doorstep the morning after I changed my name. I find it hard to believe that the same group that took six months to issue me a passport processed a name change overnight.

Okay, I'm done. I went out to the street and into a burger joint, where a "women" name "Deby" has no respect for "you, the customer." Considering this game appears to have no respect for me, the player, this is the straw that ends this session.

Finish: 9:47 PM - we're clicking right along, aren't we?
Score: Right now, 1.

Note - I'm saving my transcripts for these games. I'm often interested in how players go about stuff, and I wish more people updated this sort of mundane stuff. I'll probably load them in a batch at the end.

IF Comp 09: Trap Cave

I'm starting late, since I had Stuff to Do this weekend, but here we go!

Trap Cave is the first in line.

But first, a note. I followed Blogger's instructions for inserting Livejournal type cuts, and it broke the blog.

Big time.

So there's spoilers galore here.

Here be dragons.

Okay, you've been warned.

------------------- La la la not a real cut ----------------------------

Start: 8:40 pm

So the opening note is that the English version isn't fully translated. That is, indeed, an IMPORTANT NOTE. At least it's not an important note about the death of the author's beta tester or something. The note apologizes for the "inconvenience" of not having the game translated.

I do not have a good feeling.

Oooh, ASCII art. Oooh.

Opening paragraph has a dash where there should be a comma, and a slightly confusing sentence structure. Second paragraph has a weird tense issue. "The last thing you remember is your march . . ., as suddenly the floor collapsed . . ."

Irritation: I can't use the enter that I want (the one on the right hand side of the keyboard by the number pad). Can't get mad at the author - I'm assuming this is a program "feature."

Looking at myself shows the first bit of German. Insert your own guess-I-hit-my-head-harder-than-I-thought joke here. Oh, and it resets the room description to German, too.

Okay, it's clear that only the commands have been implemented in English. This is fascinating, as I kick and scream for help and try picking up things until it becomes clear that essentially the whole game is still in German.

Look, I have total sympathy for running out of time. But this is huge - if you're going to ostensibly release the game in English, release it in English. If you're not, don't provide the slightest of translations with an apology. This is not okay. This is unplayable. Also, it's essentially a menu-based game, where your actions are entirely prescribed by the author. I might accept this under other circumstances with protest, but I'm already irritated.

Finish: 8:51 PM
Score: I'm not even sure how to touch this one, as I don't really feel like there was a game to play. The one description I read seemed uninspiring and cliched, but maybe it got awesome later. I mean, the cave had a lattice door in it! That's more interesting than a gazebo. (Zork II, I'm looking at *you.*)

"Fun"

Something I was contemplating this weekend: Why would this game be fun, anyway?
I mean, I wouldn't code it if I didn't think I'd enjoy playing it at some point. But "fun" is such a weird, nebulous thing. If it's outside the mainstream, explaining why something would be fun can be a challenge. So what's the pull of playing an IF that's essentially a big farm sim?
It doesn't really have a plot as such, and certainly not a story as such, even in the extended design plan, which is the usual reason I give for playing IF.
Some things come to mind:
- Cracking the system. For someone else, who comes in from outside the game, there's a sort of pleasure in figuring out what needs to be done. I anticipate the main hurdle to be surviving the first winter - after that it'll probably get easier.
- Exploring the world. I expect the world to be relatively large, between garden, orchard, fields, pastures, buildings, and wild areas, and hope to have it change over time, which is cool.
- For genetics geeks like me, there's something kind of cool about teasing out what's inherited and trying to isolate the right gene combos to get what you want.
- There's the joy of seeing something you built over time change and grow (i.e. planting an orchard and getting fruit from it, seeing it blossom, etc.)
- There's the achievement piece - have you completed all the upgrades on the house? Put on a nice new roof?
- There's a time management piece - there's no way you can keep on top of everything. What are your priorities?
- There's sort of a curiosity/world building piece I should really work on - not that this is pure realism at all, but what would someone's options be if he/she was cut off with limited survival skills? And playing a game is more fun than actually doing it.
- Responsiveness/growth - this is sort of a world-exploration thing, but discovering what you can do. Since skills grow with practice, the player should have more opportunities to do stuff.
- And, of course, if there's anything Dwarf Fortress has taught me, it's that losing is fun. Hopefully it can be here, too, rather than infinitely frustrating.

I'm definitely concerned about the game becoming too easy after the first year. I can think of a few deus ex machina ways to slap up the difficulty level, but not many organic ways.
One thought would be to begin to introduce other survivors that need to be supported.
Another would be the increasing affect of wilderness - as the area becomes more fully abandoned, predators move in.

Either way, that's a long a way off, and definite supplementary material.