Friday, November 22, 2013

Dev Log: Horror Text Adventure #30



Not the most visually stunning game, but a screenshot every once in a while is still nice.

Fixed a bug where the player tried examining something that did not exist and it led to a runtime crash.  This was because when checking the player's inventory for that item, if there was nothing in the player's inventory, the items were simply set to null, so they had no type.  So it was trying to check a type when the variable did not even exist.  Easy fix, but error checking sure makes code longer.

Speaking of examining, the player can now type "look at <item>" and "look <item>" in addition to "examine <item>".  Bonus side effect: dictionary function now looks cleaner because huge examine code is moved to a new function.  Similarly, the player can say "take <item>" and "pick up <item>".

The player can also type slightly shortened commands for movement, so instead of "go west", they can also type "go w".  I know that old text adventures had very simple commands like just "w" to go west, but just for the moment I don't want it to be so simple, because I wouldn't want a player to accidentally move to a new room when they are trying to do something else.  So the player has a variety of ways to move, by saying "go", "head", or "move" as the first word, and then a direction or abbreviation of the direction as a second word, so four characters is, I think, short enough for now.  I think it's tough enough to come up with all possible English variations without getting into abbreviations.  Yay language.

The player can now "chat".  That is, if they type "/c" and then a message, their message appears in the chatbox.  Of course, this is not exactly hooked up to the internet yet, so chatting simply displays in your own chatbox and doesn't go out to the world.  But the code that's in place will be replaced (or perhaps added to) once I start with the multiplayer (which will come much later).

I improved player system messages relating to input, by saying exactly what the dictionary didn't understand.  So if you type "go wesr" (misspelling "west") it will tell you it didn't understand "wesr" rather than giving a generic "I don't understand this" message.  One bug about this, however, is a conflict between number of words in the command and the keywords.  So you can say "pick up blah" and you'll get "I don't understand 'blah'," which is what I want, but if you say "pick blah" you'll get "I don't understand 'pick'," which makes no sense.  I'm pretty sure I'll need to overhaul the way the dictionary works at some point.

