Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

An I7 Game Template

10 views
Skip to first unread message

Al

unread,
Apr 13, 2010, 8:43:05 AM4/13/10
to
For those who are interested I've fashioned a fairly inclusive game
template

It might be handy to post it to the Inform7.com website if Graham
would so choose.


"Game" by (Author).
the story headline is "Story Headline text here.".

[place extensions here]

Starter is a room.
"This is where the game begins."

[The following can either be used or not at your discretion:]

release along with the source text and a website.

Procedural rule while eating or wearing:
ignore the carrying requirements rule.

use [no scoring,] full-length room descriptions,
American dialect, and the serial comma.

when play begins:
turn off score notification.
to turn off score notification:
(- notify_mode=0; -).

instead of examining or searching a closed container:
say "[The noun] is closed.".

rule for printing room description details: stop.

after printing the name of an open container:
omit contents in listing.

after printing the name of a supporter:
omit contents in listing.

after printing the banner text when not requesting the story file
version:
say "[complete list of extension credits][/l]Intro blurb here."

to say verbword: (- print (address) verb_word; -).
to say /b: say bracket.
to say /c: say close bracket.
to say /f: say fixed letter spacing.
to say /v: say variable letter spacing.
to say /l: say line break.
to say /p: say paragraph break.
to say (j - a number) spaces: (- spaces({j}); -).
to say /bt: say bold type.
to say /rt: say roman type.

a thing can be open.
a thing can be closed.
a thing can be openable.
a thing can be closed.
a thing can be locked.
a thing can be unlocked.
a thing can be lockable.
a thing can be switched on.
a thing can be switched off.

rule for deciding whether all includes
something which is fixed in place: it does not.
rule for deciding whether all includes scenery: it does not.
rule for deciding whether all includes a person: it does not.

procedural rule: ignore the can't take what's fixed in place rule.
procedural rule: ignore the can't take scenery rule.
procedural rule: ignore the can't take component parts rule.
procedural rule: ignore the can't pull what's fixed in place rule.
procedural rule: ignore the can't pull scenery rule.
procedural rule: ignore the can't push scenery rule.
procedural rule: ignore the can't push what's fixed in place rule.

to clear the screen:
(- VM_ClearScreen(0); -)

clsing is an action out of world.
understand "cls" as clsing.

report clsing:
clear the screen.

after examining a person:
if the noun wears nothing and the noun carries nothing begin;
do nothing;
otherwise;
say "[if the noun is male]He[otherwise]She[end if] is carrying
[a list of things carried by the noun] and wearing
[a list of things worn by the noun].";
end if.


vaporware

unread,
Apr 13, 2010, 1:23:14 PM4/13/10
to
On Apr 13, 5:43 am, Al <radic...@evcohs.com> wrote:
[...]

> procedural rule: ignore the can't take what's fixed in place rule.
> procedural rule: ignore the can't take scenery rule.
> procedural rule: ignore the can't take component parts rule.
> procedural rule: ignore the can't pull what's fixed in place rule.
> procedural rule: ignore the can't pull scenery rule.
> procedural rule: ignore the can't push scenery rule.
> procedural rule: ignore the can't push what's fixed in place rule.

These should be "The can't take scenery rule is not listed in any
rulebook", etc., since you're disabling the rules unconditionally.

vw

Al

unread,
Apr 13, 2010, 1:52:40 PM4/13/10
to

Can you explain the difference please?
For what I've written I want the above to apply to all conditions.
I'll have to go back and check the documentation in the manual.

James Jolley

unread,
Apr 13, 2010, 2:25:30 PM4/13/10
to

I think Jesse is suggesting you remove the rules entirely to save on
processing time. I don't suppose there's much in it in terms but it's a
good idea to look for bottlenecks.

vaporware

unread,
Apr 13, 2010, 2:31:36 PM4/13/10
to

The difference is that unlisting a rule happens at compile time: the
rule is simply not included in rulebooks.

Procedural rules take effect at run time, so they slow the game down:
every time the game is about to run a rulebook, it has to run all the
procedural rules first, and then before every rule it's about to run,
it has to check whether the rule has been ignored.

They both work, and there are some cases where only a procedural rule
will do what you're after, but you should avoid using procedural rules
when there's an alternative.

vw

Al

unread,
Apr 13, 2010, 3:19:55 PM4/13/10
to
On Apr 13, 12:31 pm, vaporware <jmcg...@gmail.com> wrote:

> The difference is that unlisting a rule happens at compile time: the
> rule is simply not included in rulebooks.
>
> Procedural rules take effect at run time, so they slow the game down:
> every time the game is about to run a rulebook, it has to run all the
> procedural rules first, and then before every rule it's about to run,
> it has to check whether the rule has been ignored.
>
> They both work, and there are some cases where only a procedural rule
> will do what you're after, but you should avoid using procedural rules
> when there's an alternative.


Thanks for pointing out the difference.

Chapter 18.3 points that fact out very succintly.


Al

unread,
Apr 30, 2010, 11:15:40 AM4/30/10
to
On Apr 13, 12:31 pm, vaporware <jmcg...@gmail.com> wrote:

> The difference is that unlisting a rule happens at compile time: the
> rule is simply not included in rulebooks.

> Procedural rules take effect at run time, so they slow thegamedown:

> every time thegameis about to run a rulebook, it has to run all the


> procedural rules first, and then before every rule it's about to run,
> it has to check whether the rule has been ignored.
>
> They both work, and there are some cases where only a procedural rule
> will do what you're after, but you should avoid using procedural rules
> when there's an alternative.


I'm posting the updated I7 template file for all to use.
It incorporates the chagnes Jesse suggested on the rulebook listings.
changed from procedural rule to is not listed in any rulebook.
Left only 1 procedural rule in for eating and wearing.

This is in the public domain. Copy freely and modify to your specs.


<code>


"Game" by (Author).
the story headline is "Story Headline text here.".

[place extensions here]

Starter is a room.
"This is where the game begins."

[The following can either be used or not at your discretion:]

release along with the introductory booklet, source text and a
website.

the can't take what's fixed in place rule is not listed in any
rulebook.
the can't take scenery rule is not listed in any rulebook.
the can't take component parts rule is not listed in any rulebook.
the can't pull what's fixed in place rule is not listed in any
rulebook.
the can't pull scenery rule is not listed in any rulebook.
the can't push scenery rule is not listed in any rulebook.
the can't push what's fixed in place rule is not listed in any
rulebook.

to clear the screen:
(- VM_ClearScreen(0); -)

clsing is an action out of world.
understand "cls" as clsing.

report clsing:
clear the screen.

after examining a person:
if the noun wears nothing and the noun carries nothing begin;
do nothing;
otherwise;
say "[if the noun is male]He[otherwise]She[end if] is carrying
[a list of things carried by the noun] and wearing
[a list of things worn by the noun].";
end if.

<end code>


0 new messages