Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Participants: Derya Akbaba * Ben Allen * Natalia-Rozalia Avlona * Kirill Azernyi * Erin Kathleen Bahl * Natasha Bajc * Lucas Bang * Tully Barnett * Ivette Bayo * Eamonn Bell * John Bell * kiki benzon * Liat Berdugo * Kathi Berens * David Berry * Jeffrey Binder * Philip Borenstein * Gregory Bringman * Sophia Brueckner * Iris Bull * Zara Burton * Evan Buswell * Ashleigh Cassemere-Stanfield * Brooke Cheng* Alm Chung * Jordan Clapper * Lia Coleman * Imani Cooper * David Cuartielles * Edward de Jong * Pierre Depaz * James Dobson * Quinn Dombrowski * Amanda Du Preez * Tristan Espinoza * Emily Esten * Meredith Finkelstein * Caitlin Fisher * Luke Fischbeck * Leonardo Flores * Laura Foster * Federica Frabetti * Jorge Franco * Dargan Frierson * Arianna Gass * Marshall Gillson * Jan Grant * Rosi Grillmair * Ben Grosser * E.L. (Eloisa) Guerrero * Yan Guo * Saksham Gupta * Juan Gutierrez * Gottfried Haider * Nabil Hassein * Chengbo He * Brian Heim * Alexis Herrera * Paul Hertz * shawné michaelain holloway * Stefka Hristova * Simon Hutchinson * Mai Ibrahim * Bryce Jackson * Matt James * Joey Jones * Masood Kamandy * Steve Klabnik * Goda Klumbyte * Rebecca Koeser * achim koh * Julia Kott * James Larkby-Lahet * Milton Laufer * Ryan Leach * Clarissa Lee * Zizi Li * Lilian Liang * Keara Lightning * Chris Lindgren * Xiao Liu * Paloma Lopez * Tina Lumbis * Ana Malagon * Allie Martin * Angelica Martinez * Alex McLean * Chandler McWilliams * Sedaghat Payam Mehdy * Chelsea Miya * Uttamasha Monjoree * Nick Montfort * Stephanie Morillo * Ronald Morrison * Anna Nacher * Maxwell Neely-Cohen * Gutierrez Nicholaus * David Nunez * Jooyoung Oh * Mace Ojala * Alexi Orchard * Steven Oscherwitz * Bomani Oseni McClendon * Kirsten Ostherr * Julia Polyck-O'Neill * Andrew Plotkin * Preeti Raghunath * Nupoor Ranade * Neha Ravella * Amit Ray * David Rieder * Omar Rizwan * Barry Rountree * Jamal Russell * Andy Rutkowski * samara sallam * Mark Sample * Zehra Sayed * Kalila Shapiro * Renee Shelby * Po-Jen Shih * Nick Silcox * Patricia Silva * Lyle Skains * Winnie Soon * Claire Stanford * Samara Hayley Steele * Morillo Stephanie * Brasanac Tea * Denise Thwaites * Yiyu Tian * Lesia Tkacz * Fereshteh Toosi * Alejandra Trejo Rodriguez * Álvaro Triana * Job van der Zwan * Frances Van Scoy * Dan Verständig * Roshan Vid * Yohanna Waliya * Sam Walkow * Kuan Wang * Laurie Waxman * Jacque Wernimont * Jessica Westbrook * Zach Whalen * Shelby Wilson * Avery J. Wiscomb * Grant Wythoff * Cy X * Hamed Yaghoobian * Katherine Ye * Jia Yu * Nikoleta Zampaki * Bret Zawilski * Jared Zeiders * Kevin Zhang * Jessica Zhou * Shuxuan Zhou

Guests: Kayla Adams * Sophia Beall * Daisy Bell * Hope Carpenter * Dimitrios Chavouzis * Esha Chekuri * Tucker Craig * Alec Fisher * Abigail Floyd * Thomas Forman * Emily Fuesler * Luke Greenwood * Jose Guaraco * Angelina Gurrola * Chandler Guzman * Max Li * Dede Louis * Caroline Macaulay * Natasha Mandi * Joseph Masters * Madeleine Page * Mahira Raihan * Emily Redler * Samuel Slattery * Lucy Smith * Tim Smith * Danielle Takahashi * Jarman Taylor * Alto Tutar * Savanna Vest * Ariana Wasret * Kristin Wong * Helen Yang * Katherine Yang * Renee Ye * Kris Yuan * Mei Zhang
Coordinated by Mark Marino (USC), Jeremy Douglass (UCSB), and Zach Mann (USC). Sponsored by the Humanities and Critical Code Studies Lab (USC), and the Digital Arts and Humanities Commons (UCSB).

