Farming the Apocalypse

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

Monday, April 30, 2012

Quick update

I'm not dead. Real life is really really swampy right now, and I'm running on way too little sleep.  I'm still working on some boring peripheral planning issues, sort of apathetically, but it's stuff like "how the hell can I make this wibble here without making that stuff wobble" except even more boring, so you don't get updates on that.

Description work is being very difficult - sorting out all the parts is kind of agonizing, and my inclination to make things more complex is not working to my favor at the moment.

In general, I'm really struggling to sit down and code *at all*.  So I'm giving myself a couple weeks while real life stuff is likely to hit DEFCON 5 levels, and then I'm going to try doing Scrum-style sprints - small, maybe even tiny, programming tasks with deadlines.  Hopefully, this will be enough to start progressing codewise again, even if it's fairly small. 

Thursday, March 1, 2012

I've had farm maps kicking around for awhile now, but I'm trying to finalize it so I can start a serious build of the area, clarify sub-areas, and get cracking on the many actions and meta-actions that require the geography to be less mushy.

For maximum convenience and opportunity, the farm's located at a crux of biomes.  To the north and east are rolling climax forests of maple and beech.  To the west is an open meadow.  South of the farm is a mixture of sedge meadows and shrub thickets, dotted with alder and willow stands.

One of the reasons I've procrastinated on settling the final farm form is that it depends on having a fairly firm grasp of the place's history.  If it was abandoned last year, it's going to be a radically different place than if it's been abandoned for decades.  Plant succession (what grows after what) is difficult at the best of times, but it's especially complex on lands that have been tilled, especially those that have seen heavy agricultural use.  Land like that is not at all like land that hasn't been disturbed - it's more likely to be compacted, poorer in nutrients, and have less access to moisture and microbial support networks.  So the first few years after abandonment, what you mostly get are weeds.  Lots and lots and lots of weeds.  Then you get tough invasives from the neighboring biomes: whatever will grow and can outcompete the weeds.  In Michconsota, that means blackberries.  Alders.  Sumac.  Some light-tolerant and sturdy trees will sprout - cedar, maybe.  The fields turn into a dense, brushy scrabble that is almost impenetrable, which lets shade-tolerant trees grow up, which much more slowly grows into a forest.  Unless there's a fire or something.

