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

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.  

Monday, January 10, 2011

Design: Template vs. player guided

I'm feeling a little more able to deal with design issues now that I'm post-holiday season.  Thank goodness.  I spent a little time trying to figure out what I wanted to do with the core house.

Initially, the PC's home base - the place where she eats, sleeps, and stores things - is pretty minimal.  There's a cave that is somewhat sheltered, and possibly another cave (although so far out of the way probably only the initiated would find it).  The primary intentioned shelter is a shed on the farm premises.

As time goes on, the PC can build a nicer place to live, and also improve the starting shed (adding windows, etc.)  I'd originally planned to make this free form, with the playerspecifying which rooms to build, and where the exits would be. Thus, if the player wanted a eight-story house with twenty-six bedrooms and no kitchen, he could.  I figured I might even be able to guess at the nature of a room based on its furnishings - if the PC put in a bed, it probably was a bedroom.  A toilet would mean a bathroom, etc.  I still kind of like this idea, but after some experimentation, I'm not convinced I could pull it off well.

Part of the problem is that I want some meta-commands that will cause issues here.  For instance, I want the option of automatically delivering food to the kitchen, and putting it away.  I want to be able to ">TIDY UP" and have the PC move clothes, dishes, etc. to appropriate locations.  >COOK BREAKFAST should move the PC to the kitchen, where the cooking is done, and then to the dining room, where the food is eaten.  None of this is necessary, of course - it's almost all fluff.  But I fear that without commands like "tidy up", it's far too tedious to expect the player to type out all the commands necessary.

Of course, one could always have the game offer expectations for room use, and allow the player to override these.  But then we run into some issues with size and connection.

I'm not terribly bothered by letting the player expand the house semi-indefinitely, except that it complicates writing descriptions tremendously.  But there's a real issue in terms of connectivity - it's very easy to let the player decide the living room should be north of the entry, and the guest room north of the living room.  But you've got to either limit most rooms to one connection, or deal with the time-space continuum when the player puts the guest room south of the entry as well.  (Nor am I convinced, based on a few unscientific experiments, that players are good at creating layouts they'll remember better, which was one reason I got into this in the first place.)

I may revisit this one, especially if I follow up random generation for the outside maps.  But for now, I've got a pre-fab blueprint that the player can build room by room.  There's a limit - I think the total constructed size of the house including cellars and storage is around 4000 sq ft, which is enormous (more than 10 times the size of most of the places I've lived), but not exactly impossibly large (ignoring the basements, it's within one standard deviation of the average house size in the US).  (Wow, people in the US have a lot of space.)

The advantage is that almost every room is within two moves of the main living area, with the only exception being some of the most distant storage areas (three moves).  Most diagonal connections have been removed, which makes navigation easier.  I'm still tweaking connections a bit; I would prefer there to be only n/s/e/w/u/d, but it's a little difficult to do.  I also threw in Emily Short's Approaches, which is great, and makes it easy to get places.

I need to refine the construction process, which currently consists of typing ">BUILD KITCHEN" and having it appear by magic.  So figuring out what materials the PC needs to have on hand (and what "on hand" means - holding, in storage shed, in general vicinity of the room to be built?), figuring out how long that should take, adjusted by PC skill, and what (if anything) to do about various miscellaneous things like roofs and doors.  Doors especially - there's currently no reason to actually have a door, and I need to figure out if there will be or not, and if doors should be tacked onto doorways, or if they're just a distraction.  Then I have to figure out windows.  Windows are hard, especially if you want there to be actual things to look at.

Still, though, getting to this point was less difficult than I expected.  Hopefully it will stay easy.