Re: [pygame] Text-Based RPG

2007-06-19 Thread Luke Paireepinart
Jonah Fishel wrote: You guys are geniuses. Haha you probably work for big corporations and stuff that do this for a living and Iʻm just a 13 year old kid who found Python on my Mac! Thank you anyway! There are lots of great tutors in the Python community. The pygame list welcomes people of all

Re: [pygame] Text-Based RPG

2007-06-19 Thread Jonah Fishel
You guys are geniuses. Haha you probably work for big corporations and stuff that do this for a living and Iʻm just a 13 year old kid who found Python on my Mac! Thank you anyway! On Jun 19, 2007, at 6:34 PM, [EMAIL PROTECTED] wrote: On Tue, June 19, 2007 7:38 pm, Jonah Fishel wrote: def Pr

Re: [pygame] Text-Based RPG

2007-06-19 Thread kschnee
On Tue, June 19, 2007 7:38 pm, Jonah Fishel wrote: > def ProcessCommand(current_room): """CommandLine processor""" > words = comm.split() if words[0] == 'north': MoveNorth(current_room) About this section: Try typing a blank line as your command and you'll get an error, because words will be a bla

Re: [pygame] Text-Based RPG

2007-06-19 Thread Dave LeCompte (really)
"Jonah Fishel" <[EMAIL PROTECTED]> wrote: > tavern = Room() [...] > tavernbackroom = Room() [...] > tavern.room_north = tavernbackroom() [...] > When I try to run this test program, it says that "AttributeError: > Room instance has no __call__ method" The problem you're hitting here is that you'

Re: [pygame] Text-Based RPG

2007-06-19 Thread Laura Creighton
In a message of Tue, 19 Jun 2007 15:38:22 EDT, Jonah Fishel writes: >You guys are really awesomely smart BUT I'm dumb, so: >class Room: > def __init__(self): > exits = {} # Create a dictionary of exits- depending on ID, >there could be different exits > self.Id = None # ID sta

Re: [pygame] Text-Based RPG

2007-06-19 Thread Marius Gedminas
On Tue, Jun 19, 2007 at 10:22:13AM -0400, Jonah Fishel wrote: > Thank you very much. I was very helpful. > Trogdor... that's great. I gotta use that word in the game =) http://en.wikipedia.org/wiki/Trogdor Marius Gedminas -- Added mysterious, undocumented --scanflags and --fuzzy options.

Re: [pygame] Text-Based RPG

2007-06-19 Thread Jonah Fishel
You guys are really awesomely smart BUT I'm dumb, so: class Room: def __init__(self): exits = {} # Create a dictionary of exits- depending on ID, there could be different exits self.Id = None # ID starts at 0, but different rooms have different ID self.name = Non

Re: [pygame] Text-Based RPG

2007-06-19 Thread Kamilche
Kris Schnee wrote: What's different about the tavern versus a regular room? Most likely it's just some variables that you might as well put into a single Room class. For instance, if a room can be light or dark, you could give the Room class a "light" variable by putting in the __init__ funct

Re: [pygame] Text-Based RPG

2007-06-19 Thread massimo s.
Jonah Fishel ha scritto: > I've been away from Python for several months. I just came back to it, > to start working on a text-based RPG. To get started, I decided to move > by rooms. I have separate text files for each major message, to conserve > file space. What troubles me is that when I tested

Re: [pygame] Text-Based RPG

2007-06-19 Thread Kris Schnee
Dave LeCompte (really) wrote: "Jonah Fishel" <[EMAIL PROTECTED]> was asking: Could I make a Room class that has functions based on different variables and then make a separate class for each room like AnthroTavern(Room) so I could base it on the rom class and use the functions for the room clas

Re: [pygame] Text-Based RPG

2007-06-19 Thread Dave LeCompte (really)
"Jonah Fishel" <[EMAIL PROTECTED]> was asking: > Could I make a Room class that has functions based on different > variables and then make a separate class for each room like > AnthroTavern(Room) so I could base it on the rom class and use the > functions for the room class? I had a manager once,

Re: [pygame] Text-Based RPG

2007-06-19 Thread Jonah Fishel
Could I make a Room class that has functions based on different variables and then make a separate class for each room like AnthroTavern(Room) so I could base it on the rom class and use the functions for the room class? Yes, you could (and should). It looks like you're handling each ro

RE: [pygame] Text-Based RPG

2007-06-19 Thread Chris Ashurst
Don't forget to add "Trogdor.burninate(people)" ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jonah Fishel Sent: Tuesday, June 19, 2007 10:22 To: pygame-users@seul.org Subject: Re: [pygame] Text-Based RPG Thank you very much. I w