And, of course, it also determines what condition the PC will find the world in, at least theoretically.  When I had planned to do procedural world-gen, this was not a problem at all - I just planned to let the player decide how long the place had been abandoned.  (Player choice is the programming procrastination's enabler.)  So here's the tension: I don't want to leave a lot of infrastructure around for the player to exploit, but I don't think it's entirely fair to give the player a "farm" that is in fact dense climax forest.  (Also, after looking at the number of trees per acre in a proper forest, I had a heart attack, because it's one thing to *give* the player the option to cut down thousands of trees, and it's another to *require* it before any proper stuff can happen.  Pretty generous spacing - trees 5' apart - still leads to 1700+ trees an acre.  And in a lot of these dense deciduous forests, it's going to be more like 20,000.  That's infinitely worse if I restrict farming to the actual farm, which I sort of need to do because combinatorial explosion, that's why.)

So I came up with a backstory to justify my preferences.  Problem solved!  New story: the world ended a while ago, but there have been semi-regular attempts to resettle the area due to Because I Said So.  The original buildings gradually were pulled down for firewood in winter, or to make other things, as they fell into disrepair.  The site proper has been completely abandoned for almost twenty years - long enough for shrubs and young trees to begin growing up in parts of the property.  There's been a series of fires that's kept the kitchen garden and much of the southern fields in grasses (and helpfully destroyed most of the infrastructure).

 Around 20-25% of the place is still forested - let's say 7-8 acres of ~40.  That's not really enough for self-sustenance, but it's a good start.  (Plus, the forests back up against the farm on the north and east.)  

  What's left are the stone foundations for the house and barn, and one outbuilding that can be used for shelter - probably a wellhouse, as it would probably be made of stone, and be motivatingly tiny, damp, and cold.  On hard difficulty, all the outbuildings will be gone - the PC can start from scratch.  Leaving the foundations behind is actually in keeping with some of the old farm buildings of the area, which really were built on big rock foundations, and it gives helpful hints to the player.  (And by "giving helpful hints", I mean "thank goodness I can find a reason to justify a single pre-determined structure because otherwise there will be some horrific player-made maze-y shit and I don't want to sort that out".)
Stone foundations.  (Image via

One of the first things the PC will probably want to do is clear out the kitchen garden area.  This (and the chicken coop location) are conveniently located right beside the shack.   

PC's will wish they had all this.  A field of grain, a garden, a shack, and some adorable chicken coops.  Not shown: chickens.

There's a bunch of time management issues for first-year occupants, including things like "where do I put things" and "where do I find time to build places to put things" and "where do I get food and wood and stuff to put in the places I built to put things in".  There are good reasons to build storage, housing, barns and coops, and good reasons to get plants growing, and of course, wood and stuff so winter is survivable. 

Priorities will differ, depending on strategy, but clearing back the shrubs to plant more fields, build a barn, and space for an orchard is probably the focus of the first few years for most PC's.

More or less fully functional farm - pastures to the east, fields to the south, barns and house built.

Since the farmhouse is the place the PC sleeps, eats, and stores much of hir produce, the places the PC needs to visit frequently are close at hand: the garden, barns, and chicken coops are two to three moves of the house, depending on whether you count "barn" as "outside the barn" or "inside the barn".

Places are roughly grouped by how often they interact: fields can be far-flung because there's almost no need to haul things from field A to field B, but barns are close to pastures, compost heaps are in gardens, etc.  It's not perfect - the farm's a little too big for everything to be a single step away from each other, but it's not too bad.  The woodlot area, pastures, and pond are farther away, but I'm trying to keep things fairly short, as long as the PC goes by a path. 

From one far side of the farm to the other can be as few as 7 moves - but if the PC takes the scenic route, it's a lot more. (There's also the meta-commands, like GO TO SOUTH GATE, but if you're old-school, it's still not too bad.)  I'm also trying to keep those paths almost entirely e/w or n/s - which means the maps below are *slightly* inaccurate at this stage, because I haven't got those lined up nicely yet. For some reason, my brain finds the ne/sw/se/nw directions to be a little confusing, so as much as possible, things are kept to the cardinal directions.  Well, okay, as much as possible while still giving the sense that the land is organic.  So off and on, really.  I'm pretty tempted to make the PC build the road themselves, because I am Hard Core like that, but I think it's probably bad game design.  (Still, I'll probably toss it in as an option, because when I play, that's how I want to roll.) 

Cutting through fields and forests rather than using the roads takes more time because the room-density is higher there.  The kitchen garden is the densest, because there's so much growing there that it's overwhelming to lump it all together.  ("This is the kitchen garden.  You can see a row of immature peas, a row of immature beans, a row of leafy spinach, a row of sprouting spinach, a row of ripe spinach, a row of young corn, a row of young corn covered with potato beetles, a row of young corn flattened by the wind, a row of wilted tomatoes, and six rows of cabbages here.") It's easier to break it into smaller pieces - helpful for the player's mental image of the space, helpful for crop rotation attempts, and helpful to the ghastly process that is procedural description generation. 

There's currently four "field" areas - two on the east and two on the south - as well as a "meadow" area to the west/north (depending on which map I'm working with) that can be used to harvest hay.  I'm considering the addition of one more field, essentially breaking the east side of the farm into three parts rather than two.  It would add a kind of nice symmetry.  The map is roughly divided into ninths, and that would enforce a "eastern" block rather than melding it into one, as well as give a slightly more flexible grazing operation. 

Map in different style, showing the main road axis and addition site of a third field/pasture block to the east.

