HANGAR 22

Discuss text adventures here! The classics like those from Infocom, Magnetic Scrolls, Adventure International and Level 9 and the ones we're making today.

Moderators: AArdvark, Ice Cream Jonsey

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

HANGAR 22

Post by Flack »

Inspired by Get Lamp and ICJ's work, I have started work on a new text adventure: HANGER 22.

(I really don't want to bloat my Twitter/Facebook/Blog feeds with updates about this game until it's done, so I thought it might be fun to track updates here instead.)

I'm writing Hanger 22 in Inform 6. So far I've got a few rooms put together and added a guy that talks to you using the menu-based system (I'm using OKBScrpt, one of many add-ons that emulations Photopia's menu-based conversations).

Today I figured out how to "move" an object to a player. Baby steps ...

One thing I need to figure out is how to prevent a player from doing something until other things are completed. For example, I have 4 objects in the house that I want players to have in their inventory before they are able to leave the house and start roaming the town.

---

If you want to follow my progress, you can use the following links. Obviously, looking at source code will lead to spoilers.

Source Code (Link)
Z5 File (Link)
Play Online in Parchment (Link)
Last edited by Flack on Thu May 05, 2011 11:38 am, edited 1 time in total.
"I failed a savings throw and now I am back."

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

0.3 is online.

Added a driveway and an El Camino, although you can't get in it yet. Added a dog, some neighborhood kids, a chair, a mailbox, and some mail.

Haven't figured out how to make things appear or disappear yet, but did create a room called "purgatory" which is working (for the moment) as a place to move things when I want them to disappear. I'm 100% this isn't the best way to do this but it's working at the moment.
"I failed a savings throw and now I am back."

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

0.3a is online.

I tweaked the GPS, but something's not working right. You can tell the GPS to take you somewhere, and it does (I think), but when it does it you can't see the description of the place. I think I'm moving the player wrong.

Code: Select all

NLine ->->-> GPS1 "Take me to the Dry Cleaners."
with description "The GPS buzzes and coughs. You follow a bunch of twists and turns and find yourself at ...",
after	[;
		move player to TacoKing;
		print_ret "You are in the Taco King drive-thru ...";
		];
It appears that the character does in fact end up at the Taco King, but once you're there you can't get a description by typing "examine". I think maybe "move player to x" may not be the right terminology.
"I failed a savings throw and now I am back."

User avatar
Tdarcos
Posts: 9333
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: HANGER 22

Post by Tdarcos »

Flack wrote:If you want to follow my progress, you can use the following links. Obviously, looking at source code will lead to spoilers.

Source Code (Link)
Z5 File (Link)
Play Online in Parchment (Link)
I tried to get to it, robohara.com alone times out as well as the links to the items.
Alan Francis wrote a book containing everything men understand about women. It consisted of 100 blank pages.

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

Yeah, my router hung. Bounced it an hour ago, should be okay now.

(Har, secret Haiku.)

Okay so, I was right about being wrong; the right command is not "move player to location", which (now that I understand it) adds the player to the location's inventory (I think). Instead, it's PlayerTo(Location), which seems similar but is, in fact, very different.

Latest version is 0.3aa; only a slight addition now that the GPS is working. I don't know why I thought it would be funny to add a GPS that always takes you to the wrong place, but I did.
"I failed a savings throw and now I am back."

Johnny
Posts: 36
Joined: Sat Oct 15, 2005 4:30 pm
Location: Humble, Texas

Post by Johnny »

Hey Flack,

"remove obj;" takes an object out of play, and I believe is equivalent to "move obj to nothing;", but a limbo or nowhere location can be useful in some cases; for example, temporarily removing all the PC's belongings and throwing them in a cell.

"PlayerTo(obj, flag);" moves the player to an object, usually a room or an enterable object. The flag is optional: if you exclude it (or pass 0 or false) the room description gets printed; if you pass a 1 or true, nothing is printed; 2 will print a brief description, if the player has been in whatever obj is.

"move player to location" is actually fine in the Initialise routine, but once the game has started, it's a little bit more complicated, and PlayerTo() is a smarter bet.

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

Thanks for the remove object tip. I have a couple of things (like a pesky NPC) that I want to skidaddle out of the game after you talk to him. Remove NPC sounds like it would do just that.

I need to work on my car routine a bit -- not the driving of it, but the entering of it. Right now I have the car enterable open, so when you play through it, it sounds like you are opening the car, not the car door. I'm guessing I need another object for the car door that, when opened, allows entrance into the car.

