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

Sunday, February 13, 2011

Hunting

Google seems to have gotten into the spirit of my odd inquiries, and now it thinks I might want to know how to kill undead bears.  Which I don't, actually.  Just regular, old-fashioned grizzlies and black bears. 

I've got a pretty good map on the hunting action now, I think.  (Thanks for the suggestions on flow chart tools - they were all better than what I'd been trying, and Cmap was indeed just about perfect.)  For most of the FTA stuff, I feel like I have some sort of footing in real life.  I've gone fishing (years and years ago, but how different could it be?).  I garden.  I take walks.  I own animals.  But I've never gone hunting, nor have any interest in going hunting, and the only guy I know who hunts is not the sort of person one wants to talk to.  So I've been spending a lot of time in hunting forums, which is interesting, but is only marginally helpful.  (Also, my browser history now includes people who think the apocalypse is actually coming any minute *and* people who are extremely enthusiastic about guns.  Including a thread by someone who wondered whether you could kill a bear with an AK-47.  I can only hope that person was working on a game, too. 

I'm just about to get cracking on implementation.  I'm going to start with a barebones implementation of the functions/odds, with really basic debugging reports attached.  Once I get that ironed out, I can start on the text and the random variations of the text. 

There's a few basic checks that show up over and over that involve things that aren't implemented at all, or haven't been merged in yet, so there's going to be more loose ends than usual to tie up, but it'll be nice to have a general flow to work with.  Programming-wise, I expect it to be pretty straightforward.  The truly tricky bit is going to be balancing the thing. 

It's a challenge to decide what the odds should be for any one piece of the puzzle.  There's a couple issues going on:
- the actual quantity of huntable animals - the hard population.  Theoretically, this could fluctuate, but it's probably not noticeable except for larger predators, so right now it's stable.
- the PC's ability to find huntable animals, which boils down to knowledge of the land, knowledge of animal behavior, and knowledge of the clues left by the animal behavior.  (I'm not sure these will be separate skills at all; I suspect land knowledge will be some amalgam of rooms explored and time passed, and the rest will be either tracking alone, or tracking + some other factor.)
- the PC's ability to sneak close enough to an animal to do damage.  Part pure skill, part environmental.
- the PC's ability with a weapon, and the animal's . . . resistance to damage?  I mean, even you're *really* good at throwing rocks, there's a difference between nailing a rabbit and a grizzly bear with one.  This is especially tricky given the shoddy weapons available to the PC - I mean, it's certainly possible to kill a bear with a bow and arrow, but maybe not with the one you made from a random branch, old fishing line, and a sharpened stick. 
- the PC's self perception.  I'm not exactly thinking of implementing this in itself, but it plays a factor in the choices I make the PC make.  Because, honestly, unless I was really desperate, I would not go around shooting at dangerous things.  Moose are like the hippos of the north - they look all funny, but those things kill.  I would have to be really sure of myself, my weapon, and my escape route before I shot at a moose, and I think the PC should have some of the same sense, rather than "Look!  A deadly animal!  Let's kill it!"  This gets a little sticky, since the player may very well prefer the PC to be more aggressive, so I may experiment with asking the player what she thinks instead. And then have the moose attack the PC.  (Never let it be said that my games are not educational.)

I'm working on the theory that in Winnesogan, animal populations have grown and sort of balanced out in the years since large human populations.  Some of the extirpated species have moved back in, including the occasional bison herd or grizzly.  (Essentially I look at the population dispersal projections pre-1700's, and if the range includes a reasonable chunk of Minnesota, Wisconsin, or Michigan, it's in, as long as I can think of something interesting to do with it.  Sadly, this does not include rice rats.  RIP, rice rats.)

It should be totally possible to survive by hunting.  It should also be totally possible to starve by hunting, especially for the inexperienced.  One way to address this is to set up some measurement of weapon quality and weapon skill vs. animal size.   Difficulty scales pretty well to the weight range of the animal, but I may need modifiers for the extra quick or predatory, because by that measure, bobcats would be *way* easier to kill than deer, and that seems off to me.  Also, should bison be twice as hard to kill as bears?  Hmm. 