Code Critique: Alice as a Victorian girl and Priscilla as an independent business woman

Title:TTLG (Code Critique)
Author/s: Frances Van Scoy
Language/s: Inform 7
Year/s of development:2008-2020
Software/hardware requirements: Mac OS 10.13.5; Inform 7 Build 6M62

"Kudzu Ken 20200127 v2" by Frances Van Scoy



Book 2 - General Definitions

Use the serial comma.
Use American dialect.

When play begins:
    Say "This game is one square of a planned 64 square mildly educational game set in the expanded world of Lewis Carroll's [italic type] Through the Looking Glass[roman type].  The anticipated main audience is middle school girls. [paragraph break] [paragraph break]";
    Say "To the west you see a large brick wall with a wooden gate in it. You open the wooden gate and walk through it.  The gate closes behind you.";
    Now the likeability of the player is 2; [Likeability ranges from -5 to +5.]
    Now the left hand status line is "[player's surroundings]";
    Now the right hand status line is "Likeability: [likeability of the player]".

Part 3 - Properties of Things

A knapsack is a container.  A knapsack is wearable. 

Part 1 - Properties of Plants

A person can be known or unknown.

A plant is a kind of person.

A flower is a kind of plant. 

A daisy is a kind of flower.  

A tiger lily is a kind of flower. 

A weed is a kind of plant.

A kudzu_plant is a kind of weed.  The description of a kudzu_plant is "The kudzu seems to be growing as you look at it."
A kudzu_plant is either quiet or active.  A kudzu_plant is usually quiet.
A kudzu_plant is either angry or defeated.  A kudzu_plant is usually angry.
kudzu is a kudzu_plant.

A tree is a kind of plant.

A dogwood is a kind of tree. The description of a dogwood is "Next to the dogwood tree is a sign that says 'cornus florida.'"  

Part 2 - Properties of Player Character

The player has a number called the likeability.

A person is either hostile_to_kudzu or friendly_to_kudzu.
A person is usually friendly_to_kudzu.

The player is wearing a knapsack.  The description of the knapsack is "a canvas bag in which you store items you acquire."

A knife is in the knapsack.  The description of the knife is "a garden knife, suitable for cutting an ear of corn from a cornstalk, for example".

Part 3 - Properties of Non Player Characters

Chapter 1 - Guard Dog Wood (a dogwood tree)

Guard Dog Wood is a tree. The description of Guard Dog Wood is "Guard Dog Wood is an exceptionally large dogwood tree in the middle of the garden." 

Chapter 3 - Dayzee (a daisy)

Dayzee is a flower.  Dayzee is nowhere. 

Chapter 4 - Tigra (a tiger lily)

Tigra is a  flower. Tigra is nowhere.

Chapter 5 - Ken (a kudzu plant)

Ken is a kudzu_plant.  Ken is nowhere.  The printed name of Ken is "a large aggressive kudzu plant".

Part 4 - Facts

A fact is a kind of thing. A fact can be known or unknown. A fact is usually unknown.

Flowers can talk is a fact.

Part 6 - Actions

Understand the command "pick" as something new.
Understand the command "pick" as "take".

Understand "who" as whoing.
Whoing is an action applying to nothing.

Understand "tickle" as tickling.
Tickling is an action applying to nothing.

Understand "help" as helping.
Helping is an action applying to nothing.

Understand "what" as whating.
Whating is an action applying to nothing.

Book 3 - Scenes and Rooms

The player is in the Garden of Live Flowers.

Part 1 - The Scenes

Chapter 1 - Scene Main Garden

Main Garden is a scene.
Main Garden begins when play begins.

When Main Garden begins:
    if Guard Dog Wood is known:
        now Guard Dog Wood is in The Garden of Live Flowers;
    otherwise:
        now Guard Dog Wood is nowhere;
    if Tigra is known:
        now Tigra is in The Garden of Live Flowers;
    otherwise:
        now Tigra is nowhere;

Chapter 2 - Scene  Attack of the Creeper

Attack of the Creeper is a scene.

When Attack of the Creeper begins:
    say "You feel something moving on your leg.  You look and see that a tendril of a kudzu plant is growing rapidly and wrapping itself around your leg.  Almost immediately it reaches your body and begins wrapping itself around you."; 
    now Ken is in the Garden of Live Flowers.

Attack of the Creeper ends badly when Ken is active and Ken is angry.

