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

Showing posts with label FTA. Show all posts
Showing posts with label FTA. Show all posts

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. 
 

 

Monday, August 8, 2011

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

Greens:
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

Herbs:
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.

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.

Upsides:
- 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.

Goals

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

>EAT APPLE
 The apple is sweet and crisp.  You toss the core in the compost heap.
 >MAKE DINNER
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.
>MAKE DINNER WITH APPLES
 You roast nearly a dozen apples before your hunger is satisfied.
 >MAKE BEEF STEW
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.

Eat

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 cookbook.  D:

Monday, April 25, 2011

Design Diary, April 25

Spent a good chunk of the weekend with a friend in the hospital, but hanging out in the hospital gave me some nice reading time.  (He was in for non-emergency reasons, so it's not like I was reading about mushrooms while he bled out or anything.)  Read about mushrooms and bogs.  Turns out bogs are cool, and contain some useful stuff, but aren't productive enough to sustain life on their own.  (So it's just as well that mine are located on the far north part of the map, well away from intended habitable areas.)  I'm basically using bogs as one of the world barriers - you can go in a bit, and walk around, and drop things in it (never to be seen again, usually), but that's about it - beyond that point, it's too easy to get lost, or too unstable to continue.  I'd previously considered letting the PC harvest peat as fuel and rejected it, partly because there are literally square miles of forest to harvest, and because I couldn't find good data.  I think that was a good decision; American peat bogs tend to be wetter than their European counterparts, so the peat harvested is less ready to burn, requiring longer dry times.  Not worth it in terms of PC effort or programmer effort.  I do need to make sure there's a cranberry harvest, though.  (I have no idea how people can bear to eat cranberries without *serious* quantities of sugar, but I suppose hunger is a great motivator.)  Sphagnum moss is a possible resource - it's super absorbent, and might make a good field dressing if injuries ever make it in.  Seems like there might be other uses there, but I can't think of any off the bat.  The other big thing mentioned is the presence of white cedar, which is one of those great rot-resistant woods, and thus awesome for fences and shingles (and everything, really).  I am pretty sure that there's enough of it growing around that the player won't need to hike out to the bog (and since there's no rot in-game, it's not a big advantage anyway).  There's not usually much animal life in the poor bogs; plant life is pretty limited, and nutrients are tied up, so it's a good border land; it's poverty should hopefully encourage the player to focus attention elsewhere.  (And, yeah, there's messages to redirect the player, but it's nice that there's subtle in-game reasons to turn aside, too.)
The book noted a lot of different bog types, which will hopefully be helpful in writing descriptions.  

I managed to get my hands on a good field guide to mushrooms in the Iowa-Illinois area, which I'm assuming is close enough to Minnesota-Wisconsin for my purposes.  All the mushrooms I double-checked extended farther north.  I'm so used to edible foods being non-native that it's sort of surprising that so many of the edible wild mushrooms I recognized were native species.  (Chanterelles, oyster mushrooms, lion's mane, and a couple others I can't recall off hand.)  I knew intellectually that identifying mushrooms is a tough thing, but I was taken aback just how difficult it is, even from the carefully chosen pictures that emphasize identifiable characteristics.  I tested myself with the key a couple times, and would have confidently eaten a mushroom that would have melted my kidneys. Oops.

I was also surprised just how many species are "edibility unknown", and how many more were only mostly poisonous - some appear to poison some people but not others, and others are only intermittently poisonous. 

The primary goal for mushrooms is as a wild food source, and I think that will be fairly straightforward.  A lot of the species are strongly associated with a plant species or community, and a lot of them remain in the same place year after year, so first implementation stab is to "seed" appropriate locations with appropriate mushrooms, and then have them show up at appropriate times.  I'd like them to appear in locations in addition to being available via a gathering action (similar to the way wild animals should show up now and then).  If the PC learns where the morels are each spring, more power to her. 

I don't actually want kidney-melting to be a possibility in game, which means that the PC probably needs some sort of way to figure out edibility of mushrooms.  There's the traditional taste test, but for the seriously poisonous mushroom, this is a bad way to go.  I don't really want to encourage people to go around taste-testing random mushrooms, so I'm considering requiring some sort of handbook or a skill check or something.  Lots of possibilities here, but I think it would be worthwhile to reward a player who thought to take a wildlife survival guide or something along; perhaps give them access to some easy to identify shrooms, and more to those who got a dedicated book or something?  I dunno.  A more immersive option would be a requirement to have ID initially, and let the PC gain familiarity with individual species as she IDs them on her own.  (How long does it take to learn the difference between a real morel and a false morel?)  There's some implementation fun to be had with disambiguation and privately named stuff, especially if I let the PC pick mushrooms and ID them somewhere else, rather than IDing before taking.  Worst case scenario is a basket full of a mix of mushroom types, pre-ID.  ("In the basket are some mushrooms, some mushrooms, some mushrooms, and some mushrooms.")  An ID-before taking rule would prevent this, and with some limits to growth patterns, mean there would only be one unidentified mushroom per location at any given time. 



I'd like to at least leave hooks in case I decide to let the PC cultivate certain varieties.  Under ideal circumstances, each species would have certain requirements to fruit, and if those were met, it would fruit, whether those circumstances were artificial or not.  That's a *little* tricky to pull off, though, and would require some serious investment beyond the "mushroom X lives here and here, and has a 1 in 10 chance of fruiting after it rains during the spring" setup that I have in mind.  I don't know quite what to do about that; honestly, cultivation isn't a huge interest for me, but it's a reasonable thing for the player to try, with a modest potential reward.  One option might be to keep soil mushrooms wild, and restrict potential cultivation to stump or log-grown species.  There's only two or three of them, and if the PC is clever enough to haul an elm log to a shaded spot near her house and inoculate it with spores from the elm-growing mushroom, she probably deserves a few years of mushroom crops before the log disintegrates.  This seems potentially exploitable; I don't really want locations with hundreds of logs of mushrooms, although I guess it is a legitimate strategy.  Hopefully the higher irritant factor and relatively low caloric density of mushrooms will make it non-worthwhile; I might also look at realistically quick wilt or storage times, so even if there are fields of mushrooms, the PC can only get so many harvested or eaten before the rest go bad. 

So I guess hookwise, I'd like to set aside mushrooms that grow on wood as their own kind.  Let the mushrooms be associated with certain inoculatble species.  Inoculated logs will have similar chances of sprouting mushrooms under the right conditions that inoculated locations will.  Maybe prevent inoculated logs from being moved/used for anything (because they're too decayed/damp/whatever).  Have a few decay/appear each year.  That would give hooks for deliberate inoculation later, if it seems appropriate, without drawing too much attention initially.  There would probably need to be some additional details at that point (freshly inoculated logs shouldn't just sprout mushrooms the next day, it's more important to make sure the log is somewhere sensible, and not in the kitchen or something).

Side notes:  Mushrooms are a good dye source.  Don't forget to implement them if I ever get around to dyes. 

Random thought: it also seems like there might be uses for the poisonous ones, even if the poison is fairly slow acting.  Maybe as a fish poison or homemade pesticide/deer repellent or something?  It seems plausible that dusting your plants in ground Amanita might discourage locusts, even if I can find no indication anywhere that anyone has ever tried it.  (I'm not about to, because I like my kidneys/eyesight/life, but it seems a shame to just let a perfectly good deadly poison go to waste.)

I got a couple hours to hit bugs last night.  It was . . . surprisingly fun, actually.  As frustrating as programming can be, it's deeply satisfying when I can actually get in there and fix stuff.  A lot of the stuff I'm tweaking is second or third generation code - stuff cannibalized from examples or extensions, then tweaked a couple times and merged with stuff cannibalized from other extensions.  I'm not aware of looming bugs at the moment, except for some disambiguation issues that I'm ignoring.

Friday, April 22, 2011

Main weapons: Fear, surprise, and unflinching determination to get done

Finished sunsets!  I even solved the mysterious bug where occasionally the sky would turn bright white for a couple turns.  Or an hour.  (It turns out that my algorithms for color work very well within parameters, but trying to blend 147% of one color with another borks it proper.)  I also weeded out testing comments that hadn't gotten taken out before.  By all means, add testing comments, but a reference as to which extension they're in, or where they're running from, is a *really* good idea.  Especially if it's just printing a random variable that you can't directly search for.

Also, you know how everyone tells you to comment your code?  Turns out that it can indeed be helpful.

Not so good stuff: I've been trying to layer sprites in on the Canvas Editor that comes with Glimmr.  Unfortunately, the screen is too small, and the control is sort of fiddly - it's tough to get things lined up, or get a good feel for what things will look like in-game. 

Now that it's down to hand-placing individual sprites, I'm reconsidering my options, because typing out code and adjusting the placement via coordinates for hundreds of trees is slow, tedious, painful, boring, and just not very compelling on either a process or a results level.  (It's boring to do, and looks bad when I'm done, basically.)

What to do?

- Create view in Photoshop, and import umpteen individual sprites from there.  (Super convenient on the "I don't have to place stuff via coordinates front, but incredibly wasteful spacewise - each 50-100 px sprite would carry with it tens of thousands of empty pixels.
- Create view in Photoshop, randomly glom trees into a couple layers of full size, and go from there.  (Still convenient, although the glomming bit would require some care.  Less space wasted.  Less uniqueness, since we'd be down to however-many layers rather than individual trees.  Less flexible - if I change the shape of a hill or something, I'd probably need to redo a layer of trees entire, rather than just bumping individuals down or up a bit.)
- Screw the trees - people like grasslands, right?

I'll probably do a mix of the above - a few trees will get handplaced, but most will probably be lumped together into layers, and those'll probably be less central than they were.  I wish I knew more about artistic principles of composition.

Take 2 this weekend.