Basically, I'd like to see minimally skilled hunters with adequate weapons be able to bag something small an average of once every 1-2 days, with the major difficulties being tracking prey and killing it.  To alleviate the sting of the tracking prey issue, I'm planning on increasing encounters with wildlife, especially garden-variety wildlife (rabbits, squirrels, small birds when they're implemented), so that the PC can "hunt" animals that he just runs into.  The first jump or two in weaponry skill should get the PC to the point where he can regularly get small game - probably not enough to be his sole food source, but a significant contribution if the player chooses to go that way.  By my rough estimates, an average wild rabbit would provide the player with ~1500 calories, which is nothing to sneeze at.  This may be on the high side, since some number were for domestic rabbits, which are bred to have better meat characteristics.  By contrast, an average rainbow trout might provide ~1300 calories.  So a couple rabbits would be just over subsistence level living. 



Average hunters with adequate weapons - fire-hardened spears or crafted slings or average-quality bows - should be able to count on small game - a good catch might be 2-4 smaller animals, with the occasional deer or lone coyote.   

Expert hunters with good weapons will probably experience only a slight uptick in the amount of food brought in, but they can probably bring down most any animal, although very large prey (e.g. bison) and large predators (mountain lions) or those in packs (wolves) remain dangerous and may take some luck to bring down.    


I also need to look at the relation of seasons to availability of prey.  I strongly suspect that winter needs the odds scaled back, and autumn needs them scaled up, but I don't know that for sure, and I'm not sure if that should be tied to a particular thing or just the general season. 

So: today - get the basic functions in place, do some testing to see how things are shaking out.  Set up hooks for future features like injuries.  Test more. 

Fun fact of the day:  A moose bit my sister once.

Thursday, February 10, 2011

Yay Netflix

Just noticed that there's a subtitles tag on Netflix for some titles.  Hallelujah.  It's even a sans serif font. 

Monday, February 7, 2011

Flow Charts

I'm not usually a flow chart kind of person.  I like writing things out, and I can keep stuff in my head/notes pretty well until the time comes to implement. 

I've been told that flow charts are a relic of the 90's, a mere blip in the scheme of things, but I've been feeling an itch to do some explicit diagramming of some of the more difficult actions - partly to figure out the best way to go about implementing, and partly just to nail down a tricksy, convoluted process.

I've tried a couple ways of making them, including the built-ins for Excel and Open Office Draw, but it feels slow and clunky.  I'm almost down to drawing them on a pad (if I can find mine) or by hand and scanning them in.  Anyone have a free tool they like?  I don't need shapes or fancy connectors or pretty colors - just something fast and dirty. I can imagine quite a few tools that *might* work - Photoshop's not terrible, except it doesn't allow for easy movement of the graphics.

Or is there something that accomplishes the same goal - visual organization of complex tasks?

Saturday, February 5, 2011

FTA Update

The most urgent of the windows stuff is done, with only a little cleanup to be done around PCs climbing through windows.  Cleaning is sidelined, since I may do a more general command with other stuff that can be washed, and I need to figure out how quickly windows get dirty.  (True confessions: mine get washed only when someone else points out that they're dirty - it's not something I ever notice on my own.)  None of the atmospheric stuff is done yet, but I've started taking notes for the sorts of things that should be included.  Lots of weather-based stuff so far.

There's still floors and roofs to do, but that's basically an extension of wall building, with a different selection of materials.  I'll probably save that for a day where I just feel like implementing. 



I'm considering taking a break from the house and doing some work on hunting next; the research on the main mammals is done, and this would be a good time to begin implementing them in the world.  This would include random encounters (atmospheric and actual), as well as indicators of their presence (paths, foot tracks, dens/dams/holes), and interaction (hunting, trapping).  I'd like there to be interaction beyond the "kill" phase - perhaps capturing and breeding rabbits, or taming a wolf pup - but that would come much later in the game, and is probably more aligned with livestock anyway. 

I need to do some experimenting with hunting, which will make a nice break from pretty straight implementation. Then again, I'm not entirely excited about hunting at the moment, so I may see what comes up.  Furniture is a possibility; so is some other early game thing - fire, perhaps, or fishing, which is sort of languishing half-done.  (I really do try to leave things in a workable state, and then come back a few times for polishing and tweaking, but sometimes it just doesn't happen.) 


Fun fact: It's really better not to think about all the programming tasks that you have yet to implement as a group, especially when you're running a fever and high on cough syrup; otherwise you may dream about being in a death camp run by rulebooks, where you could escape, if only a thousand check actions weren't blocking your path and smashing your legs with bricks.  (I really do enjoy programming 90% of the time, but clearly something in my subconscious would prefer that I be working on a shorter project.  Too bad that part hasn't stepped up with a shorter project idea that I find as interesting as working on FTA.  It's not like I *asked* for a monster project.)

Monday, January 24, 2011

Chewing on Windows

This is just an attempt to figure out exactly what all windows entail, since it's kind of a weird nebulous thing.