When Attack of the Creeper ends badly:
    say "The kudzu lets out a horrifying scream, releases its grasp on you and grows to three times its previous size."

Attack of the Creeper ends well when  Ken is defeated.

When Attack of the Creeper ends well:
    Now Ken is in The Garden of Vegetables;
    Now Ken is quiet;
    say "The kudzu struggles for a moment, uproots itself, crawls across the garden, and slides under the gate leading into the Garden of Vegetables    ."

Section 1 - CUTTING a weed

Instead of taking a weed when Attack of the Creeper is happening:
    say "You reach for the kudzu but it moves away from your hand."

Instead of cutting a weed when Attack of the Creeper is happening:
    if player is carrying a knife:
        say "You attempt to cut the kudzu with the knife.";
        now Ken is active;
        now Ken is angry;
    otherwise:
        say "You need to hold a knife in order to cut kudzu."

Section 2 - - TICKLING a weed

instead of tickling when Attack of the Creeper is happening:
    say "The kudzu shakes with laughtern so much that it releases his grip on you.";
    increase the  likeability of the player by 2;
    now Ken is active;
    now Ken is defeated;
    now Ken is in The Garden of Vegetables.


Section 3 - Asking for HELP

[Advice on persuasion isfrom Writin with Infrom, section 12.4 Persuasion, Infor 7 Build 6M62.]

Persuasion rule for asking someone to try helping during Attack of the Creeper:
    if the likeability of the player is greater than 0:
        Say "[the person asked] says to the kudzu, 'Let go of her right now!'";
        if the person asked is Guard Dog Wood:              
            Say "The kudzu releases you.";
            increase the  likeability of the player by 1;
            Now Ken is quiet;
            Now Ken is defeated;
            persuasion succeeds;
        otherwise:
            Say "The kudzu appears to stick out its tongue at [the person asked] and wraps his tendrils more tightly around you.";
            Now Ken is active;
            Now Ken is angry;
    otherwise:
        persuasion fails.

Part 2 - The Rooms

Chapter 1 - Outside the Garden

Outside the Garden is a room.  "To the west you see a large brick wall with a wooden gate in it."


Chapter 2 - The Garden of Live Flowers

The Garden of Live Flowers is a room.  The Garden of Live Flowers is west of Outside the Garden.  "You are in a large walled flower garden. In the center of the garden is a large dogwood tree.  Surrounding the dogwood are many flowers, including  daisies and tiger lilies.   There is also some  kudzu growing in the garden.   [paragraph break] The wooden gate in the brick wall on the east leads to the outside world.  There is no handle on the garden side of the door.  [paragraph break]   You hear a voice say, 'Welcome to the Garden of Live Flowers.'"

In The Garden of Live Flowers are some daisies.   The daisies are scenery.
In The Garden of Live Flowers are some tiger lilies.  The tiger lilies are scenery.

In the Garden of Live Flowers is some kudzu.  The kudzu is scenery.

In the Garden of Live Flowers is a dogwood.  The dogwood is scenery.



Section 1 - GOING east, south, west or north

instead of going east when the player is in the Garden of Live Flowers:
        say "The wooden gate in the brick wall leads to the outside world.  Unfortunately it only opens into the garden, and there is no handle on the garden side of the door." 

before going south:
    say "This garden gate leads to the Garden of Vegetables.  You enter the garden and look around.   [if Ken is in Garden of Vegetables]You notice some kudzu is growing in this garden.[end if]";
    continue the action.

instead of going west when the player is in the Garden of Live Flowers:
        say "That part of the world is still under construction."

instead of going north when the player is in the Garden of Live Flowers:
        say "That part of the world is still under construction."

Section 3 - PICKING flowers

Instead of taking a flower  for the first time: 
        decrease the  likeability of the player by 1;
        say "You think you hear  [the noun] screaming. Some nearby flowers shake, and you think you hear them saying something.  You hear a loud barking sound coming from the center of the garden.  You suddenly think that it might have been a bad idea to try to pick [the noun].";

Instead of taking a flower for the second time:
    decrease the  likeability of the player by 2;
    say "You are startled by a noise from the center of the garden and release [the noun] without picking it.  You look up and see what appears to be an extremely rapidly growing branch coming from the dogwood tree in the middle of the garden.  It stops growing just above your head and then bends down, lifts you from the ground, shakes you and then drops you back onto the garden path."

Instead of taking a flower for at least the third time:
    decrease the likeability of the player by 3;
    say "A large branch of the dogwood tree lifts you from the ground, extends itself over the brick wall, and drops you outside the garden.";
    move the player to Outside the Garden.