I played extensively trying to get a nice tiled map version that would play nice for the player, and just couldn't get one that I liked.  I wanted one because it would be flexible for play style, and I still want one, but tilesets are a pain in the ass - plus, I'm not really up to more graphics playtime with Inform at the moment.  (The above was an attempt to see if I could a mock-up of something very, very simple that I thought worked.  It's not too bad, although I sort of hate the background green of the grass.  Very 1950's linoleum.  The advantage would be that there's fairly minimal graphics to upload - the engine could do squares of color.)  So it's on the wishlist, but I'm not going to worry about it for awhile.  It's not as absolutely necessary as it used to be, because the general locations of things are pretty much set.  Pastures/fields are interchangable, but the size and number don't change. 

Location descriptions are a the bugbear in the room right now.  As I've been throwing up quick test maps, it's become clear that there's some nasty issues with a changing landscape; the information that remains static is almost nil, and traditional room descriptions don't tell players who they really need to know.  So for now, there's no descriptions, until I get a little space to do a bunch of experimenting. I've got another post with Deep Thoughts in the making, but I'll wait to post until I have the first, no doubt hilarious, preliminary tests to share. 

For now, the push is on making sure this layout is one that *sticks* - how close can Human Experimental Subject A get to reproducing the layout after not looking at it for a week?  How easy is it to visualize, and is the string of directions she'd use to get from spot A to spot B close to the in-game room connections?  Also, working on the connection layout - you don't want to have 8 exits per location, but you don't want to lock down reasonable access. 

Oooh, it animates.  WOOOooooh. 


Friday, December 16, 2011

Lesson: Don't Injure Yourself While Your Projects Are Stripped Apart

In late summer, I fell off the curb.  It was one of those really simple, stupid things, where I put a foot wrong and just toppled forward onto my hands and knees, but this time physics and anatomy were not working in harmony, and I broke both my wrists. 

Only one had to be put into a cast, but typing wavered between being impossible and just being awfully painful.  Regular everyday activities, like eating and getting clean, suddenly consumed huge amounts of time.  Once the cast came off, there were braces and physical therapy.  All this was on top of an unusually intense period of real-life career-related chaos. 

So I suppose it shouldn't be surprising that I feel exhausted, all the time, and when I get home, all I want to do is sit in my comfortable office chair and then drag myself to bed.  All sorts of things have fallen by the wayside - cooking and exercise and social life.  I haven't even touched my code in months.  I'm imagining the bugs have been cheerfully fornicating in there, and when I run it, the whole thing will collapse like an rotting peach. 

I am a little surprised that this feeling has lasted so long.  I still love my project, and want to work on it, but I just don't have the energy or motivation.  It's remarkably similar to being depressed, in a way - my freetime definitely has a "flat affect" because I just don't have anything to put in. 

I am feeling the first tickle of interest, and I'm taking advantage of it to gently revamp the design documentation, and start easing into it.  But I know I fell in the midst of fiddling with the graphics code, so it's all disemboweled and horrific, and half-welded onto other bits but not all the bits, and there's still big chunks dependent on the *old* graphics code, or worse, on old color values, and I think I need to go breathe into a paper bag awhile.

Sometimes code just needs to be eviscerated; I don't regret doing it, but I defnitely wish I'd left a nice clean working copy of what I had.  I've never had a totally working copy with all the parts in it, but I did have a really nice graphics shell with testing commands that was being refined for beta testers, so it was really shiny and user friendly, and it worked.  I may just set all that aside until I'm feeling brave and/or tipsy; another month isn't going to do any additional damage at this point.

Thursday, October 6, 2011

IF Comp: How do y'all do it?

Judges, I mean.  (I don't know how authors do it, either, but whatever.)

38 games?  42 days, several of which are now GONE FOREVER?

I probably won't be playing many during the comp this year - I am temporarily typing impaired, and Real Life is wreaking havoc on my free time, but I salute you all.

Wednesday, September 7, 2011

I am going to consider this investigative research

Update Haiku

Both wrists "maybe" broke
typing and reading hard - what
else do people do?

Sorry for typos
vicodin makes pain better
everything else worse

Anyone know some
good dictation software?
For Inform or not?

Tuesday, September 6, 2011

GDD Calculator

This weekend I made a neat little widget to help me calculate how many growing degree days different plants have.  (The downside of having a devblog is that you can see when you're doing *exactly* the same thing you were doing this time last year.)  It's not tuned, but it's not bad, either. Basically, you can enter a planting date, and a number of days from the planting date; it gives you the estimated GDD for that number of days for the particular game location.

It has some shortcomings - notably, the weather system remains stable, so April 1 has the same weather average as April 30.  The total GDD for the location is a bit higher than it "ought" to be, largely because there's only an average of 11 degrees Fahrenheit between day temperature and night temperature.  Again, this is one of those seasonal things - there's much less swing in temperature during winter, whereas summer evenings have a swing of closer to 20 degrees.  Also, because GDD is never negative - you don't lose growth if a day is cold - the average GDD is misleadingly low.  So it's not perfect.  It is, however, a far sight better than using strict day counts to harvest, and it's a good starting point.  It got the few crops that I have GDD numbers for in the right ballpark, so that's heartening.  I plugged about 30 of the major crops into the table.

The part that might be helpful for testing/release would be the estimates of harvest dates given a planting date and a crop.  It could be useful internally (the game shouldn't suggest planting corn in August, when it's too late in the season to get a harvest), but it's not hooked up to the current system because I needed something quick and dirty.

For the game proper, I made another stab at a crude crop model - it grabs the GDD and applies it across the growing crops, and declares them mature once they hit a threshold.  It doesn't do anything else - you can't actually harvest them or anything - but it's a start. 

Yes, I'm still working on fishing, too.  Can't find a good way to streamline the process.  Am seriously considering reducing descriptions to modifiers of the noun proper instead of descriptions of the noun - so instead of talking about a large silver fish with a hooked chin, I'm thinking about more of a "The salmon is fat and fresh." type thing.  Because, you know, pretty much all fish are vaguely shaped the same, with similar fins and things, and it's hard to differentiate them, and not particularly helpful.  If players want to know what an alewife looks like, maybe they could Google Image it?  I dunno. 


Thursday, August 11, 2011

Fish Waffling

Brown Trout, looking appropriately skeptical.  Courtesy New York City Public Library.
So I just finished putting some of my notes into a spreadsheet, felt the glow of a job 10% done, and then the sinking feeling of realizing that you'd done research on a bunch more fish.  Like, where's the pike?  Any of the trout species?  The burbot, which I remember because when you pull it out of the water, it tries to wrap around your arm like a boa constrictor?  And those are the ones I can think of offhand. 

Upside: there aren't going to be just 13 species.  Yay diversity. 

Downside: someone has to do more research, and until I get an intern, that someone is going to be me.  I love research, I'm just not chuffed about re-research.

I'm also sort of leery of the way the odds for fish are going.  Right now they have a base frequency, and then bonus/penalties for the cold water, warm water, shallow water, deep water, slow water, fast water, whether it's not a prime feeding time, and whether it's winter.  And data for preferred baits. 

The result is a pretty intense table.  The advantage of having these in a table is that they can be tweaked en masse to make the difficulty easier/harder, or in response to environmental pressures.  But it's not the most helpful table, and I'm thinking of breaking these out into properties: cold-water tolerant, shallow-water feeder, active-in-winter.  (Yes, the names need work.)

I'd still need some sort of hard numbers for frequency and what those penalties actually mean, but it would make fish definitions easier.  For instance, I'm thinking cold-water fish (vs. temperature-tolerant or warm-water fish) just don't show up in warm water.  Period.  But I'm not really a fish person - they're delicious, but not something I know much about - and I don't know if that's fair.  I'm not even sure what makes fish prefer cold or warm water - is it the competition?  Thermal regulation?  Enzymatic activity?  This makes it hard to make judgment calls on mechanisms. 

I also need some measurement for bait; catfish theoretically eat anything, while sturgeon are theoretically pickier.  (I garden, so I've learned to take pronouncements on biological behavior with a grain of salt.)  I don't really know if there are categories of baits that go together: live bait includes what, exactly, and if a fish eats a minnow, does that imply it would bite on a worm?  A grub?  A crayfish?  And that's dependent on me getting bait worked out. 

I think bait needs to be pretty straightforward, so here's sort of the current experimental plan:
- Live bait: worms, grubs, minnows, and small moving things.  Includes artificial bait that looks/acts like live bait - spoons, rubber worms, etc.
- Non-live bait: usually odiferous, non-moving stuff - dead salmon, cheese, sausage, etc.
- Some sort of size mechanism - sturgeon eat non-moving stuff that's at least X g; perch have a range under Y g.  Maybe by body weight.

I wouldn't mind fly fishing (isn't that a separate thing from normal fishing?) but know NOTHING about it.  And while I have no problem with our Lone Survivor sitting around embroidering her underwear, I think tying artificial flies is just a little bit silly. 

I also need a way to spear fish in the shallows (and possibly deep areas near a bank).  I think I'm going to ban swimming out into the lake with a spear.  People do it in the tropical oceans, but I don't think a lake has the same fish density or temperature. 

Fun fact: Barnacles can't move, so they mate with these long extendable penises that look like something from Doctor Who.