* Windows are essentially holes in walls.
* In real life, some rooms have multiple windows.  For disambiguation reasons, I suspect it's easier to limit this to one per room, or possibly one per direction per room.  So a room on the corner of a house might have a window facing east and one facing south.
*  Windows are going to be automatically built as the house is.  Otherwise, it gets too complicated - the player could theoretically saw out a window of a wooden wall, but how the hell would it happen with brick or adobe or rock or practically any other building material?  Dynamite?)
*  This also lets me set windows up beforehand, which is nice and saves me time.
*  Windows can be glass paned or unpaned.  Other possibilities would be some weather proofing, semi-light permeable, nontransparent material, like oiled paper, but that gets complicated because paper maintenance is way different and would change a lot of internal bits, so for now, only two choices (Oil paper: shelved indefinitely).
* Windows can be broken, whole, or vacant.  These are probably definitions: whole windows have undamaged glass, broken windows have damaged glass, vacant windows have no glass.
*  Windows should probably ask for an appropriate number of glass panes upon construction, depending on size (shelved indefinitely).
*  Whole windows can be open or closed; the others are essentially stuck open for the purposes of weather, light, animal entrances, etc., although they need slightly different descriptions than whole windows that have been opened.
*  Heat escapes through open windows (shelved until fire/cold/interior temperature work).
*  All windows can be boarded up; doing so decreases loss of heat, prevents entry of unwanted animals, stops light, reduces or stops weather (effects shelved until each feature is implemented).
* Some weather (tornadoes, hail) and some predators (thieves) can break windows (shelved until those things are implemented).
* Accidents or neglected maintenance can break windows (shelved indefinitely).
* Windows can be broken directly and deliberately by the player via the attack command.
*  A slightly more upscale option to boarding would be shutters, which are permanently installed and can be opened or closed, reducing time and effort to cover windows.  (Shelved.)
* Windows open out onto another location (complete).
* Looking through a window provides a glimpse of the other room (complete)

* Looking through a window into a room where something exciting/awesome/horrifying is happening should alert the PC to the problem and print a description (shelved until exciting/awesome/horrifying things are added).
* Windows are too small for PC to fit through (with the exception of emergencies?).  They should have a rejection message for the attempt, though, and then possibly auto-send the PC to the proper room.
* Windows should get dirty over time, exacerbated by certain events, and be cleanable (shelved). 
* Work on atmospheric messages: light, rain, snow, wind through open windows and possibly onto things; catching sight of the outdoors through windows; mention of landmarks and major features that can be seen (ongoing, but a good start would be a couple variations of each of the above).
* Work on cluing and encyclopedia entry; create text snippets mentioning shutters, boarding, panes, etc. for appropriate books (ongoing, but simple entries should be easy to knock up).

*Think about: window sills - yay or nay?

In short: Glass vs. no glass, boarded vs. unboarded.
Glass: Open vs. closed, broken vs. unbroken
Implemented verbs: open, close, install (>INSTALL PANES IN WINDOW), fix (>FIX BROKEN WINDOW), board up, whatever the opposite of board up is (unboard? take down boards?), break, look out/through, wash.
Unimplemented, redirected verbs: climb from/out, jump from/out, throw from/out (defenestrate?), go through/out.

Check whether "of" is omitted from commands: is ">CLIMB OUT WINDOW" nominally equal to ">CLIMB OUT OF WINDOW"?

Consider the difficulties inherent in broken glass.  Should the player be allowed to use it for anything, or should it be theoretical?  (Leaning towards theoretical, but remember to handle attempts to get at the broken glass.)

Friday, January 21, 2011

Minus the Romanticism

No matter how many squicky details FTA gets, it's still essentially a game that romanticizes the can-do frontier spirit.  Less romantic: pictures I found from 1940 in the Library of Congress's flickr stream, showing a more realistic view - five kids in a dugout with cardboard for insulation and a sod roof, and one of the saddest fields of corn ever.  It's fascinating to look at these pictures; it's a kind of grim squalor that I don't want to think about much, and in comparison, the options I write about are like Swiss Family Robinson.  It's kind of embarrassing. 

Now I'm going to return to figuring out how to let a lone PC in the wilderness make glass windows.

Wednesday, January 19, 2011

House update: Building Materials

The building action and the house itself is coming together nicely.  Indoor rooms have walls and floors, and the walls have materials.  When construction begins, the game will ask for the material to use to build the room in question; right now the choices are wooden boards or bricks.  Logs are much too difficult for a lone person to manipulate, stones aren't something I want to fiddle with right now, and earth houses like adobe or sod just don't seem to be a legitimate possibility in Minneconsigan-type climates.  But boards are relatively straight forward, and trees are already implemented.  Bricks are a bit of an experiment, and they're largely unimplemented at the moment, since they have the potential to be a significant memory sink.