Also fixed room descriptions so now items in the room are broadly defined ("There is a bed here.") upon entering the room, and longer descriptions ("The pillowcase has bloodstains.") are reserved for examining the item.  (That's how I discovered the bug in the first paragraph above).

Also threw in a couple more description sentences to test.  Now the player may get a varying number of description sentences.  Works ok for now, but still needs cleanup (and probably a cleaner way of making them altogether).

Lastly, you can quit by typing "/quit" instead of just clicking the X in the corner.  Still example commands to create, but five down, three to go is a nice place to be.

I like productive days.

Tuesday, November 19, 2013

Dev Log: Horror Text Adventure #29

Barriers work properly now.  If there is no room nearby, it makes a wall (same as before).  If there is a room nearby, but there are no barriers in that room, then the current room makes a barrier (randomly).  If there is a room nearby with a barrier already set up, the rooms are connected by that barrier.  I believe it's set up by pointer (I hope), rather than duplicating the type.

Also implemented windows fully (as fully as any other barrier type, that is), so now the player can go through a window to get to the next room.  It's identical to a door at the moment.  I'm pretty sure I can find a better way to put the barrier descriptions in.  Right now it's copy-pasting almost identical code a ton of times, varying for direction.  Hopefully I'll figure that out before the 18 if statements balloon into 300.

Also a little code cleanup.  Sometimes I wonder what I was thinking when I have a five line block of code with a variable definition and an if statement that can simply be reduced to one return statement.

Friday, November 15, 2013

Physical Fitness Friday

That is to say, for me.  Lots of yard work today, and more all weekend and some next weekend, I suspect.  So no post today because it hurts my fingers just to type even this much.  We'll see what I can accomplish for Tuesday.  Sorries!

*This has been a friendly PSA reminding you to get at least 15 minutes of exercise daily.

Tuesday, November 12, 2013

Dev Log: Horror Text Adventure #28

Doors exist slightly more properly now.  At least, any given direction with a room in that direction either has a passage or a closed door.  If it's a passage, you see what's nearby; if there's a door, it just tells you that there's a door (so we assume it's closed, basically).  Doors don't lock yet, which is good because I haven't programmed keys yet.

But the barriers are bugged.  I get no compile or runtime errors, but sometimes there's a door on one side, and an open passage on the other.  This is something I never noticed, because passages and walls were clearly defined by whether there was an adjacent room.  But now I see I messed something up, in that barriers are not between rooms and don't connect right, but rather a property of rooms.  I thought I had made them pointers, but I guess adjacent rooms don't actually point to the same barrier.  This will be a fun bug to figure out, since there are a few places it could be, and nothing is immediately obvious.  Yay logic errors!

I may have to redo the barriers from scratch and rethink the system if I can't ferret out the error.

Friday, November 8, 2013

Dev Log: Horror Text Adventure #27

Items that are containers can now only hold a limited, predefined number of other items.  Again, I expect to change this and eventually come up with sizes or something, but for now it's a quick hack that at least puts a little bit of the functionality in there, so I'll know to go back and change it later, when I realize I can put a bed inside a bed, or something.

For now, upon creation of each item, there is a vector for other items, and that vector has a set length.  So for a dresser, for instance, it's set to four, so there can only be four or less items in the dresser.  At present, no items start in the containers, and the player can't discard items in any fashion, so containers aren't precisely interactive.

Tuesday, November 5, 2013

Manhunter: New York and Manhunter: San Francisco (Forgotten Diamonds)

Back in the adventure game days, Sierra On-Line was one of the top dogs in PC gaming.  Lucas Arts was a major competitor, but Sierra had franchises that were hard to topple.  If a game had the word "quest" in the title, it was a Sierra hallmark: King's Quest, Space Quest, Police Quest, and Quest for Glory (formerly Hero's Quest, but changed to avoid confusion with the board game HeroQuest) were among their best-sellers.  They also had cult favorites like Leisure Suit Larry, and the awesomely bad Phantasmagoria FMV games.

Bad acting, bad bluescreen, bad puzzles, bad CGI... sign me up!
There were a few series, however, that didn't get far off the ground, because Sierra wanted to concentrate on sequelizing their biggest sellers, so some of the most intriguing games got forgotten.  Among them was the Manhunter series, a pair of sci-fi/horror adventures.

Phantasmagoria becomes a cult classic, and this gets left in the dust? There is no justice in the world.
In the far-off future year of 2004, Earth has been invaded by an alien race of giant flying eyeballs called Orbs, and humanity has been enslaved.  All humans are required to wear same-looking robes, and remain completely silent at all times.  Chips are implanted in their necks for easy tracking.

You are a Manhunter, and your task is to solve crimes being committed by a resistance group.  You get a laptop to help you, and you must investigate crime scenes and try to figure out the identity of murderers and terrorists.  The problem is that the GPS trackers in people's necks only track bodies, but don't give IDs, so you can watch logs and track individuals, but you can't tell who they are without some detective work.

Something something political joke.
And although you start off working for the Orbs, you soon become embroiled in a deeper mystery that reverses your allegiance and forces you to commit crimes yourself, unraveling new strands that show even more horrifying evildoings of the Orbs (as if just enslaving the human race wasn't bad enough).

Thrown in the mix are a variety of minigames to keep you on your toes.  These are generally quick reflex games, like one where you must throw knives between a man's fingers, to stealth games, like sneaking through a warehouse and avoiding robot guards.  The minigames generally can have their difficulty settings changed, so if you find one too hard, you aren't stuck.

Hint: Always put this one on Easy mode.
Even if you lose these, or die in any other nasty way, it wasn't a big deal like in most of Sierra's other games of the time.  In King's Quest, for instance, you had to save your game every couple of minutes so you could load if you died.  In the Manhunter games, you were brought back to a point shortly before your death automatically, so saving was only to quit and come back later.  Unfortunately, like other Sierra games of its day, you could get stuck being a dead man walking, so strategically placing a few saves is still a necessity.  This is one of the only flaws in the games, though by today's standards, it's quite a big one.

Excusing the arcade-style minigames, most of the game is searching for clues and trying to put together different signals and symbols.  Since you can't talk (and neither can anyone else), you either have to communicate by writing, vague hand signals, or showing important objects off to gain the trust of suspects, witnesses, and others in the resistance.  Keep a pad of paper handy and take a lot of notes.

Every word of this confused me as a kid.
Though the Manhunter games keep you in suspense, and can be pretty creepy and frightening at times, there are plenty of light-hearted moments to relieve the tension, as well, usually by way of Warner Brothers-esque slapstick.  My favorite funny bits, however, are very dark and very subtle bits of text.  In those cases, the jokes are some serious implications and raise the stakes when you understand them.  Though I won't give an example so as not to ruin anything, I will say that if you catch the jokes, you'll be laughing your head off and your heart will be pounding in fear at the same time.

This, however, is not a funny bit.  This bit will make you cry.  No, seriously.
The puzzle-solving can be quite devious, and require a fair bit of out-of-the-box thinking, though nothing as ridiculous or unfair as some other of Sierra's games, so rarely will you get stuck for too long, as long as you understand what you're looking at.  Oftentimes a shift in perspective is all you need.

It may have taken me slightly more than four years to figure out how to get past this screen.  I am ashamed.
Although they are not numbered, Manhunter: New York is the first game, and Manhunter: San Francisco is the second, picking up moments after New York ends.  A third Manhunter game was meant to be set in London, but it was cancelled in favor of continuing other Sierra franchises.  The Manhunter games did not sell as well as King's Quest or Space Quest, so they were dropped.  It's sad, really, because they were extremely original, spooky, funny, and stick with you for a long time.  I've had more than one dream inspired by these games.

Look for them on abandonware sites, and you can probably find them.  It also helps if you have a beepy-boopy internal speaker for the sound.  Surprisingly good music, too!

Also, this is the least gory crime scene you will see.  Be prepared for lots of blood.

Friday, November 1, 2013

Dev Log: Horror Text Adventure #26

The player now has a limited inventory of two items.  Previously, the player's inventory vector could be expanded indefinitely each time they picked up a new item.  I may mess with it later so a player can wear pants with pockets, or a backpack which lets them carry more, though I'd want it to be realistic in terms of the size of things (no sticking sleds in your pocket).  At the moment there are items which can hold items, like dressers, and they can currently hold an infinite number of items, so that'll need to be fixed too later.

That's all I did this week.  Halloween is a fun holiday.