Driving the car around is a breeze. With the GPS, it's kind of on autopilot -- you just press a button and zing, off you go (I guess it's kind of like the Wonka-vator in that respect as well).
"I failed a savings throw and now I am back."

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

After taking a break from playing some IFComp games tonight, I added a bit to Hanger 22. I added four more rooms to the house, and many more items to inspect and gather.

I am going to change the GPS system entirely. I thought of a much better way to implement driving around in the car (while sitting on the pot).

I'm getting pretty good at programming objects and stuff but I need to read more about actual programming -- i.e., "You can't do this until you have this", or "you can't go here unless you have/don't have a specific item", and so on.
"I failed a savings throw and now I am back."

User avatar
Tdarcos
Posts: 9333
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Flack wrote:0.3 is online.

Added a driveway and an El Camino, although you can't get in it yet. Added a dog, some neighborhood kids, a chair, a mailbox, and some mail.

Haven't figured out how to make things appear or disappear yet, but did create a room called "purgatory" which is working (for the moment) as a place to move things when I want them to disappear. I'm 100% this isn't the best way to do this but it's working at the moment.
You should look at the source code for Original Adventure ("in the original Klingon" err I mean in the original Fortran); this is a time-honored trick, you have an inaccessible room, when an object is destroyed in a language not supporting pointers (like Fortran IV), you just move it to the inaccessible room (or set its location to the inaccessible room if you do that rather than use a move routine) which does the same thing as destroying the item.

I think they use this as a gag at the end of the game where you end up in the storage room for the cave, where everything is there: rods, cages, and everything else including lots of sleeping dwarves who, if woken up, proceed to throw knives in disapproval, some/all "of which get you!"
Alan Francis wrote a book containing everything men understand about women. It consisted of 100 blank pages.

User avatar
Tdarcos
Posts: 9333
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: HANGER 22

Post by Tdarcos »

I opened the door, walked north, saw a mailbox, typed 'open box' and got error that it doesn't see it but 'open mailbox' does work.

Suggested correction from

Code: Select all

Object -> Mailbox "mailbox"
with name 'mailbox',
description "The mailbox is relatively small and rusty. It's big enough to hold one or two days worth of bills, but anything bigger than that typically gets left on your chair.",
has container openable static
;
to the following

Code: Select all

Object -> Mailbox "mailbox"
with name 'mailbox', 'mail box', 'box'
description "The mailbox is relatively small and rusty. It's big enough to hold one or two days worth of bills, but anything bigger than that typically gets left on your chair.",
has container openable static
;
This will, if I understand the language syntax correctly, allow mailbox, mailbox and box to be the same thing but still allow 'mail' to represent the mail in in the box.

For talking to the GPS after you get in the car, you need to add option 0, "say nothing"

Going to purgatory is a stupid option; there is apparently no exit, all 10 directions are inaccessible. (n,s,e,w,ne,nw.se,sw,in,out)

? and help doesn't do anything
Alan Francis wrote a book containing everything men understand about women. It consisted of 100 blank pages.

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

AFAIK in Inform 6 (and I am probably missing something simple), I cannot add a name/alias with a space in it. In other words, 'mailbox' and 'box' work (I added box, even though I cannot imagine anyone referring to their mailbox as simply a box), but 'mail box' (with a space) doesn't work. To do that you would have to add 'mail' 'box' (two words), which then reserves the word 'mail' for the mailbox and not for the mail (the bills).

You are right about everything outside the house; 99% of my efforts so far have been focused on things inside the house. Anything in the car and beyond is broken/unfinished. Originally I was going to implement a system where no matter what you say to the GPS it takes you to the wrong place, but from a logical standpoint this doesn't make sense (it's just a GPS, not autopilot).

Last night I made the couch searchable and added hidden objects in there. I am still drafting the puzzles that appear in the second half of the game, and adding the objects needed to solve those puzzles in and around your house.

Adding "Say Nothing" to the GPS makes complete sense. I'll implement that tonight for sure.

In the actual game the player will never end up in purgatory (I should have mentioned that) -- it's just a place I'm using to move objects to for the time being.
"I failed a savings throw and now I am back."

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

I think I have implemented the car poorly. Currently, the car is a enterable object sitting in the driveway. It kind of gets weird at that point because when you get in the car, the game thinks you are still in the driveway (which you are), but also in the car. This sounds logical, except the description is the same regardless whether you are inside or outside the car. Moving the car (ie: driving somewhere) isn't a problem but ... I dunno, it's just not working like I want. The problem is, I don't want the car to be a location in and of itself, as I need to move it around from place to place.

