Python Text Adventure Authoring System

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zachary

    Python Text Adventure Authoring System

    Hello,
    I've recently thought of how ideal Python is for the development of what
    used to be called text adventures. In case any of you don't know, these
    were basically sort of a computer game in which the player guided the story
    by typing in natural language commands, e.g. get ball.
    Some popular games of the 1980's include Zork, A Mind Forever Voyaging,
    among others.
    I was just wondering if anyone has any module that might help in the
    implementation of a text parser, something to read player commands.
    My idea is to have each room, item, creature, etc. Be represented as a
    Python instance.
    For example, the following code might setup a room class:
    class room:
    def __init__(self, rdesc, exit):
    self.desc = rdesc
    #Add Other code here

    If anyone has any idea how this might be done, I would love to hear from
    you.
    P.S:
    I have already seen another text adventure development system written in
    Python, called Paws. I thought this would be a sort of first project.


  • Francis Avila

    #2
    Re: Python Text Adventure Authoring System

    Zachary wrote in message ...[color=blue]
    >I have already seen another text adventure development system written in
    >Python, called Paws. I thought this would be a sort of first project.[/color]

    I don't want to stop you, but I warn you that developing a system like this
    is far more complex than you think.

    Take a look at PAWS, and after that some of the mechanisms in the language
    Inform. Studying another language specifically designed for text-adventure
    authoring will give you an idea of the mechanisms involved, particularly in
    grammar and parsing, where a lot of things are needed that you might not
    otherwise think of.
    --
    Francis Avila

    Comment

    • Erik Max Francis

      #3
      Re: Python Text Adventure Authoring System

      Francis Avila wrote:
      [color=blue]
      > I don't want to stop you, but I warn you that developing a system like
      > this
      > is far more complex than you think.[/color]

      Also, it's a pretty mature field in terms of existing technology. There
      are dozens of authoring systems, including half a dozen or so major
      ones:



      --
      __ Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
      / \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
      \__/ Do we really want to go to Mars / Do we really want to try
      -- Cassandra Wilson

      Comment

      • Jp Calderone

        #4
        Re: Python Text Adventure Authoring System

        On Sun, Jan 18, 2004 at 05:44:00PM -0800, Zachary wrote:[color=blue]
        > Hello,[/color]
        [color=blue]
        > I've recently thought of how ideal Python is for the development of what
        > used to be called text adventures. In case any of you don't know, these
        > were basically sort of a computer game in which the player guided the
        > story by typing in natural language commands, e.g. get ball.
        >
        > Some popular games of the 1980's include Zork, A Mind Forever Voyaging,
        > among others.
        >
        > I was just wondering if anyone has any module that might help in the
        > implementation of a text parser, something to read player commands. My
        > idea is to have each room, item, creature, etc. Be represented as a
        > Python instance.
        >
        > For example, the following code might setup a room class:
        >
        > class room:
        > def __init__(self, rdesc, exit):
        > self.desc = rdesc
        > #Add Other code here
        >
        > If anyone has any idea how this might be done, I would love to hear from
        > you.
        >
        > P.S:
        >
        > I have already seen another text adventure development system written in
        > Python, called Paws. I thought this would be a sort of first project.
        >[/color]

        There are a few modules in Twisted's CVS repository that are handy in this
        area (as a few people are aware, Twisted is actually a support framework for
        multiplayer interactive fiction or text adventure games). Documentation is
        sparse, but much of the code is pretty simple (a *few* parts are mind
        bendingly complex, but none of those are related to text parsing ;)

        cvs -d:pserver:anon@ cvs.twistedmatr ix.com:/cvs co Reality
        cvs -d:pserver:anon@ cvs.twistedmatr ix.com:/cvs co NewReality
        cvs -d:pserver:anon@ cvs.twistedmatr ix.com:/cvs co Imagination

        There was also a presentation about Reality at last year's PyCon. The
        paper is available in Twisted CVS (history docs directory), or with viewcvs
        at:



        Imagination represents the most current thinking on the topic, but Reality
        and NewReality have more infrastructure for actually dealing with user input
        (Imagination is like a hyper distillate of our ideas currently, and so can't
        be bothered to cover such things as handling user input ;).

        And of course, many of the developers frequent #twisted on irc.freenode.ne t
        and just *love* it when someone wants to talk about Reality instead of boring
        things like HTTP and IMAP4 ;)

        Hope this helps,

        Jp

        Comment

        • Zachary

          #5
          Re: Python Text Adventure Authoring System


          "Jp Calderone" <exarkun@intarw eb.us> wrote in message
          news:mailman.48 9.1074478463.12 720.python-list@python.org ...[color=blue]
          > On Sun, Jan 18, 2004 at 05:44:00PM -0800, Zachary wrote:[color=green]
          > > Hello,[/color]
          >[color=green]
          > > I've recently thought of how ideal Python is for the development of what
          > > used to be called text adventures. In case any of you don't know, these
          > > were basically sort of a computer game in which the player guided the
          > > story by typing in natural language commands, e.g. get ball.
          > >
          > > Some popular games of the 1980's include Zork, A Mind Forever Voyaging,
          > > among others.
          > >
          > > I was just wondering if anyone has any module that might help in the
          > > implementation of a text parser, something to read player commands. My
          > > idea is to have each room, item, creature, etc. Be represented as a
          > > Python instance.
          > >
          > > For example, the following code might setup a room class:
          > >
          > > class room:
          > > def __init__(self, rdesc, exit):
          > > self.desc = rdesc
          > > #Add Other code here
          > >
          > > If anyone has any idea how this might be done, I would love to hear from
          > > you.
          > >
          > > P.S:
          > >
          > > I have already seen another text adventure development system written in
          > > Python, called Paws. I thought this would be a sort of first project.
          > >[/color]
          >
          > There are a few modules in Twisted's CVS repository that are handy in[/color]
          this[color=blue]
          > area (as a few people are aware, Twisted is actually a support framework[/color]
          for[color=blue]
          > multiplayer interactive fiction or text adventure games). Documentation[/color]
          is[color=blue]
          > sparse, but much of the code is pretty simple (a *few* parts are mind
          > bendingly complex, but none of those are related to text parsing ;)
          >
          > cvs -d:pserver:anon@ cvs.twistedmatr ix.com:/cvs co Reality
          > cvs -d:pserver:anon@ cvs.twistedmatr ix.com:/cvs co NewReality
          > cvs -d:pserver:anon@ cvs.twistedmatr ix.com:/cvs co Imagination
          >
          > There was also a presentation about Reality at last year's PyCon. The
          > paper is available in Twisted CVS (history docs directory), or with[/color]
          viewcvs[color=blue]
          > at:
          >
          >[/color]
          http://cvs.twistedmatrix.com/cvs/doc...isted-reality/[color=blue]
          >
          > Imagination represents the most current thinking on the topic, but[/color]
          Reality[color=blue]
          > and NewReality have more infrastructure for actually dealing with user[/color]
          input[color=blue]
          > (Imagination is like a hyper distillate of our ideas currently, and so[/color]
          can't[color=blue]
          > be bothered to cover such things as handling user input ;).
          >
          > And of course, many of the developers frequent #twisted on[/color]
          irc.freenode.ne t[color=blue]
          > and just *love* it when someone wants to talk about Reality instead of[/color]
          boring[color=blue]
          > things like HTTP and IMAP4 ;)
          >
          > Hope this helps,
          >
          > Jp
          >[/color]
          Thanks for the advice, but I believe that the project could be considered
          shelved for now. I'll content myself with creating something smaller scale.


          Comment

          • Peter Hansen

            #6
            Re: Python Text Adventure Authoring System

            Jp Calderone wrote:[color=blue]
            >
            > There are a few modules in Twisted's CVS repository that are handy in this
            > area (as a few people are aware, Twisted is actually a support framework for
            > multiplayer interactive fiction or text adventure games).[/color]

            Just to clarify, though I know Jp knows this very well :-), Twisted is *much more*
            than just a support framework for multiplayer interactive fiction, although
            it had its origins in that area and is still being developed for it.

            -Peter

            Comment

            Working...