Instead of taking a kudzu for the first time:
    now the player is hostile_to_kudzu;
    say "You attempt to pick the kudzu.".

Attack of the Creeper begins when the player is hostile_to_kudzu.

Section 4 - SAYING SORRY

Instead of saying sorry for the first time:
    increase the likeability of the player by 1;
    say "You say, 'I'm awfully sorry!'".

Instead of saying sorry for at least the second time:
    say "Apologizing over and over won't change anything!"

Section 5 - WHOING (asking "who")

Instead of whoing when player is in The Garden of Live Flowers and Guard Dog Wood is unknown :
    say "'Who said that?' you ask. [paragraph break]'I did.  I am Guard Dog Wood.  I live in the Garden of Live Flowers and protect the plants in the garden.'";
    move Guard Dog Wood to the Garden of Live Flowers;
    now the printed name of Guard Dog Wood is "Guard Dog Wood";
    now Guard Dog Wood is known.

Instead of whoing when player is in The Garden of Live Flowers and Guard Dog Wood is known and flowers can talk is unknown  :
    say "'Who said that?' you ask. [paragraph break] 'I did.  My name's Tigra,' says a tall tiger lily as she bends gracefully towards you.  [paragraph break] 'I didn't know flowers could talk!' you say.  'I CAN talk,' says Tigra, 'when there's someone worth talking to.'  [paragraph break] 'We can ALL talk!' say several flowers simultaneously.'";
    move Tigra to the Garden of Live Flowers;
    now flowers can talk is known.


Section 7 - Recognizing speech that contains certain words

[The code in this section is based on Chapter 17 Understanding in Wriitng in  Inform in Build 6M62 of Inform 7 internal documentation. ]


After reading a command:
    if the player's command includes "beauty":
        say "You hear a voice saying 'Thank you!  We think the garden is a beautiful place to live.'";
        reject the player's command;
    if the player's command includes "beautiful":
        say "You hear a voice saying 'Thank you!  We think the garden is a beautiful place to live.'";
        reject the player's command;
    continue the action.

Chapter 4 - The Garden of Vegetables

The Garden of Vegetables is south from the Garden of Live Flowers.

Book 4 - Ending the game

check quitting the game:
    end the story;

When play ends:
    if the story has not ended finally:
        say "Thanks for playing!  For more information about the game, please send email to LookingGlass@juno.com"

Book 5 - Testing

test pick_plant with "who / examine / look / pick daisy / pick daisy / pick daisy / west / pick kudzu /  tickle "