I might be able to make it work right with two descriptions, one from outside the car and one from within. That might let me make the GPS concealed then (or just scenery) ... hmm ...
"I failed a savings throw and now I am back."

User avatar
Tdarcos
Posts: 9333
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Flack wrote: The problem is, I don't want the car to be a location in and of itself, as I need to move it around from place to place.
Cheat!

Yes, actually you do want the car to be a place. That way it can be a place to leave stuff.

Here's your answer: the car is only going to go to what, 10, 15, 20 locations? So copy the car as 20 locations, make them all the same description, and when the user enters the car, driving to another location dumps them - and the contents - to the car at that location.

The initial location of the car at 19 of the 20 locations - all but 1 - is invisible or inaccessible. When the user "drives" the car, the user and anything they brought with them transfer to the new car location, the old location becomes invisible/inaccessible.

When they "drive to" some place, then the car's description is that they have arrived at somewhere. Exit car, leave or "get out" goes to the new location, which can then show as a location "the El Camino is here".

Thus you get the effect of the car being a place, it appears to move, and it's "next to" the location it arrives at instead of "inside" of that location.

This provides great "traction" - that may not be the right word - for what is allowed. Bringing a backpack into the El Camino will work; pushing the couch or the grand piano into it will give a message "it can't get through the door".*

* Our legal department has required me to qualify this to say "presuming there is a backpack or grand piano in the game".
Alan Francis wrote a book containing everything men understand about women. It consisted of 100 blank pages.

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

Actually, I have it working now. Your idea would work too but ... man, creating the same thing 20 times? I'm lazier than that!

Using "inside_description" I was able to give a different description of the car depending on whether you are inside it or outside it. I made reference to the GPS in the inside description, and then gave the GPS object scenery. That took care of one programming quirk I didn't care for. "The El Camino (with a GPS inside) is here."

Right now I'm trying to strike a balance between "find the object" puzzles and just plain tedium. If there's no real reason to hide the car keys from the player, is that something I should do? The point of the car in the game is really just to shuffle the player between different places at his own pace.
"I failed a savings throw and now I am back."

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

After two hours of dicking with moving a virtual El Camino around town, I'm thinking you might have been on to something.
"I failed a savings throw and now I am back."

User avatar
Tdarcos
Posts: 9333
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Flack wrote:After two hours of dicking with moving a virtual El Camino around town, I'm thinking you might have been on to something.
I am by nature lazy. I've always felt the simplest idea is usually better, especially when most of the work can be cut and paste with minor changes, or at least, that's how I saw it.
Alan Francis wrote a book containing everything men understand about women. It consisted of 100 blank pages.

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

Here's the thing about the El Camino. The idea was never to have people "drive" it around per se (>STEER LEFT). I just wanted people to be able to visit one of a handful of other locations -- namely, a fast food drive-thru, a convenient store, and your job. The more I think about it, the more I could just move the player to and from these places and have "stationary El Caminos" at each location. In retrospect, this seems much simpler than building a car object that literally moves around. I did read about props being in multiple locations, so maybe I could just do it that way. The only thing I hadn't figured out how to do (and I'm sure it's probably easy) is transferring all the inventory in the car from one version of the car to another.

I'm having one other weird anomaly at the moment. When I move the player (move Player to Location), it doesn't display the location's description like I think it should.
Last edited by Flack on Sat Oct 09, 2010 7:46 pm, edited 1 time in total.
"I failed a savings throw and now I am back."

User avatar
pinback
Posts: 17672
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Post by pinback »

I thought car mechanics were perfected in F209.

I thought we did this already.
I don't have to say anything. I'm a doctor, too.

User avatar
ChainGangGuy
Posts: 928
Joined: Mon Apr 29, 2002 11:04 am
Location: Marietta, GA

Post by ChainGangGuy »

pinback wrote:I thought we did this already.
Exactly. I had checked off the "live to witness IF car mechanics perfected" box on my life's to-do list years ago.

User avatar
Flack
Posts: 8822
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

Lead the way, fellows -- I will follow.

Also, is there any agreement as to what the "About" command should contain? I see people complaining if a game DOESN'T respond to the About command, but I've tried it in several different games and the responses are always different. I also see it seems important to require a response to "xyzzy" as well.
"I failed a savings throw and now I am back."

Post Reply