intfiction.org

The Interactive Fiction Community Forum
It is currently Thu May 23, 2013 3:06 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Help with creating an IF
PostPosted: Tue Apr 03, 2012 1:49 pm 
Offline

Joined: Tue Apr 03, 2012 1:34 pm
Posts: 6
Hello I have 17 days to create an IF for a school final, and i have never used Inform 7 before. The requirements are

10 "rooms" minimum
- 5 inventory objects
- 2 multi-step procedural puzzles. Meaning a puzzle that requires several steps or objects in order to solve. E.g. Find key, clean rust off key, use key to open door.

I have the idea for a murder investigation, and i have started, however when i try to add something or change the text inform 7 seems to not allow it, and I have looked at tutorials online, looked on inform 7's website and read the guides, but none of it helps.

The issues I'm having are with doors
items being removed from rooms after they are taken
items being removed after being dropped
using items with other items
changing actions
making invisible items


Top
 Profile Send private message  
 
PostPosted: Tue Apr 03, 2012 2:04 pm 
Offline
User avatar

Joined: Sat May 08, 2010 9:25 pm
Posts: 959
Location: The Seattle Massive
In general, you need to remember that even though I7 looks like English, it's not; it's code, and it needs to be used with the correct phrasing. A lot of sentences that are synonymous in English will not work as synonyms in I7.

If you post the relevant parts of your code and the errors it throws up, and describe what you're trying to do, then we'll be able to help.


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 1:04 am 
Offline

Joined: Sun Mar 01, 2009 8:02 pm
Posts: 902
darknessedge wrote:
Hello I have 17 days to create an IF for a school final, and i have never used Inform 7 before.

My personal opinion: Your teacher is being very, very unrealistic. Unless, of course, you've been studying Inform 7 all year in the class. If your teacher expects you to start from nothing and do something sensible with I7 in less than three weeks, I would say that qualifies as sadism. Unless your class is a college-level upper-division programming class, and maybe even then.

I have two suggestions.

(1) Download my Handbook (from www.musicwords.net/if/i7hb.htm). It's certainly not perfect, but a number of people have suggested that they found it easier to follow than the built-in Documentation.

(2) Don't try to do anything fancy. You've mentioned invisible items. That's too fancy. Do something straightforward.

darknessedge wrote:
The requirements are

10 "rooms" minimum
- 5 inventory objects
- 2 multi-step procedural puzzles. Meaning a puzzle that requires several steps or objects in order to solve. E.g. Find key, clean rust off key, use key to open door.

I have the idea for a murder investigation, and i have started, however when i try to add something or change the text inform 7 seems to not allow it, and I have looked at tutorials online, looked on inform 7's website and read the guides, but none of it helps.

The issues I'm having are with doors
items being removed from rooms after they are taken
items being removed after being dropped
using items with other items
changing actions
making invisible items

Doors: You don't say what issues you're having, but in Inform, a door always connects two rooms. That is, you need to do it like this:

Code:
The Library is a room. The Front Hall is a room. The oak door is north of the Library and south of the Front Hall. The oak door is a door. The oak door is scenery.

If you start by saying the Front Hall is north of the Library, you're doomed, because that creates a direct map connection with no door.

You should have no problems with items being removed from rooms or removed after being dropped. That behavior is all handled automatically by Inform. It will only malfunction if you're introducing rules that mess with the default behavior.

The easiest way to make an invisible item is not to put it there at all until the player notices it. For example:
Code:
The Library is a room. "There's an overstuffed couch here."

The overstuffed couch is an enterable supporter in the Library.  The couch is scenery.

The brass key is a thing.

After searching the overstuffed couch for the first time:
   say "Tucked between the cushions, you find a brass key, which you pick up.";
   now the player carries the brass key.

Feel free to ask more specific questions about your other problems.


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 11:27 am 
Offline

Joined: Thu May 20, 2010 9:33 pm
Posts: 479
Jim Aikin wrote:
darknessedge wrote:
Hello I have 17 days to create an IF for a school final, and i have never used Inform 7 before.

My personal opinion: Your teacher is being very, very unrealistic. Unless, of course, you've been studying Inform 7 all year in the class. If your teacher expects you to start from nothing and do something sensible with I7 in less than three weeks, I would say that qualifies as sadism. Unless your class is a college-level upper-division programming class, and maybe even then.


Darknessedge only said that they personally have 17 days, not that the assignment gave them 17 days. :P Anyway, the assignment sounds about on par to me, from experiences in classes that involved programming but were aimed at non-majors, although I guess I am assuming college-level.

But yeah, I second the advice to do nothing fancy. Even if you don't think it's fancy, try to remove some of the fanciness. And a good first step is to write down exactly what you want some piece of the game to do; for your key example, you'd say something like "The key is found under the doormat, and is dirty when it is found. It can open the door, but only when it is clean. The player can make the key clean only if they are holding the soap." And then right away you know: 1) the key, the door, the soap, and the doormat are items that need to be made, 2) the key has a dirty/clean property, 3) the door starts out locked and needs a "before unlocking" rule to keep the key from working when it is dirty, 4) the key needs a "before rubbing" rule to keep the key from getting cleaned if the player doesn't have the soap, and 5) "washing," "cleaning," and other such words should be made synonyms of "rubbing." Some of those individual steps are tricky, but at least you know in advance what they're going to be.


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 12:10 pm 
Offline

