[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Python IRC Zork

Kris Davidson

2/28/2008 3:39:00 AM

Hi,

If this has been done before in another language could someone please
tell me, if not I was wondering is its possible and what the easier
way is to create an IRC bot that allows you to play Zork:

I was thinking of just creating a simple Python IRC bot or finding an
existing one then have it run Zork and read/write from stdout/stdin.

Is that possible? Is there a better or easier way to do it? Are there
any existing programs that do something similar?

Or just really anything else people have to say on the subject.

Thanks

Kris
2 Answers

Erik Max Francis

2/28/2008 9:51:00 AM

0

Kris Davidson wrote:

> If this has been done before in another language could someone please
> tell me, if not I was wondering is its possible and what the easier
> way is to create an IRC bot that allows you to play Zork:
>
> I was thinking of just creating a simple Python IRC bot or finding an
> existing one then have it run Zork and read/write from stdout/stdin.
>
> Is that possible? Is there a better or easier way to do it? Are there
> any existing programs that do something similar?
>
> Or just really anything else people have to say on the subject.

The easiest way would be to start with a standalone Z-code interpreter
that does just basic stdin/stdout transactions, get a licensed copy of
the Zork data set, and hook it up via a subprocess -- in other words,
just what you suggest. I haven't done recent surveys, but there are
_many_ portable Z machine interpreters such that I'm sure one or two
would suffice. (You'd also have to play buffering/fcntl games to make
sure that it doesn't block, but those are in the details.)

The bigger picture would be writing a full Z machine in Python, which is
something I embarked on for my own amusement a while back but never got
far enough to do anything useful at all, given the size of the task.

--
Erik Max Francis && max@alcyone.com && http://www.alcyon...
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
Wyrd has swept all my kin / all the brave chiefs away! / Now I must
follow them! -- Beowulf

Kris Davidson

2/28/2008 1:40:00 PM

0

> The bigger picture would be writing a full Z machine in Python, which is
> something I embarked on for my own amusement a while back but never got
> far enough to do anything useful at all, given the size of the task.

Might be worth trying that or setting up a project somewhere, do any
exist? Have you posted what code you had somewhere?