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

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.

Monday, August 8, 2011

In Which I Realize Something Obvious About Inform 7

Just now I realized that instead of typing "Every turn when the minutes part of the time of day is 00:" eighteen thousand times, I could just make a set of every hour rules, trigger them once, and then just specify "Every hour: do stuff!"

Makes the code easier to read and write.

In Which I Make a Rock

So I've been trying for days to make a rock.  Who would have thought that a convincing rock is so much harder than a convincing tree?

Why are the background colors weird?  I dunno.
It's still not what I would call convincing - there's something non-organic about it, despite the fact that it was more-or-less based on an actual rock.  I do like the moss, though.  And I think I like the snow shading, which looks deceptively simple but actually involved about an hour's worth of gradient tools and blur and smudging and shaping and brushes.  I tell you, I cannot wait to work on a tropical island version of this game, where there are no seasons, no snow, and all rocks have been made by aliens and are *meant* to look like those plastic rocks you can put keys in.

Trying to get the grass looking decent is . . . progressing, if by progressing one means "I have tried a bunch of stuff that didn't work, and then my brain went funny and I don't know if it's better or not."  Also, I did some stuff on the wrong layer, so it's not really reproducable the way I'd like.

Here's one experiment with flowers.  It's TOO MUCH at this point, but I think there's potential in there somewhere.  It's better if I take out a bunch of the middle-distance trees.  On the other other hand, Michiconsota summers are pretty much a froth of TOO MUCH, so . . . yeah.  I dunno.  (I moved this layer down a bunch, because it was too high, and took out a lot of extra greenery, so you're missing a bunch of the effect.)  I do like that suddenly this thing has the feel of looking over hills.  How did that happen?  I wish I knew, because I kind of like it.  And I like that there's some color at midsummer.  There should be color.  Just not sure how to add color without it being all overwhelming. 

Wait, no, that's a lie. 

Just rip the middle-ground trees out, and voila.  (Note to self: Do not think about the hours you spent crafting the middle ground trees.  Just think: better one, or better two?) 

Also that grass color is subtlely wrong.  (Green is one of those really tricky colors, where it has to be just so.  Like brown.  Orange and blue are more forgiving.)  Also tried shifting the background trees a little more blue, to give the illusion of distance, and . . . yeah, that's not working.

In other news: I procrastinated this week.  (Well, not so much procrastinated as "went outside, saw the sun, met friends, drank beer, made bread, put a new video card in my computer, played Fallout 3, searched for help on game-breaking bugs in Fallout 3, marveled at how many there were, and managed to force my game into a semi-workable condition.") 

Whenever I get a little excited about Skyrim, I go watch the video of the guy demoing it and immediately feel better.  There's just something about the presentation that dulls my excitement.  I have a history of getting super-excited about Bethesda's stuff and then having them do B-quality work - enough so that I don't feel totally outraged, but most of the fun is sapped from the game. 

Monday, August 1, 2011

Crops, Part the First

Crop plants are an entirely different thing than the wild plants, and require a lot more delicacy.  There's kind of a bunch of factors, and I haven't quite sifted out "want to do" from "plausible to do" from "bad idea".  A lot of the crop planning that I did was done either before I started programming, or while learning I7; as such, it doesn't really take into account things like "difficulty" or "memory".

Initial plan: Implement lots of crops, each with lots of cultivars.  (A cultivar is a specific type of a species, like Red Delicious apples or Brandywine tomatos.  There can be dozens or hundreds of cultivars per species, each with a unique set of genes.  Sometimes those genes are better than average - maybe Jonathan apples are unusually resistant to disease.  Sometimes they're worse - Brandywines don't ship well at all.  That mix of characteristics makes it fun to play with, since you can select different cultivars based on what you want to do with a crop.)  Each cultivar would be implemented as a set of genes.  You could choose to cross pollinate plants yourself, and get a range of cross-bred plants with various characteristics, and purify those to a single strain ideal for your needs, or you could just roll with a store-bought variety.

I basically think this would be loads of fun, but I cannot see a good way to run this without horrific memory and parser issues.  A pure graphics game would handle this with more aplomb, but consider: you cross Apple A and Apple B.  You plant only 2 apples' worth of seeds, and get 10 saplings.  They're all crosses of A and B, but they're unlikely to be clones of each other; Inform will want to refer to them separately, and the PC will want to refer to them separately.  I could assign arbitrary ID's, but the player won't have good reason to be able to tell them apart for years.  Much worse is if the PC crosses and plants a field of trial corn.  In that case, there's nothing for it but to fake the cross somehow, holding the genes and then giving the player a couple improved (or unimproved) plants at the end.  That sits wrong for me.  And that's not even getting into memory issues, storage of data for new cultivars, clarifying to the player what's good and bad about specific plants/fruit, tracing the crop back to a specific mother plant, and about 26,000 other issues.  I'm also a trifle unconvinced that there's enough difference between cultivars to be deeply meaningful in 90% of the cases.  In essence, the very set-up of the game determines what uses most of the crops will be put to.  The PC is not running a gourmet kitchen, where a diverse spread of subtle and unusual flavors is important.  It's hard to even describe those flavors without sounding really, really stupid.  (Flavor description is a beast.)  And the difference amongst cultivars is usually smaller than the difference between species - that is, two tomatoes are going to be more alike than a tomato and a bean, so you get more bang for your buck with two species, and less of a rate of return for cultivars.  And cultivar information can be hard to gather and gauge accuracy for.  I can give you ballpark estimates for how many bushels come from a row of corn, but I couldn't tell you whether Silver Queen was better or worse.  And it's likely to vary depending on the part of the country and techniques used.

Given that, I'm reluctantly letting go of most of the cultivar stuff.  I'm not 100% on it, yet, largely because I think some choices are meaningful.  For example, does the PC grow green beans, dried beans, or both?  That makes an impact on play.  Green beans are likely to produce more, earlier, but requires additional time and energy to preserve for winter, during months when there's a lot of other stuff to do.  So it's a time management issue, which seems like a good option to offer.  But as to whether the dried beans are speckly or black or stripey  . . . I hate to admit it, because I *love* that stuff, but there's not nearly enough pay-off there.

I think that energy can be better spent on creating a mechanics heavy crop system, where species have certain qualities that affect growth.  In this scenario, there's far fewer individual checks, and a lot more sweeping categories and behind-the-scenes gears.  So instead of talking about species, the game would mostly be dealing with frost hardy plants, or edible-fruit plants, or cutworm vulnerable plants, or whatever.  Get enough of these categories, and the species start sorting out in interesting ways.  And, at least in my theoretical role-play scenarios, it encourages the sorts of play I want to encourage: crop diversity, attention to insects or disease, interest in the general traits of various species.  It means the player has to keep less info straight - before, the player might have had a dozen cultivars of apples growing at any one time.  In case of insect infestation, the player would need to remember or look up the resistance of each cultivar, and treat the vulnerable ones.  That info would never be retained into another play session.  And, honestly, there's just too much time in between pollination and the time the player sees results.  It's at least a growing season, sometimes more, before the results become clear, and a lot of players aren't going to go beyond one season.  (And I'd be surprised if the first year is anything except "quick, plant stuff!")

This is the first design decision I've made that really hurts, and not just because I've already done a fair amount of research.  It changes the mental picture I'd had coming in, and although I believe I'm making the right decision, it's no longer my fantasy game.  Of course, no implemented game can actually be a fantasy game - already there's stuff implemented that's a compromise or outright re-neg, but the cultivar and plant breeding piece was big, and I miss it. 

There are still a lot of implementation issues to deal with, so I'm not ready to start coding yet.  But I've got some preliminary lists of crops I'm looking for info on.

Currently, there's a couple broad divisions by type of crop, with rankings as to which to I'm leaning towards implementing first.  I have no doubt that I'll get bored at some point, so it would be nice if the mechanics allow for easy additions.  That means not implementing all the grains first - that radically increases the chances that I'll never get around to tomatoes, because it's so much work.  If I start with corn and tomatoes and beans before moving on, it means less work adding stuff.  It also means that pre-alpha testers can get a better sense for how things might progress.

All this is tentative.  1st pick is the single thing from a category that I'd want, if I couldn't have any of the others; I'd like to get the first picks done before adding other stuff.  2nd tier is the stuff I'm pretty sure I'd like to get implemented; 3rd tier is stuff I'm not sure about and/or have trouble getting info on, but haven't outright rejected.  Things are mostly listed in order of preference in tiers.  I'm pretty confident I can get through about half the 2nd tier stuff, but less confident after that.

Grains: Botanically, this category shouldn't include some of the stuff it does colloquially, but I've always suspected that botanists just don't have enough to do with their time, so I'm going colloquial on this one.
First pick: corn.  Wheat would work, too, but Winnegan is much more a corn state than a wheat state.  Besides, it's one of the three sisters, so it has nice symbolic importance, and it has a lot of finickyness.  If I can get the mechanics right for corn, that sets up real nice for a bunch of other, more forgiving, crops.
2nd tier: wheat, barley, rye, oats
3rd tier: buckwheat, millet, amaranth, spelt

Roots: One of those weird, fuzzy categories, encompassing some roots, some rhizomes, even a thickened stem or two, I think.
1st pick: potatoes, hands down.
2nd tier:  carrots, beets, sweet potatoes, turnips (I'm a little vague on the differences between beets and turnips, so maybe just one)
3rd tier: radishes (3rd tier because it's less a calorie crop than most, and how many people voluntarily eat many radishes?  I eat a ton of the big Asian varieties, but the hot thumb-joint size ones?), parsnips, rutabaga, sunchokes, scorzonera (almost definitely out, but weird and sort of tasty, so not bumped yet)

Legumes: an actual botanical category, having something to do with . . . um . . . the way the pod splits open?  Yeah, I dunno.
1st pick: beans.  The normal kind, both green and dry.  Another three sisters pick.
2nd tier: peas, soybeans
3rd tier: fava beans, peanuts (people do grow these in Minnchicon, but . . . really?)

Fruiting vegetables:
1st pick: tomatoes - should be squash to round out the three sisters, but I think tomatoes are a bit more classic.

2nd tier: squash (winter), peppers, melons (musk), squash (summer), eggplant, cucumbers

3rd tier: tomatillos, gourds, melons (water), artichokes, okra, luffa, bitter melon

1st pick: spinach.  Yes, probably should be lettuce, but I don't like lettuce, and if anyone gets to make petty decisions based on personal preference, it's me.
2nd tier: chard, arugula, kale
3rd tier: mustard, lettuce (okay, yes, this should probably be tier 2, but ew.)

Brassicas and stuff:  Actually, a bunch of brassicas are in other categories.  Maybe this is a miscellaneous bitter green category?
1st pick: cabbage.
2nd tier: uh . . . actually, not that sure I want other brassicas.
3rd tier: broccoli, asparagus, cauliflower, endive, rhubarb

Berries: Again, the non-botanical sense - canes or ground plants or vines with berry-ish fruit.
1st pick: grapes.
2nd tier: raspberry, blackberry, strawberry
3rd tier: blueberry, hardy kiwi

Tree fruits:
1st pick: Apples.  Purely a versatility/popularity choice.
2nd tier: pears, plums, cherries (sour and sweet?)
3rd tier: crabapple, Asian pear, peach, apricot

Oil plants: Several other plants give oil, of course.  Ah, well.
1st pick: none.  This would be a strictly 3rd tier optional venture.
3rd tier: poppies, sunflower.

Aliums and things:
1st pick: onions.  (Garlic's a close second, but because of the way it's used, I've reclassified garlic as an herb.)
2nd tier: leeks
3rd tier: fennel, shallots

Very 3rd tier in general, as these're reliant on a cooking system that might utilize them (or being picked up by another craft system).
1st pick: garlic
2nd tier: basil, oregano, parsley, dill, chives, sage, thyme, lavender, rosemary, marjoram
3rd tier: anise, caraway, horseradish, shiso, sorrel, chamomile, horehound, bayberry, borage, hyssop

Nuts are available only in the wild at the moment; I suppose I could change that.  Something to think about, anyway.

Friday, July 29, 2011

Evolution Game

So, yesterday, in the middle of The Blind Watchmaker, I thought to myself: "Self, someone really ought to make an evolution simulator."

Dawkins wrote The Blind Watchmaker in 1986, and there's a chapter where he "evolves" various shapes on the computer.  I did something vaguely similar later (not with shapes, but behavior).   You can get some pretty shapes from selection and random variation, and he mentions that he'd like to do a computer simulation and hopes to see if the flowers end up looking like the bees. 

Fortunately, someone else seems to be working on it.  On XNA, one of the platforms I was considering during the "oh crap what was I thinking going with IF" crisis.  It's an interesting project, and reading through the dev blog is at least two hours' worth of procrastination on deciding whether I should chuck in some non-native fish to give a little variety.

Wednesday, July 27, 2011

Grass and Fish

 Right, so exciting visual stuff first.  Here's the experiments for the ground in the winter, when grass is dead, but there's no snow on the ground.  To make it easier to see, I'm only experimenting with one layer.  The back layer of grass is far enough away that there probably won't be many changes.  Here's where I started, with some smooth curves - bare ground.

This looks sort of "Flash animation-y", which isn't really a bad thing per se, but not what I was going for.  Plus, grass doesn't really disappear in the winter - it only dies off.  So I went for a desaturated, shorter version of grass, using a single grass brush with a bit of size variation and scattering.

(That's the alpha release version.)

So from there, I want to add a little texture, a little variation.  It's not there to startle or distract, but I want a little . . . I don't know what the right word is.  Movement, maybe?  Variation.  So I added a bit of wind, and used a longer brush, and I didn't brush over a pre-existing curve.  I followed the same line, but didn't past the solid over the grass.  As a result, it feels less forced and more organic.  I am not entirely happy with the way the grass breaks about 15% from the right-hand side, but I figure a carefully placed tree will solve the problem.

Better, I think.

But there's still not much variation in the silhouette.  What if there's another kind of dead grass?  Leftover seed stalks or something.

I like this quite a bit, but I want to emphasize distance, and give a little further variation.  A few up-close clumps is a chance to vary color and shape.  I made the color variation pretty slight, just enough so I could differentiate the bigger stuff from the farther away stuff.

I'm not entirely happy with this; the wind isn't right, and I'm kind of ambivalent about the two-tone grass layers.  (And I have no idea how to treat the grass under snow-fall.)  Nor am I sure whether it will compete too enthusiastically against the other elements.  I do think the windswept look is an improvement, though.

A pretty quick mock-up, but that's the graphics front these days.  It gives me an excellent chance to play eye doctor: Better one, or better two?

Click to enlarge.  Now with upgraded cliff and fake grass on the oak tree for that "not pasted on yay" look.  Also experimental like whoa.  And adding blue and making the cliffs darker turned it strangely colored. 
A complicating factor is that it's easier to do dead grass than live grass; my experiments with greener hues have not gone quite as well. 

In equally exciting news (but with fewer pictures), I think I've ironed out the action flow for fishing.  Checks are run to make sure that the player's got the right equipment, and in the right place, and isn't being eaten by zombies (metaphorically speaking). 

Each room that the PC can fish in has some basic properties that limit the fish that are there.  Catfish like warm, slow water; trout like it cold; sturgeon like it deep.  A list of available fish is compiled (or maybe it's pre-compiled).  The odds for each fish type are modified by complicating factors: if the fish are hungry, if the PC is fishing with a kind of bait the fish eat, etc.  If the odds are nil or close enough, the action is ended with a rejection and advice. 

If they're not, the table is randomized, and the odds are checked every few minutes (10? 15?  20?) until one of the fish bites.  From there, it's reminescent of 2nd Edition AD&D saving throws: PC vs. fish. 

The outcome is created as a sentence or two, and a result is tallied: was the fish eating, hooked, landed?  A little extra time is deducted for each of these steps; if there's time left on the clock, the fishing loop will continue.

Afterwards, a summary is printed, with the specifics of one or two battles given a gloss, or the overall tallies turned into something more comprehensive.  (Did the PC get all his bait eaten with no hooks?  Did the PC's experience start bad but improve, or vice versa?  Was there a wide spread, or mostly failure/success?  Is the PC desperate for food or is this more likely to be a pleasure jaunt, and is the PC hungry *RIGHT NOW*?)  It's not a load of conditions yet, but it's enough to give a little variety to the fishing outcome, which is welcome.  (One of the sad things is that there's really never enough variety in the terms of things the program will print out, but even small variations makes it feel less dead.)

One of the things I'm trying to do as I finish actions is define when it would be appropriate for the game to suggest it as a course of action.  Based on fishing conditions, I'm thinking spring-fall around sunrise, or evening if chores are done. 

Once pre-alpha's filled in a bit, I'd like to do an auto "go to nearest fishing spot" thing, and a more sophisticated "when's fishing appropriate" thing, and definitely a "spear fishing" action and some special scenes where the PC can land a monster catfish or something, but I'm trying to skimp a little more on the detail to cover a bit more ground before circling back around. 

Thursday, July 21, 2011

Graphics - Alpha Changes

 A bunch of people were kind enough to download 30 mb worth of example graphics, look through them, and give feedback.  One of the background layers is off by a smidge; I'm having the devil of a time figuring out where the break started.  (It's likely to be unnoticeable in-game, but it's irritating me.)

There's some tree placement issues, and I noticed (although no one else mentioned it) that some of the trees were putting little semi-transparent white boxes around themselves, with the result of strange white lines running through the screen.  So I need to go in, erase all those, move some trees around, and reconstitute them into one layer.

All that's pretty straight forward fix-it stuff.

Less straight forward: the cliffs have some issues.  I took out the layer of trees on the cliffs, added some extra shadows, and experimented with a gradient to add some variation.  (Thanks to Erik's wife, and Erik, who passed on the suggestion!)  I also shifted the whole thing darker and a little bit blue-er.  It looks less like limestone now, but whatever.  I'm having some serious issues getting the gradient to fit properly over the cliffs, though - there's either a little extra overlap, creating weird shadows, or not enough overlap, which limns the cliffs with a sliver of brightness.  As a result, the cliffs look extra painted on.  I think finding the right curvature for the gradient will help; a straight vertical isn't really ideal.  I think a couple layered gradients in different directions will give the right effect; for now, it's experimentation.  (I'm pretty happy with what I've got, but before I go through to fix the borders, I want to make sure I have it right.)

Much harder are some complaints about the grass; in parts, it's a little "bald", and you can see the shape of the curve that I textured, and not everyone is thrilled with either the monocolor or the static texture or the particular color choices.  I haven't been particularly thrilled with my efforts to add color to the grass itself; the flat color recedes, but the texture pops, and given the texture of the trees, it's sort of painful.  I do think it will be possible to vary the silhouette, which will help some.  I'm wary of tacking on too many extra layers; we'll have to see how it runs, but flowers or something might also break the monotony.  It's actually kind of difficult to do a genuine layered look with various plants (see: trees),  but it's worth a try.   Preliminary results from just brushing up the shape are encouraging. 

One of the close-up trees has gotten a lot of comments, too, mostly with no easy fix.  I'm still kind of poking at it.  Some parts, like the canopy shape, are easy, if tedious, to experiment with, and probably worth doing.  But things like the trunk are much harder, since it was made using a brush and my trunk-art is near nil.  I think it's possible that the trunk is too dark/saturated, which is fixable, and I can back the contrast back some, but a complete trunk remodel probably isn't in the cards. 

I also want to try bluing out some of the distant trees a bit, and seeing if that increases the illusion of depth.

- No one complained about the clouds, which is great, because they're hours and hours of really nitpicky work.  Hallelujah.
- No one complained about the rain, which received a last minute tweak or six.
- No one suggested more tree variation, which is good, because I'm a little tired of trees at the moment.  (All in all, there's about 250 deciduous trees, all duplicated, scaled, and placed by hand.  Each of those has 11 to 13 layers, which had to be turned on or off by hand to merge the layers.  About 10% of those were given custom tweaks on top of that.  Plus there's 20+ conifers, which only have two layers.  I still have a tertiary merge to do to get things right, but if I never look at another trunk sprite again, I will die content.) 
- The general goals (season/weather info) were conveyed adequately, and in most cases excellently. 
-No one protested the snow, either the active "it's snowing" screen or the snows on the trees/ground, with the exception of the tree that's already slated for an overhaul.  (I still can't believe this, since my patented "put snow on trees" process consisted of a blurred brush and tracing with my mouse.  Yay, though, because hours of work.)
- No one commented one way or the other on the slight variations in sky color - slightly purple in the spring, green in the fall, and less saturated/lighter in the winter.  Which means that it wasn't too much of a leap.  (It's pretty obvious if you've got the animation open and can directly toggle on/off one color or the other, but it's harder to catch otherwise.)

So: overall, I feel pretty good about it, and no "back to the drawing board with you!" moment.  No one noticed that towards the end of the tree placement process, I got impatient and duplicated a bunch of groups.  It's interesting that I can see the group division lines pretty clearly still; I'm hoping once I go away for awhile, I'll lose that recall, and it'll all just become one pretty mass. 

I'll put up before/after comparisons once I've got some options I'm happy with; in the meantime, if you haven't taken a look at the alpha graphics, and want to, you can download here. Gentle criticism welcome, here or at the email mentioned in the description at the download site. Someone suggested putting the game title over the graphics line; I'm reluctant to do that, but let me know what you think. 

In other news: Fishing!  I know, I know, I really should have wrapped it up months back while it was fresh, but I didn't, so now I get to wade through a mass of uncommented experimental code.  (I did this once already, and promptly saved over it.)  The game will now put together a fishing rod for you.  It's *very* alpha - it automatically provides an earthworm for bait, even in the middle of the winter or if you're in the middle of the lake, but you know, that can wait.  I'm tweaking the Table of Fish at the moment.  The completionist in me is sort of sad there's only a handful of species, but getting info on non-sport fish species is pretty much impossible, so the player's stuck with the usual trout, bass, catfish.  (There's about 13 permutations and species, but a few of those are pretty rare.  Trout, bass, and catfish cover a good 60% of the options.)

Fun fact: I am SO glad I never figured out where I wanted to put a river in the landscape.

Friday, July 15, 2011

Design Diary, July 15

Materials is a little better, but not totally.  I'm trying to nail down the Table of Excessive Properties into just a few useful qualities.  Does it burn?  Does it break?  Does it decompose?  Those are the biggies, but plenty of minor issues are coming up.  For instance, burning implies that the material feeds the fire.  I'm basically doing this by weight - for every pound of straw or wood or cloth or paper you put into the fire, the fire will burn for X minutes.  (I considered a more complicated scheme involving BTU's, but then I got better.  This is close enough for almost everything, and the exceptions are not things the player is going to run across often.) 

I'm also struggling with the names for materials where there isn't really a material.  Glass, wood, metal, leather: all pretty straight forward.  But what about stuff like linen?  It's made of . . . linen, but there's no point in having linen be a dramatically different kind of material than cotton or silk.  Fiber?  Cloth?  Hair?  Bonus question: what is a pumpkin made out of?  (It cannot be plant or vegetable; those are taken.)  Flesh is what I'm leaning towards for animals and people, although it's a little weird.

So, basically, there's substances, which are values, and each substance has some properties which determine the qualities of the object.  This sounds crazy, until you calculate the difficulty of determining the difference between a wooden jug and a ceramic jug, and then it looks pretty nifty.  Of course, in real life, there are ways to make wooden objects less flammable, etc. 

I have not quite figured out all the coding complexities with things like candles, which should burn and feed the fire, but also be essentially non-flammable, but also be on fire sometimes and able to set other things on fire.  Original design plans called for calculating light levels for various activities, but that feels fiddly and unwieldy now.  If the PC only has one candle to read by, then by golly she's going to read by a single candle.  I would like to strongly encourage the PC to sleep at night and work during the day, or at least have a regular schedule.  If any light is as good as every light, that sort of hurts the whole schedule thing.  (Lumberjacking by the light of a single candle is where I draw the line.)  Light that isn't the sun is relatively precious, both historically and in-game.  You can make candles, which takes energy, time, and precious materials.  At some point, you'll be able to press oil from a few foodstuffs, but it requires equipment, quite a lot of the foodstuff, and time at a point in the season where it's a precious commodity.  I'd like light to be a precious resource to be carefully conserved, and without artificial constraints, that's a bit harder.  It may very well be something I need to let go of.

Also did a bit more slogging on the graphics front.  Bare ground - that is, winter ground not covered by snow - was formerly a smooth set of curves the color of dirt.  I bumped that up to dead grass.  I don't have the color balance fully fixed yet - it's a bit fiddly getting the right look - but even the current stuff is improved.  I need to do something with snow, too - the smooth curves are a little too artificial.  I keep trying to get nice snow drifts, but it's actually quite hard.  I think I need some shadows and blur, but can't quite visualize what I should be doing.  Next attempt is going to involve highlighting the "crest" of the hill, trying to get some of that crisp reflective feel, and a blurred brush to soften the edge between hill and horizon for that soft feel. 

I also did a seasonal merge with the first load of trees. Good golly, it's a lot of clicking.  (Each tree needs to be actively toggled each season, multiplied by 11-ish seasons.)  I'm also doing some cheating by leaving some trees in the season before/after the one I'm toggling to.  It provides more variation in color overall, and saves me a little time.  I've grown to appreciate conifers, which only have a "normal" and a "snow" layer.  Stupid deciduous forests, with their seasons and their leaf dropping.  But it's worth it to be able to click through the layers and see the seasonal progression. 

Thursday, July 14, 2011

So Tempting

I wonder if I have the nerve to name my game Apocalypse Plow.

Monday, July 11, 2011

A Matter of Time

Okay, first of all: sleep is awesome, y'all.  Does everyone know about this?  Everyone should know about this.  Life is SO much better when there's sleep.  The game-related depression isn't entirely gone, but it is much diminished, along with the tick in my right eyelid.  And the vestiges of sleep deprivation feel strangely like motivation.

So the issues with the time mechanic don't look so bad from here.

Right now, I'm using a modified version of Weather, by Ish McGravin, to give structure to time.  Weather gives you a Day, Month, and Year variable, and then pulls necessary information for a given date from a table.  It's not bad at all, and have let me just drop in a calendar with no real adjustments needed.  I've got a whole load of scenes, as well, like During September and During Spring.

What it *doesn't* do is track actual dates.  There's no easy way for me to compare Day 1, Month 5, Year 1 with Day 6, Month 6, Year 1.  So if you're trying to compare distances between times (days to harvest, days to Christmas, days since you last ate), things are really, really awkward. 

There are workarounds.  Instead of giving food a literal date as an expiration date, I can just count down the amount of time until it spoils.  I have a lot of reference tables holding statistical data, so I can actually tell you what rainfall has been like in the past week or so, the last month, the last year, etc.  But it would still be nice to compare dates, and to be able to measure how long before or after Date A is from Date B. 

The other sticky bit is that Ish had to do some workarounds with the code, so Month 1 is December.  Which is not the usual assumption I go on, and means that you can't just write a phrase that easily measures time between dates.  I think the Month 1 = December choice came from the moon phase code, which I haven't fully unpacked yet.  (Okay, I only sort of glanced at it once.)  You can write that phrase, of course, but every time I sit down to do it, I can't quite fully wrap my head around the implications. 

Ideally, I would want an actual date value: X/Y/Z, which would make comparing dates considerably easier, and make it trivial to give things dates, or put dates as triggers.  I'm not sure whether it would be possible to literally trigger events ("Now the lamb grows up in one year from now;"), but "Now the maturity date of the lamb is 5/5/2" is easier to read than any of the alternatives. 

Replacing the current date system would mean having to change the triggers for pretty much every seasonal scene, plus a lot of other weather code.  The introduced bugs could be non-trivial.

Of course, I could mesh a date system *over* the current one.  I am not sure it's the smartest option, but it would allow me to the current meta stuff in place, and use dates for the everyday object interactions.  And it would let me move forward, retrofitting all the weather/scheduling stuff as necessary.

Tuesday, July 5, 2011

Better Living Through Design Documentation

I'm still feeling off about FTA - frustrated and reluctant to jump back in.  I wonder if it might be better as a full-on graphical game, which I think is just a sophisticated attempt by my subconscious to get me to ditch my current code, but I don't know for sure.  And looking at my documentation, a lot of it is under-detailed, incomplete, or outright missing.  This compounds the difficulty that the document is half-electronic, half-paper, and not organized in any particular fashion.  In short, shoddy work.  Which was fine, for a while.  But I can't really skate by not knowing exactly what my material or crafting system will look like.  I know the shape of the thing, but that's not concrete enough, and writing around it is just not adequate.

It's hard to know what's stress-induced depression - I haven't had more than five hours of sleep a day in more than three weeks, and I haven't had access to hot water or a functional kitchen in two - and what's good insight into what needs to get changed. I don't *want* to learn a new programming language to try to implement FTA, much less struggle with collision events and mouse clicks and save states.  I don't even know which language would be most appropriate.  Would it be a better game?  I just . . . I don't know.  I don't even know how to go about answering that question.

So I'm pulling back a little, again, and trying to locate and merge a bunch of documentation.  It's been going okay on half-assed documentation, but that's not good enough anymore.  The game's too big, and too system-based, and there's too many references between systems - it needs things laid out, and I need to be more diligent about saving all my research notes in one place.  I probably won't stop implementation entirely - I do best when switching between tasks - but I do plan to cut back, take a look at what I have, and clearly map out the underlying first draft of the game.    

(Since I first wrote this, I actually looked a bit at what it might take to implement as a non-IF game, and, uh, yikes.  C# is really, really not as appealing as Inform.  Not that I don't have wallbanger moments/hours with Inform, but yow.  Steep learning curve.  And I can make no progress at all with . . . well, with pretty much any of the helper platforms.  Graphics is hard, y'all, and so is trying to switch from action-oriented to object-oriented.  Also, I totally remember what I like about writing for IF.  50 animals do not require 100+ meshes and textures and animations and things.  No, they just require a few sentences.  Also, I got a full eight hours of sleep last night, and feel like maybe life is okay, after all.

Still, it goes in the design journal, because what is a design journal for if not existential crises and whining?

Also also: that design document: I should work on it.  Maybe at a restaurant, since my kitchen sink is still bubbling ominously.  Damn landlords.)  

Wednesday, June 8, 2011

Graphics Speed Optimizing

Procrastination is dead.  Long live procrastination.  Yes, that is one of those fluffy flavor graphics I wasn't going to make until everything else totally working.  Sue me.

I'm feeling good about the project again, which is awfully nice.  I'm sketching out the speed boost for the graphics, which mostly consists of doing something about the *cough*mumble* hundred tree sprites. 

If I were very very careful, I think it would be possible to collapse all foreground layers to a single sprite with seasonal changes.  It would mean setting things up in Photoshop and snapping a "picture" of each season.  That would be fastest, and I'm not wholly opposed to it.  The downsides are: loss of flexibility and loss of variation.  The loss of flexibility is more serious - what if I touch up the "bare earth" layers, which I'm not happy with?  Instead of just saving new versions of the changed layers to the materials folder, I'd need to open the original Photoshop file, retake the pictures, and replace them.  If there's any kind of misalignment or color tweak, this would need to happen every time.  Those extra steps add up, and if I ever lost the master file, I'd be screwed.  (It would be a pain to recreate the master file from the current materials folder, but doable.)

So step 1 is making backups of the essentials - both the master photoshop file where I do tweaks and check general layout concerns before going into the canvas editor, and the original, large-size sprite files. 

After that, I'm planning on turning umpty hundred trees into a handful of layers: 3 backdrop tree layers, to give the forest on the horizon depth, and 1-2 foreground layers.  I'm planning to drop the interstitial layer between the front wave of grass and the back wave of grass, and merge the grass layers in-game, although I might add some seasonal herbaceous plants or flowers in there.  That frees up a layer for the cliffs, which have always been in the plans, but need to go in the far distance, behind the forest on the horizon. (Yes, it used to be bluffs - cliffs with a flat top - but now it's just sort of craggy hill things.  Turns out they're easier to make - bluffs are hard, and I couldn't find a top that I liked.  A for effort, but C- for graphical accuracy.)

In order to cut down on the work, I'm creating little tree groves - maybe a couple maples and a basswood, or five oaks and some bushes.  Arranging these tree packets is quick, and flipping stuff over and putting them in different positions makes it harder to spot that placement is not entirely random.  I practiced yesterday on the cliffs I made.  The forest is mostly in a place that won't be seen, but it was very informative.  Random placement is not as good as beginning at the back and working to the front - all kinds of overlap issues begin to crop up if you do that.  That means switching between sprites more often (so you get more diversity) or working over a larger area than the cliffs provided.  The grassland area should be fine.  Also, things get choked up with layers pretty darn fast - I'm planning on grouping every tree group into its own folder this time, and periodically combined/flatten out the various layers to speed things up. 

Or, you know, maybe your view will be of a prairie.  Writing all this out makes me tired.  Fortunately, it's definitely something I can do in little bursts of procrastination as a break from rewriting the damn hunting function, or implementing fish, or something.

800 width pixel crop - the small end of what I expect people to use.  I'm not thrilled with this one, but it does have some framing.  I think some branch/trunk might be better - but perhaps a bush under the tree would round things out.

1200 pixel crop - probably about where most people will end up.  Notice the complete lack of forests on the horizon.  Pretty sweet moon, though.  Notice how it's got a blue background during the day, just like a real moon?  Also, I think I better shrink the celestial bodies again.

1800 pixel crop - probably about as big as I plan to design to.  I feel like something should go on the left-hand side.  The dense pine forest is the experimental part of yesterday.  I think it looks pretty credible zoomed out.  (Zoomed in, it's pretty clear that I have exactly 2 pine sprites, and have trouble drawing cliff shadows with the mouse, and not enough patience to use more than one brush size.)
Cliffs, without trees. Something here is the wrong color.  Cliffs too white?  Back hill too blue?  Clouds?  I'd like to find a way to give the snowy hills some softness, but haven't been successful yet.
In other news, I fixed a couple minor things in clothing, and began to do the necessary work to make it possible to make clothes.  (Baby steps, but still.)  I stripped some old graphics code out of a couple places, where it was really gumming up the works, made some design changes to the way I want plants to behave, and investigated the Multitudes extension for the gathering of wild plants, and possibly a switch in tree calculations. 

Friday, June 3, 2011

FTA: Cooking

Mushroom cloud-shaped cake.  I worry about people sometimes.
One of the first IF games I wanted to write was a Iron Chef style competition.  Your PC would have access to a kitchen and supplies, and would have to fricassee, blend, saute, and garnish her way to victory.  At the end of a game, the judges would give ridiculous reviews of your hideously complicated dish, and you'd win if you'd managed to garner enough points. Or maybe you'd just win.

I got as far as the beginnings of a taste mechanic.  I figured if you were able to decide what combinations of flavors went well together, and assigned ingredients a specific flavor profile, you could have a fairly flexible system that would predict taste outcomes.  For instance, lemons and chicken are classic, so the game would give a certain number of secret bonus points for an bitter/sour poultry combination, plus a bunch of extra points if it wasn't in an expected "list" - lemon chicken in itself might not win you any prizes, but what about tonic water chicken, which would have a bitter/poultry combination? 

The mechanic really encouraged some bizarre combinations, some of which sounded remarkably unappetizing (blackberry bacon potatoes), but no worse than some of the real cooking competitions.

(I still think this game has potential to be hugely fun.  Someone should make it.)

My first impulse in FTA was to give the PC the ability to do something similar.  Sanity returned, though, and I realized I needed something way less intrusive and fiddly.  Most people do not carefully craft new dishes every meal.  I don't even think most *chefs* do that. The focus of the game isn't cooking, so it doesn't *really* matter if the potatoes you grubbed are pan-seared or not.  And God knows I'd get fed up with a game that required careful construction of three meals a day, over years. 

I've had some trouble clarifying what I do want, and this is part of that - nothing's set in stone yet.


The PC should be able to autonomously choose what to eat, cook it, and consume it.

Autonomous consumption should use food resources in a mostly appropriate manner.

The player should be able to force the decision to eat certain foods when necessary.

Desired Behavior

 The apple is sweet and crisp.  You toss the core in the compost heap.
You dine on fresh trout, steamed spinach, and roast potatoes, washed down with a couple mugs of ale.  For dessert, you polish off the last of the cherries.
 You roast nearly a dozen apples before your hunger is satisfied.
You make beef stew, thick with chunks of top round, carrots, and onions, simmered in red wine, and set it aside for later.  
So there's four things here, in order of increasing difficulty.


When the EAT command is paired with an edible food, that is consumed, with nothing else.  (EAT [meal] redirects to MAKE [meal].)  If the food can be eaten raw, it is; if it can only be eaten cooked, an autocook reaction is probably in order.  If the food is a discrete unit, like an apple, the PC will eat only one.  (Maybe.  It seems like there should be an option like EAT APPLES that would loop until hunger was satisfied or the food was gone.)  If there's a lot of them, like berries, or it's a fluid or powder, like cornmeal, the PC will eat/prepare up to a given serving size - maybe a bowl full? - or caloric intake - if she's hungry, she'll eat until she's not, and if she's not, she'll eat a small meal/snack, up to the point where's she's too full to eat any more.

I kind of waffle on this bit - perhaps a single serving is appropriate under all circumstances.  If you eat stew, you eat a single bowl of stew.  If you eat bread, you eat a single slice (or roll, or whatever).  Not sure what the player's intentions would be.  I think either is potentially fine, and the single serving is less complicated, but jury's still out.

If different cooking methods are used to cook foods (ie boil vs. saute), eating would use the least demanding and/or quickest method of preparation.   EAT OATMEAL pretty much means cook up a batch of hot cereal, not turn it into cookies or bread or bake it.  (Although baked oatmeal is kind of amazing, and I should totally make some tomorrow.  Also, I should not work on food design when hungry.)

Make a meal

The PC decides, on her own, what the most appropriate meal is.  This requires looking at the hunger state of the PC to decide a calorie target for the meal.  (Obviously, if the PC's too full to eat, she's too full to eat.)  There's a location that is basically the "home kitchen" of the PC - initially, this is likely to be a campsite or cave.  Later, it should be the Kitchen room.  The game will look at the food available in the inventory, the home kitchen, and any nearby food storage rooms (the cellars, for instance).

From the available choices, the game will make decisions about what to eat.  This bit is kind of blurry - for instance, should there be a preference for breakfasty foods at breakfast?  But here's a first stab:

- Meals may consist of a main dish, plus 0-4 side dishes, something to drink, and optional dessert.
- Main dish, by order of availability:
    - non-preserved, very short shelf-life food - fresh meat or fish especially
    - calorie dense foods near their expiration, or shortish shelf life foods - breads, fresh green beans, corn on the cob, farmer's cheese, most vegetables, eggs
    - less calorie-dense foods with shortish shelf lives, combined with something a little richer- lettuce, tomato, with cheese, oil
    - moderate shelf life foods - things that might last days or a couple weeks - cured meats, potatoes, onions (with other calorie-dense food if possible), winter squash, other "keeper" vegetables 
   - long shelf life foods, preserved foods - dry beans, dry grains, canned goods, dried fruit, jerky, hard cheeses.

Side dishes - a variety of other categories of foods, either chosen to round out a food pyramid type thing, or by chance (or both).  Main + 2 veg/fruit + 1 fat/condiment + 1 grain is a pretty rough start, but yields something that at least pretends to be a balanced meal: bacon, buttered toast, tomatoes and potatoes is a better breakfast than I usually get. Of course, I'm fudging a lot of random stuff I'd be bound to get: trout, squash, corn on the cob, cheddar and oats is kind of weird.  And it would be awhile before there's much chance for randomness - most PCs are going to be eating a lot of spam, spam, spam, spam, and spam (or whatever they brought).

The nice thing about having a tier is that it seems to respond more to actual events than it does.  Since fresh meat is preferred, a successful hunt will mean that the PC can sit down to a nice bit of roast rabbit the same night, which seems like a natural response to running across protein.  And it doesn't require secret checks into whether the PC *did* go hunting - it just looks for the proper foods available.

Make a meal with something

This would be the flip side of EAT APPLES if I don't implement a "eat X until you're full" policy.  This would allow either specifying the main, or more likely, consuming as much of a food as can be managed.  Useful for trying to consume a supply of food before it goes bad - if the PC shot a deer in July, but had no curing facilities, she needs to consume as much of that meat as possible before it goes green.  But standard meal practice will only include a serving size (possibly two, if the PC is very hungry) of the fresh meat with each meal, unless there's nothing else to eat.  

Alternatively, the command could be used to force a main dish - if the PC has a fresh rabbit on hand, but wants to turn it all into jerky, there should be a way to easily dodge the default behavior of eating it for dinner.  At that point, MAKE MEAL OF BEANS should work.  This could be a totally extraneous command, depending on how EAT [something] is handled, but it's worth noting that the behavior does some nice things.

Make a specific meal

There's basically two parts of this command, one pretty froofy and one pretty necessary.

Cooking and eating takes place simultaneously.  I toyed with the idea of a meal object, but there's a bunch of problems with it that I just couldn't fully resolve.

One thing not covered would be a case where the PC would want to pack a meal to eat later - say, if she was going hunting.  This sort of thing would have to be covered by carrying edible food and then EATing it.

The necessary part: being able to make food *without* eating it, and being able to make food that takes sort of a long time against future use.  It's possible to limit this to just a couple foods, I think, but the best example is bread.  Making bread isn't part of normal meal prep.  It can't be part of normal meal prep, at least for rising breads.  It takes time, and a fair amount of work time.  So it makes sense to make bread when you have the opportunity, and eat it later.  This is a totally sensible thing for the player to expect, and really helps with time management.  (And bread's a pretty key comestible for a bunch of English speakers.)  It makes sense from the PC's point of view as well - it makes sense to take your lunch with you if you go cut down trees or hunt deer or fish trout, rather than hiking an extra few miles back to camp to slowly cook something.  Pretty much every culture has portable food for trips and situations where you can't get home.

It's a logical extension of being able to MAKE BUTTER or MAKE CHEESE.

With the theoretical tools planned, it's possible to have dried meat or fruit or something, but I'm not entirely that justifies an inability to make bread.  (Especially since it's cheaper and easier to lay hands on flour than meat or fruit.)

The less justifiable bit would be a list of specific foods and cooking methods.  This one's super tempting, but also one of those holes you'll never fill.  It would be kind of awesome to MAKE POACHED EGGS, but even I have trouble justifying it.  And it's bad enough for stuff that has a recipe - I can give a pretty good argument that most chocolate cakes contain more or less the same stuff.  (There's always exceptions.  Don't email me.)  But what is a stew?  What goes in a stew?  Meat, sometimes.  Root vegetables, sometimes.  Other vegetables, sometimes.  But hardly ever green beans.  Why?

I think I could assemble a recipe using either a specific ingredient or a kind, plus an amount.  So a stew might have 6 oz of meat, 10 oz of root vegetables, and a list of optional additions (1 bay leaf, 1 bottle of wine, 2 tsp ground pepper).  But holy fuck that's a lot of work, and it's hard for me to believe that it's worth it for anyone involved, especially since that stew will stay fresh less than a day, and in the meantime get all congealed and gross.  And let's face it - there would never be enough recipes to satisfy people, and knowing me, there'd be some kickoff as to whether the proper crust for a key lime pie is graham cracker or wheat flour, and the world would end.  (Graham cracker.  Also, no whipped cream and certainly no meringue.)

I *think* I might be able to do a decent job with a few cooking methods: MAKE APPLE PIE wouldn't work, but ROAST APPLES would.  I don't know if that's better or worse than doing nothing.  Worse, I suspect, but it's still mostly on the table, whereas the whole recipe thing . . . yeah.  Not unless I can find a way of doing it that is easy, straightforward, and just requires a couple easy-to-remember inputs into a table.

Heh.  We're moving right along on the list of features no longer under consideration.  On the up side, I never even started the recipe collection, so I'm going to count myself about 100+ hours ahead of where I would have been.

But I do need to chew over what, besides bread, the PC should be able to make and store.  It seems reasonable to me to put a few desserts on the list.  I'm looking for stuff that's fairly common - bonus points for having cultural significance.  For instance, cake seems like a real possibility.  Sugar is hard to come by, but possible, and it seems reasonable to let the player set by a dessert or two.  Also, cakes have a bunch of nice connotations - if I were post apocalypse, I'd totally try to find a something to celebrate my birthday.

If you, dear reader, think of anything else, let me know.  Preservation is a whole other issue, so dried fruit and meats, cured sausages, canned stuff, cheese/butter, and alcohol is handled elsewhere.  Also, I was going to make a joke here about how there's no apocalypse cookbook and that's totally a market niche, but I was wrong.   Then I was going to make a joke about there being no post-apocalyptic cookbookD:

Wednesday, May 25, 2011


I'm going through a bit of a slump at the moment.  One of those "all my ideas are terrible, and I'll never be able to implement them, and even if I do, it'll be *boring*" slumps.  They happen regularly, and I've learned to wait them out, resisting the urge to, say, chuck all my code and start from scratch, or chuck all my code and design a new game, or chuck all my code and give up game design FOREVER in despair.

Most of the slumps go away relatively quickly, so I'm taking the opportunity to step back a little.  (Fixing bugs is making my fingers itch to chuck all my code, or at least major parts of it, and that's never a decision to make during a slump.)  So I'm spending my spare time reading, and occasionally doing something radical like going outside.

The nice thing is that these slumps are almost always followed by periods of drive and innovation, so I'm hoping that happens this time, too. 

Thursday, May 5, 2011

Better Design Practice: Scene Start/End Conditions in Inform 7

One of the things that's really been hammered home to me lately is that is a terrible, terrible idea to have single-fire scene starters.  There are numerous, hideous ways they can go wrong, unless the game starts and stays very simple and constant in design, and rooting out the bugs can be incredibly irritating.

Consider the difference between Scene A, which starts when the time of day is 9:01 pm and ends when the time of day is 10:00 pm, and Scene B, which starts when the time of day is after 9:00 pm and the time of day is before 10:01 pm.

Under normal circumstances, where there's no time breaks, no bugs, no testing circumstances, etc., these will function identically.  But if you want to start testing at 9:15 pm to make sure the end game is running smoothly, Scene A won't fire.  You could start testing at 9:00 pm, of course - assuming there's no other scenes using similar start conditions that would be interrupted.  If you've got a multi-scene end-game, you could very well need to start dozens or hundreds of turns earlier.

You can, of course, always set up a testing string of commands or a skein to get you to the necessary point, but it's really nice to have the additional flexibility of just jumping in.  

I'm going through now and trying to make sure that scenes rigorously begin not only during the first turn they apply, but every turn they apply.  (The language in Inform is a bit misleading - I anticipated there might be an issue with "starting" a scene every turn, especially if there are conditions that fire when it begins.  I think it might be better to talk about when scenes are acted out, or continue, or go on, or happen - some verb that doesn't imply simple on/off conditions.)

Monday, May 2, 2011

I will pet it and keep it and call it George

It's terribly gauche to be too proud of one's own work.  "This old thing?" I say, holding up my new, kickass, sparkly graphics frame.  "Why, this is just something I knocked together in a few spare weekends.  It's nothing, really."

But hot damn if the thing doesn't mostly work, and it looks *good*.  I'm not even going to put in a disclaimer here, like "it looks good to me" or "it looks good for IF graphics".  Puppy looks good.  Good at night, good during the day, downright tear-jerking when the sunset peaks, stunning in fall.  I was desperately worried about winter - the scaling affects the snow more than leaves, and it was so labor intensive that I got a little sloppy here and there, and each individual sprite isn't that good - but in aggregate?  It looks good.

That said, it needs more work.

Most seriously, I'm experiencing a rare-but-not-rare-enough bug in the Inform testing platform where layers will get shuffled or not activated.  It happens maybe once every 25-50 compiles, and seems to be unaffected by my attempts to implement refresh commands (ie turning all the layers off/on, or changing the layers in game and then redrawing does not seem to have an effect).  There's a related, rarer (?) bug that ignores either the coordinates for the origin of certain sprites, or the order to have them centrally centered (rather than centering based on the upper left corner).  The only recourse under these circumstances seems to be to exit; even restarting doesn't affect the issue.  I'm pretty sure it's an internal problem and not my code, because it's so unpredictable and there's literally nothing about recentering or moving sprites around in the game at this time. 

I haven't experienced the bug in any of the interpreter runs, but I've only done a few of those.  I'm trying to nail down specifics for a bug report, but reproducibility is a problem, so gathering data is slow.

Problems that are related to my code:

- The game is definitely a titch boggy during sunrise/sunset; just enough that I know something special is happening under the hood.  (Most turns don't run graphics rules; usually it's an hourly thing, but sunrise/set requires updates each turn).  The bog seems to be related to redrawing, but not to number of sprites - that is, the cost of changing the sky color when there's no sprites is only a tiny bit quicker than doing it when there's 50-odd.  The downside is that it means it's largely out of my hands, assuming I want to do turnly updates.  The upside means that I don't have to feel guilty about the tree sprites.
- Tree sprites are a little sparser than I wanted originally, and I may add more.  Or may not.  I'm not completely pleased about the placement of all the sprites; it's a bit off.
- Many of the tree sprites have little piles of leaves around their base during the fall.  This looks weird on the trees in the far background, and often doesn't work with the contours of the hills.  I need to go back in and take them out.  Thankfully, I have all the layered originals, so it's just a little boring rather than downright impossible.
- The times when the ground is bare (no grass or snow) don't look quite right.  I'm not sure why, which makes it hard to fix.  It's not awful, but it's not great, especially in early winter.
- I desperately need to darken the filters more during the night, and possibly during rainstorms as well.  The worst offenders are the spring sprites - the cherry blossoms practically glow against the sky, and not in a good way.
- Changes in seasonal appearance are not entirely hooked into the seasons yet; only brute force makes the graphical changes right now, so I'm sure there will be many amusing adventures as I iron out that issue.
- Sun and moon are not operable; I plan to put them on arcs, and I'd like to feel a little better about the layout before deciding exact paths.
- I need testing commands for weather.  And month/day. 
- A few of the more complicated conditions, like the sky gradients and precipitation, need work and/or implementation.
- None of the unimportant layers, like lightning, have any implementation beyond tentative placement.
- There's an acceptable neutral color scheme right now for status bar, inventory window, and map window.  It's sort of taupe with chocolate, and was not intended to be a long term choice.  I've grown used to it, but  I'm contemplating tying that in seasonally.  Winter/fall colors schemes are easy enough - gray/blue and earth tones are nondistracting and completely acceptable neutrals.  Spring/summer is tougher; green can be a little distracting, and it's hard to get tones right, and I need to not go too tropical or bright.  (Eyestrain: I do not want it.)  More neutral versions of summer/spring colors tend to go autumn/wintery: hyacinth is great, but by the time I don't feel like the status bar is shrieking at me, we have a nice eggplant/plum color.  Dark turquoise/cream, maybe?  I dunno.  There might be a chameleon neutral set that would look "seasonal" when put up against the tones from the top window.  Fortunately, I love excuses to visit Kuler, and see what appeals.

Screenshots.  Whoo!  

Winter; heavy snow, day.

The end of dawn; summer

Early fall sunset

Mid-fall; very fond of the sky-color picked here.

Mid-spring night (with glowing foliage visible in background)