Re: [pygame] Text-Based RPG

2007-06-19 Thread Jonah Fishel
Thank you very much. I was very helpful. Trogdor... that's great. I gotta use that word in the game =) self.some_other_variable = "Trogdor"

Re: [pygame] Text-Based RPG

2007-06-18 Thread Casey Duncan
On Jun 18, 2007, at 3:44 PM, [EMAIL PROTECTED] wrote: On Mon, June 18, 2007 4:58 pm, Dave LeCompte (really) wrote: Other folks have talked about returning values, which is good, but this line makes me uneasy: def command(command, current_room): I'd stay away from using the same name for m

Re: [pygame] Text-Based RPG

2007-06-18 Thread kschnee
On Mon, June 18, 2007 4:58 pm, Dave LeCompte (really) wrote: > Other folks have talked about returning values, which is good, but this > line makes me uneasy: > >> def command(command, current_room): > > I'd stay away from using the same name for more than one thing. In this > case, you're naming t

Re: [pygame] Text-Based RPG

2007-06-18 Thread kschnee
On Mon, June 18, 2007 8:57 pm, Jonah Fishel wrote: >> I don't really have a good enough grasp of classes to implement >> them. Could I make a RoomManager class? > >> Also you should look up how 'class'es work. Using them would make >> this easier. Here's one I know enough to answer! 8) Yes, you

Re: [pygame] Text-Based RPG

2007-06-18 Thread Jonah Fishel
I don't really have a good enough grasp of classes to implement them. Could I make a RoomManager class? Also you should look up how 'class'es work. Using them would make this easier.

Re: [pygame] Text-Based RPG

2007-06-18 Thread space coyote
On 6/18/07, Jonah Fishel <[EMAIL PROTECTED]> wrote: I've been away from Python for several months. I just came back to it, to start working on a text-based RPG. To get started, I decided to move by rooms. I have separate text files for each major message, to conserve file space. What troubles me

Re: [pygame] Text-Based RPG

2007-06-18 Thread Dave LeCompte (really)
"Jonah Fishel" <[EMAIL PROTECTED]> is working on a text adventure: Other folks have talked about returning values, which is good, but this line makes me uneasy: > def command(command, current_room): I'd stay away from using the same name for more than one thing. In this case, you're naming the a

Re: [pygame] Text-Based RPG

2007-06-18 Thread Jonah Fishel
As separate html pages for each room/action? I would think not. I would think programatically generating the pages would be easier, and would be infinitely more flexible. This a web-based game? Not really. I just wanted to know.

Re: [pygame] Text-Based RPG

2007-06-18 Thread Jonah Fishel
Thank you guys! It worked. Now I see what went wrong. On Jun 18, 2007, at 12:43 PM, John Krukoff wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:owner-pygame- [EMAIL PROTECTED] On Behalf Of Jonah Fishel Sent: Monday, June 18, 2007 10:30 AM To: pygame-users@seul.org Subject:

Re: [pygame] Text-Based RPG

2007-06-18 Thread Casey Duncan
On Jun 18, 2007, at 9:41 AM, Jonah Fishel wrote: Nope. Sorry. I'm new to Python- what does strip() do? strip() trims leading and trailing whitespace. In any case my suggestion won't work, because as Will pointed out, the command_line () function doesn't return anything. Try this: def comm

RE: [pygame] Text-Based RPG

2007-06-18 Thread John Krukoff
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Jonah Fishel > Sent: Monday, June 18, 2007 10:30 AM > To: pygame-users@seul.org > Subject: [pygame] Text-Based RPG > > I've been away from Python for several months. I just came back to > it, to start w

Re: [pygame] Text-Based RPG

2007-06-18 Thread Will McGugan
Jonah Fishel wrote: I've been away from Python for several months. I just came back to it, to start working on a text-based RPG. To get started, I decided to move by rooms. I have separate text files for each major message, to conserve file space. What troubles me is that when I tested it,

Re: [pygame] Text-Based RPG

2007-06-18 Thread Jonah Fishel
Nope. Sorry. I'm new to Python- what does strip() do? And would this be easier to write in HTML? On Jun 18, 2007, at 12:36 PM, Casey Duncan wrote: On Jun 18, 2007, at 9:29 AM, Jonah Fishel wrote: I've been away from Python for several months. I just came back to it, to start working on a t

Re: [pygame] Text-Based RPG

2007-06-18 Thread Casey Duncan
On Jun 18, 2007, at 9:29 AM, Jonah Fishel wrote: I've been away from Python for several months. I just came back to it, to start working on a text-based RPG. To get started, I decided to move by rooms. I have separate text files for each major message, to conserve file space. What troubles