Rooms have a size which can be used to extrapolate the surface area of the walls; that's used to calculate how many boards or bricks are needed to build a room.  Each room is built separately, so the outside walls are a single layer of material, while the interior walls essentially get built twice - once for each room.  I'm essentially okay with this, although padding the outside walls for insulation might not be a bad idea.  Looking at plank houses of the past, many of them were a single layer of boards, but these were often in clement climates (such as Washington).  I would not want to be living in a single-plank thickness house in a serious winter condition. 

Brick number estimates were made using running bonds (laid with each brick lengthwise, so the most surface area is exposed), but plenty of older houses were built with alternate construction, especially in colder climates.  My favorite is the "rat trap construction", with little holes between two layers of bricks to hold rodents.  I sure am sad not to live in the good old days.  In good conscience, I could probably raise the number needed by another 50-70%, but I'll wait to see how balanced it is. 

Then, of course, there's material waste - broken bricks, ruined boards, misplaced structural elements, etc, which would add onto the quantities of stuff needed.  In short, there's plenty of room to yoink the numbers up to increase difficulty. 

I pulled stats for bricks laid per hour for professionals, and halved them.  It may still be on the high side, but at least it's a working figure.  Complete construction of the house in brick would take a little over a year, which seems reasonable, if slower than I'd have guessed.  As it stands, a wooden house would take ~4-5 months of nonstop work, which seems a little low, honestly, but I'm holding off on tweaking until I see how it plays. 

Windows are just coming into existence.  They can open, close, be broken or dirty.  I still have to connect open and broken states with weather, create WASH WINDOW and FIX WINDOW commands, and other miscellaneous stuff, but I have implemented a basic "when you look out a window, you see what's on the other side" thing.  It works suspiciously well.  You can't look through windows into the house, but life is short. 

Fireplaces and all their attendant woes are untouched.  Descriptions remain a problem, as there's not much stable about the description of an indoor room at the moment - you can have a kitchen that's essentially no different than a bedroom, except by name, and you can't really talk about delicious smells or sunlight on the parquet floor when the PC is much more likely to be eating cold turnips in the dirt.

Notes:

- Roofs still don't exist; they probably should, even just for aesthetics. 

- Foundations have been totally blown off.  I mean, uh "As you begin construction, you uncover the original foundations of the house.  Despite the years, the foundations are in excellent condition, and will no doubt support whatever you build on top of them."

- I haven't figured out the temperature controls' relation to inside, how fast heat and cold move through indoor rooms, and how best to calculate that.

- Windows shouldn't be automatically glass-equipped - either they should be open holes in the walls, or boarded up holes in the walls, or not placed at all until the PC explicitly does the work.  All of these options have drawbacks and associated weirdness.  I probably need a glassless window-type variable-thing.  Other people have used paper and such in place of glass, but I don't really envision the player making paper, so . . . hmm.  I do envision some glass capability at some point, but that point is a long way off, and I was thinking more glass blowing than glass sheeting, or whatever it is one does to get flat panes of glass.  Maybe the player would like to have holes in the wall that she can board or unboard instead.  (I can also offer the player curtains, which are less research than glassblowing.)

- Descriptions of rooms will be easier if some furniture is implemented; that way, its absence can be mentioned, the same way I'd remark on a kitchen these days without a sink, or incorporated into descriptions.  Conversely, if they're present, sunlight can then stream through the gaping hole in the wall to highlight the fine maple counters the PC has recently installed. 

- Still don't know what to do about doors.  I come to a different decision each time.  It seems weird to let the player board up windows/holes, and cave entrances probably should let you build a entrance blocking thing for protection and warmth, and then not have doors in the actual house.  But it's sort of complicated, and there's no real payoff yet.

- Tools would be another obvious direction to go next, along with material gathering.  I'm not ready to tackle bricks, clay, kilns, and fire, but I think I could handle figuring out how many 2x4's can come out of an old growth oak tree.  Come to that, I'm not entirely clear on how one makes planks, anyway, if you don't have a saw.  And I need to figure out the Nail Question.  It's important to me that the player can build shelter more or less from scratch.  Maybe I can describe interlocking notches or something.  Traditional plank houses of the coastal Native Americans were bound with cedar ropes, but ropes are notorious for kicking ass and taking names of IF programmers, and there's no way the player would know that information organically.  Not that most people know any more about mortise jointing, but at least that solution doesn't introduce a rabid wolverine into the game mechanics.


Fun fact:
The scientific name for bison is Bison bison bison.