Joined: Sun Mar 01, 2009 8:02 pm
Posts: 902
tove wrote:
Darknessedge only said that they personally have 17 days, not that the assignment gave them 17 days. :P Anyway, the assignment sounds about on par to me, from experiences in classes that involved programming but were aimed at non-majors, although I guess I am assuming college-level.

You're right, of course. I withdraw the comment. It's been a long time since I took a class, and I've never taken a programming class. Also, I don't tend to wait until the last minute to do major projects, so I tend to forget that not everyone paces their workflow the way I do mine.

I do think, though, that it would be a bit odd for a college-level programming class aimed at non-computer-science majors to have an assignment that uses Inform. Maybe that's my anti-Inform bias peeking through, but I can't help thinking that writing good code in Inform for a beginner-level project won't tell you very much about what actually happens in ordinary programming, simply because Inform's syntax is, obviously, very unlike the syntax of any other programming language.

In addition the Inform compiler makes certain assumptions -- about two-way passages between rooms, for example -- that remain invisible to the novice programmer. In any other programming language, including Inform 6, it's up to the programmer to list the exits of both rooms when two rooms are connected. I7's assumption, while convenient for the IF author, would allow the student to draw an inaccurate conclusion about how compilers usually work.


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 12:30 pm 
Offline

Joined: Fri May 06, 2011 7:15 pm
Posts: 489
Location: The Big Apple
Quote:
Also, I don't tend to wait until the last minute to do major projects, so I tend to forget that not everyone paces their workflow the way I do mine.


My motto is "Never put something off until tomorrow if you can put it off until the day after."


Robert Rothman


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 12:35 pm 
Offline

Joined: Thu May 20, 2010 9:33 pm
Posts: 479
Yeah, my classes-that-involved-programming really weren't about learning about code or technique. The main one was "Making Things Interactive," which sort of inherently required learning to use an Arduino, but that was very much "on our own time," and we certainly never discussed what a compiler is/does or even much about code abstraction. It was fundamentally a design class, and discussion was more on the "what are we making and why is it interesting" side than "how are we making it." I've also been involved with (taught a guest lecture, sat in on final crits) a "Game Design for Artists" class -- again, it was up to the students to pick and learn a language or game creation system, and only a few students had any code experience. It's sort of the inverse of the situation my CS-type friends had in their "Graphics" class, which was of course about the math-y side of graphics rendering: their final projects were quite visual, but flouted all good taste in composition, typography, color theory, etc.

I definitely agree that Inform would be a very weird choice for a first language as part of a serious computer science curriculum, but more and more non-CS classes are using code in pursuit of art or literature projects.


Top
 Profile Send private message  
 
PostPosted: Thu Apr 05, 2012 11:26 am 
Offline

Joined: Sun Dec 05, 2010 11:07 am
Posts: 321
Location: ኢትዮጵያ
tove wrote:
I definitely agree that Inform would be a very weird choice for a first language as part of a serious computer science curriculum, but more and more non-CS classes are using code in pursuit of art or literature projects.

A good development, in my opinion. Programming fosters a particular approach to problem solving and requires a certain amount of logical thinking, both useful skills to hone and transferable to other domains.


Top
 Profile Send private message  
 
PostPosted: Mon Apr 16, 2012 4:24 pm 
Offline

Joined: Tue Apr 03, 2012 1:34 pm
Posts: 6
I have figured out most of the stuff on my own at the time I posted this I had 17 days given to complete the project and was given the assignment that day but that is not what is important I am having 2 issues now.

doors are not unlocking. The message I get is that the key doesn't seem to fit the lock.

and the End game message won't display.

what I have typed for it is

end story finally saying

"insert ending here."

and i get an error.

But those are the last 2 errors I am having


Top
 Profile Send private message  
 
PostPosted: Mon Apr 16, 2012 4:46 pm 
Offline

Joined: Wed Feb 29, 2012 2:00 pm
Posts: 674
darknessedge wrote:
I have figured out most of the stuff on my own at the time I posted this I had 17 days given to complete the project and was given the assignment that day but that is not what is important I am having 2 issues now.

doors are not unlocking. The message I get is that the key doesn't seem to fit the lock.


Have you specifically declared that the relevant key unlocks the relevant door?

Code:
The wooden key unlocks the wooden door.


darknessedge wrote:
and the End game message won't display.

what I have typed for it is

end story finally saying

"insert ending here."

and i get an error.

But those are the last 2 errors I am having


I believe it should be "end the story finally".

Code:
end the story finally saying "insert ending here".


Hope this helps.

_________________
"Will you stop breaking the fourth wall? It's costing me an absolute fortune to replace it!"


Last edited by climbingstars on Mon Apr 16, 2012 4:56 pm, edited 1 time in total.

Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Eleas and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group