Comments

  • As a computer science professor, I teach a senior elective in game development to art, computer science, and media majors. I like to write small sample games to illustrate my lectures and to give my students examples to modify for their own games.

    Often I base these examples on Alice in Wonderland and Through the Looking Glass. Then I noticed that my description of an attack on Alice by a sentient weed named Ken Kudzu was too sensual, almost sexual for use in a game whose announced audience was middle school girls. I rewrote that passage and re-considered the rest of my code for that game. I seemed to be rewarding players for behaving like a Victorian girl rather than a girl living in the 21st century, so I had to do some serious rewriting.
    This year in honor of the 400th anniversary of the landing of The Mayflower I've been writing some short examples based on Henry Wadsworth Longfellow's 19th century poem, "The Coursthip of Miles Standish." In the poem Priscila Mullins is the only woman of "marriagable" age surviving the first winter in Plymouth. Both men want to marry her and she has to decide which to marry. I wanted to include an option in gameplay in which she would decide not to marry either man. From historic documents we know that her father was a shoemaker and owned hundred of pairs of new shoes at the time of his death. I wrote a ficticious backstory in which Priscilla begs her father to teach her his trade. He does so and after his death she takes over his business (and defers thoughts of marriage).

    So I'm wrestling with the problem of re-interpreting narratives based on older texts while maintaining their itegrity and reflecting current cultural values.

  • I seemed to be rewarding players for behaving like a Victorian girl rather than a girl living in the 21st century, so I had to do some serious rewriting.

    What sort of behaviours are encouraged or expected is an active concern for writers of games where players type commands. The parser-game format reflected in Inform7's default verbs and vocabulary of rooms and objects prebakes a lot of assumptions about the core activities of the player. The default assumption is that the player will spend most of their time be examining and manipulating objects in their environment, rather than talking or undertaking long projects.

    I found it interesting that your conversation system jumps off of the pronoun "who". Did you find in testing people would type things like "Who said that?", "Who are you?" or "Who is there?".

  • Thanks so much for sharing this, Frances.

    @francesvanscoy said:
    I had to do some serious rewriting.

    Based on the comment 20200127 v2, it seems that this code is freshly post-rewriting! Are there any before / after snippets or any previous versions that you would like to share, or is there a public version control with change history? Or should we focus on looking forward, not back?

    @francesvanscoy said:
    I wrote a fictitious backstory in which Priscilla begs her father to teach her his trade.

    The Longfellow example also sounds fascinating! This form of exploring the alternate possibilities for female protagonists is fictional social situations reminds me of some of Emily Short's work on conversational IF -- I'm thinking particularly of her "fractured fairytales" series including "Bronze" (Beauty and the Beast), "Glass" (Cinderella), "Alabaster" (Snow White), and "Indigo" (Rapunzel).

    I'm interested in the use of headings to organize the code ("book", "part", "chapter", "section"). I know that headings can act somewhat like a file/directory system for organizing Inform 7 code, and that they are particularly helpful for organizing very large works -- I'm thinking of Aaron Reed's Blue Lacuna, for example, with source code exported into 498 pages organized under into an outline of 546 headings. But I believe (but can't recall) there are other considerations for the way that headings work in the language -- like scoping names, or providing more informative error messages, or...?

    Could you say something about how you use headings pedagogically, or how you find that "outlining" facility of Inform7 different from the affordances of other programming languages?

  • @francesvanscoy Is this code running anywhere? I'd like to see the output before I comment on anything in this particular case. :) If not, do you have screenshots? I also second @jeremydouglass's request for snippets of the code before editing, if you have them!

  • @JoeyJones said:

    I found it interesting that your conversation system jumps off of the pronoun "who". Did you find in testing people would type things like "Who said that?", "Who are you?" or "Who is there?".

    Yes. For supporting my testers, I relied heavily on example Alpha in the documentation provided with Build 6M62 to give directions to my testers. Here's the Inform 7 code from the large code of which my code above is part.

    When play begins : 
        say " - - - - - - - - - - - - - - - - - - - -";
        say "[paragraph break]";
        say "Thank you for beta testing this game.[paragraph break](0) Read Emily Short[apostrophe]s advice for beta testers.  (If you don't have a copy, ask me.)[paragraph break](1) When prompted for a filename please enter your initials followed by the date and 24 hour clock time, for example 'flvs201409120619' for a morning time and 'flvs201409121819' for an evening time. [paragraph break](2) During game play you can enter questions or comments by typing a line that begins with a punctuation mark from the list ' . , ! ? - / [quotation mark] : ; ( ) [bracket] [close bracket] { }'.  I suggest using '?' to begin a question and '!' to begin a comment. [paragraph break] (3) Each time after playing the game, email me at frvanscoy@mail.wvu.edu with subject line beginning with TTLG, three files: the transcript (the file whose name begins with your intials), narrative.glkdata, and notebook.glkdata .[line break]  In addition, feel free to include questions/comments/errors/suggestions in the body of your message.  [paragraph break](4) Lather, rinse, repeat.[paragraph break][paragraph break]";
        say "not for release - objects without descriptions[paragraph break]";
        repeat with item running through things: 
            if description of the item is "": 
                say "[item] has no description.";
        try switching the story transcript on;
        say "[paragraph break]";
        say " - - - - - - - - - - - - - - - - - - - -";
        say "[paragraph break]";
        say "[paragraph break]".
    
    [from Inform 18.33 Reading a command]
    
    After reading a command (this is the ignore beta-comments rule):
        if the player's command matches the regular expression "^\p":
            say "(Noted.)";
            reject the player's command.
    

    The Emily Short article mentioned is "Suggestions or Testing" at her blog at https://emshort.blog/how-to-play/writing-if/my-articles/suggestions-for-testing/

    I found that my players frequently typed lines that began with "Who" or "What". I teach students who are majoring in art, computer science, and journalism. They are often not familiar with the conventions of text-based games.

  • @jeremydouglass said:

    Based on the comment 20200127 v2, it seems that this code is freshly post-rewriting!

    I had to do some recent rewriting in order to get my code to compile using Build 6M62.

    As a Mac user I worry about future access to older implementations of Inform (because I have several years of Inform 7 projects).
    See
    http://inform7.com/releases/2019/10/10/catalina.html

    This form of exploring the alternate possibilities for female protagonists is fictional social situations reminds me of some of Emily Short's work on conversational IF -- I'm thinking particularly of her "fractured fairytales" series including "Bronze" (Beauty and the Beast), "Glass" (Cinderella), "Alabaster" (Snow White), and "Indigo" (Rapunzel).

    I love these examples by Emily Short and frequently discuss them in class, especially the Pine series of examples (from Sleeping Beauty) provided in the Inform 7 documentation.

    I'm interested in the use of headings to organize the code ("book", "part", "chapter", "section"). I know that headings can act somewhat like a file/directory system for organizing Inform 7 code, and that they are particularly helpful for organizing very large works -- I'm thinking of Aaron Reed's Blue Lacuna, for example, with source code exported into 498 pages organized under into an outline of 546 headings. . . .

    Could you say something about how you use headings pedagogically, or how you find that "outlining" facility of Inform7 different from the affordances of other programming languages?

    Because of being an academic, I often return to a piece years after I first worked on it. The headings help remind me of what I was thinking about a few years ago.The great flexibility in organizing code under headings is liberating in some ways but some times gives me too much freedom and forces me to make some organizational decisions sooner than I would prefer in a work-in-progress. I enjoy building IF from Alice in Wonderland and Through the Looking Glass and usually give each book chapter its own Inform 7 chapter.

    To save interested followers of this discussion the work of extracting the headers from the current work under discussion, here is a list of my headers that shows one approach to organizing a work that I currently use. (Inform 7 rules about the order of code imposes some restrictions on how I might otherwise arrange code.)

    Book 1 - Beta testing - not for release
    Book 2 - General Definitions
         Part 3 - Properties of Things
              Chapter 1 - Properties of Plants
              Chapter 2 - Other things
              Chapter 3 - Notebooks
         Part 1 - Properties of Player Character
         Part 2 - Properties of Non Player Characters
              Chapter 1 - Guard Dog Wood (a dogwood tree in the middle of the garden)
              Chapter 2 - Henry (a frog who in charge of the wheelbarrow bookmobile)
              Chapter 3 - Dayzee (a daisy who eventually travels with Alice around the game world)
              Chapter 4 - Tigra (a tiger lily)
              Chapter 5 - Ken (a kudzu plant)
              Chapter 6 - The Red Queen
              Chapter 7 - The Walrus and the Carpenter (who open a seafood restaurant on the west coast at which Alice eventually works to obtain money to buy artifacts to enable her to enter a castle, become a queen, and move to the next game level)
         Part 4 - Facts
         Part 5 - Scenes
         Part 6 - Actions
         Part 7 - Help System
    Book 3 - Scenes and Rooms
         Part 1 - The Rooms
              Chapter 1 - Outside the Garden
              Chapter 2 - The Garden of Live Flowers
              Chapter 3 - generic commands while in Garden of Live Flowers
                   Section 1 - GOING east, south, west or north
                   Section 2 - EXAMINING sign(s) (part of learning scientific names of flowers)
                   Section 3 - PICKING flowers
                   Section 4 - SAYING SORRY
                   Section 5 - WHOING (asking "who")
                   Section 6 - LISTENING
                   Section 7 - Recognizing speech that contains certain words
              Chapter 4 - Main Garden
              Chapter 5 - Attack of the Creeper (Ken the Kudzu)
                   Section 1 - CUTTING a weed
                   Section 2 - - TICKLING a weed
                   Section 3 - Asking for HELP
              Chapter 6 - March of the Army
                   Section 4 - WHATING (asking "what")
              Chapter 7 - Sign Challenge (part of learning how to count in Lojban)
              Chapter 8 - Amphibian In the Garden (Henry the Frog)
              Chapter 9 - Bookmobile Visit
              Chapter 10 - Thorny Situation
              Chapter 11 - Royal Visit
              Chapter 12 - End the Game
    
    
  • edited February 2020

    One interesting thing about this code that I would focus is this line: A plant is a kind of person.

    However, person isn't defined elsewhere in the code, because it is an Inform7 built-in, and this is a moment of explicitly leveraging that core library.

    When I cut-paste the source code into Inform7 (attached, to preserve tabs) then I can run the game and inspect the Index > Kinds Index, which gives me an object tree:

    There are objects, including rooms and things. One kind of thing is a person -- and the player is a person. Other built-in things are "man" "woman" and "animal" -- and this game makes "plant" another kind of person, then extends a hierarchy of kinds of a plants and instances of plants.

    In particular, there is an interesting resonance between the form (IF, with facilities for conversational agents), the design, and the particular story/game genre. The negotiation of who counts as a person (or plant) and how they should be addressed or what kinds of actions are appropriate or possible for them to take is crucial to the scene from Alice Through the Looking Glass, Chapter 2: In the Garden of Live Flowers -- and to the musical adaptation in Disney's Alice in Wonderland -- in her conversations with Tiger-Lily, Rose, Violet, and Daisy.

  • @KalilaShapiro said:
    @francesvanscoy Is this code running anywhere? I'd like to see the output before I comment on anything in this particular case. :) If not, do you have screenshots?

    I don't know whether there is an easy way to download the code snippet I posted (without line numbers). If so the code could be pasted into the Source window if the Inform interface and run as written.
    But I have added a test statement

    test game_play with " east / who / who / pick lily / pick daisy / pick lily / west / sorry /sorry / pick kudzu  / inventory /hold knife /  cut kudzu / guard dog wood, help / pick kudzu / cut kudzu / tickle "
    

    and executed it, with the following result.

    This game is one square of a planned 64 square mildly educational game set in the expanded world of Lewis Carroll's  Through the Looking Glass.  The anticipated main audience is middle school girls. 
    
    
    
    To the west you see a large brick wall with a wooden gate in it. You open the wooden gate and walk through it.  The gate closes behind you.
    
    Kudzu Ken 20200127 v2
    An Interactive Fiction by Frances Van Scoy
    Release 1 / Serial number 200203 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD
    
    Garden of Live Flowers
    You are in a large walled flower garden. The garden has a circular path with four straight paths leading to gates to the north, east, south, and west.  In the center of the garden is a large dogwood tree.  Surrounding the dogwood are many flowers, including  daisies and tiger lilies.  Near each group of flowers is a small sign.  There is also some  kudzu growing in the garden.   
    
     The wooden gate in the brick wall on the east leads to the outside world.  There is no handle on the garden side of the door.  
    
       You hear a voice say, "Welcome to the Garden of Live Flowers."
    
    >test game_play
    (Testing.)
    
    >[1] east
    The wooden gate in the brick wall leads to the outside world.  Unfortunately it only opens into the garden, and there is no handle on the garden side of the door.
    
    >[2] who
    "Who said that?" you ask. 
    
    "I did.  I am Guard Dog Wood.  I live in the Garden of Live Flowers and protect the plants in the garden."
    
    >[3] who
    "Who said that?" you ask. 
    
     "I did.  My name's Tigra," says a tall tiger lily as she bends gracefully towards you. 
    
     "I didn't know flowers could talk!" you say.  "I CAN talk," says Tigra, "when there's someone worth talking to."  
    
     "We can ALL talk!" say several flowers simultaneously."
    
    >[4] pick lily
    You think you hear  the tiger lily screaming. Some nearby flowers shake, and you think you hear them saying something.  You hear a loud barking sound coming from the center of the garden.  You suddenly think that it might have been a bad idea to try to pick the tiger lily.
    
    >[5] pick daisy
    You are startled by a noise from the center of the garden and release the daisy without picking it.  You look up and see what appears to be an extremely rapidly growing branch coming from the dogwood tree in the middle of the garden.  It stops growing just above your head and then bends down, lifts you from the ground, shakes you and then drops you back onto the garden path.
    
    >[6] pick lily
    A large branch of the dogwood tree lifts you from the ground, extends itself over the brick wall, and drops you outside the garden.
    
    Outside the Garden
    To the west you see a large brick wall with a wooden gate in it.
    
    >[7] west
    
    Garden of Live Flowers
    You are in a large walled flower garden. The garden has a circular path with four straight paths leading to gates to the north, east, south, and west.  In the center of the garden is a large dogwood tree.  Surrounding the dogwood are many flowers, including  daisies and tiger lilies.  Near each group of flowers is a small sign.  There is also some  kudzu growing in the garden.   
    
     The wooden gate in the brick wall on the east leads to the outside world.  There is no handle on the garden side of the door.  
    
       You hear a voice say, "Welcome to the Garden of Live Flowers."
    
    You can see Tigra and Guard Dog Wood here.
    
    >[8] sorry
    You say, "I'm awfully sorry!"
    
    >[9] sorry
    Apologizing over and over won't change anything!
    
    >[10] pick kudzu
    You attempt to pick the kudzu.
    
    You feel something moving on your leg.  You look and see that a tendril of a kudzu plant is growing rapidly and wrapping itself around your leg.  Almost immediately it reaches your body and begins wrapping itself around you.
    
    >[11] inventory
    You are carrying:
      a knapsack (being worn)
        a knife
    
    >[12] hold knife
    Taken.
    
    >[13] cut kudzu
    You attempt to cut the kudzu with the knife.
    
    The kudzu lets out a horrifying scream, releases its grasp on you and grows to three times its previous size.
    
    >[14] guard dog wood, help
    Guard Dog Wood has better things to do.
    
    >[15] pick kudzu
    You attempt to pick the kudzu.
    
    >[16] cut kudzu
    Cutting him up would achieve little.
    
    >[17] tickle
    >
    
    

    I also second @jeremydouglass's request for snippets of the code before editing, if you have them!

    I don't have easy access to the computers on which I wrote earlier drafts, and I may have just deleted rather than saved the old statements. I can try to check this week before this WG session is over.

    But, I don't want Alice, the Player Character, to be too polite and too concerned with pleasing adults as she seems to be in the books or to behave the way players of traditional adventure-like text-based games do (ex. stealing things, killing opponents). For example I want her to find notes that say it's ok to take one item out of a pile or to earn money as a waitress at the restaurant built by the Walrus and the Carpenter and thereby earn money which she can use to buy things. Since the flowers she meets early in the game are sentient beings and can talk I want her to be prevented from picking them.

  • edited February 2020

    @francesvanscoy said:
    I don't know whether there is an easy way to download the code snippet I posted (without line numbers).

    I included it as attachments to my comment, in text or Inform7 file.

    It appears that, when copy-pasting from the forum into Inform7, the code is damaged because Inform7 uses whitespace (tabs) to organize code blocks (what is known as the off-side rule, as found in Python, CoffeeScript, and Make files et cetera) but our markdown processor may transform those into spaces. File attachments are a way around that.

  • There are several decisions the designer of a work of Interactive Fiction or text-based game needs to make early in the design process.

    One of those is whether the work is to be parser-based or choice (menu)-based.My preference is parser-based because it allows greater apparent freedom for the player and allows the player to be surprised when finding an unexpected command. Emily Short argues otherwise (https://emshort.blog/2010/06/07/so-do-we-need-this-parser-thing-anyway/ and https://emshort.blog/2019/12/10/mailbag-moments-of-non-choice/ ) But it's important to include sufficient hints that a player won't be stuck for a long time looking for a command that the parser will accept. (I've been embarrassed when I've shown my students a game that I wrote a year or two ago but have since forgotten how to play. ) Here's an example of my hint functionality in a slightly larger version of the game under discussion.

    >hints
    Hints are available about the following topics. Typing HINT followed by the name of a topic may give further information.
    
              credits: find out who worked on the game
              cut: cut something
              dig: 
              east: move to the area to the east of you
              help: ask a non player character to help you
              how: ask how a non player character did something
              listen (command): listen to sounds near you
              north: move to the area to the north of you
              notebook (object): record and review notes
              pick: pick a flower
              plant: 
              put: 
              sorry: apologize
              south: move to the area to the south of you
              tickle: tickle someone or something
              wait: wait for one minute of game time
              west: move to the area to the west of you
              what: learn more about a recent event
              who: learn more about a non player character
    

    This at least reveals some useful but non traditional commands such as "notebook," "sorry," and "tickle."
    Secondly, Chris Crawford's advice on choosing "verbs" and emphasizing people more than objects ( https://www.erasmatazz.com/library/c839b0d2d6b6417787b1/too-many-verbs.html,

    https://nodontdie.com/chris-crawford)
    are something I've taken to heart. I'm currently writing my game about the love triangle involving Prisilla Mullins as a menu- or choice-based game because I think it's easier to write it as a choice-based game. But once I have it working correctly I hope to convert it into a parser-based game. Questions inspired by Chris Crawford include: how many verbs should be in a game? How do I teach the player what verbs I've implemented? Will my game be better if it emphasizes people rather than objects? How will the implementation of my game or IF change if it emphasizes people?
    Thirdly, another question is based on our not always considering an alternative mechanic to the taking (stealing?) of treasure. My target audience is often middle school girls. I've been inflenced by the text book for my game development class, Jesse Schell's The Art of Game Design: A Book of Lenses, in the latter chapters of which he writes about the impact of games on their players. "Games are not just trivial amusements. . . . You are working in, and inventing, the medium that will subsume all others. The medium that a person is immersed in when they are young defines how they will think for their entire lives. " I ask myself, do I want to teach middle school girls to become thieves? Or can I assume that they will recognize the fantasy aspect of a game? The 1983 Infocom game Infidel seemed critical of the behavior of plundering artifacts by the Player Character archaelogist, as described by Emily Short ( in video Emily Short - The Past, Present and Future from AdventureX 2016,available online at 4:56-6:17).

Sign In or Register to comment.