08 Aug, 2010, GhostInAProgram wrote in the 21st comment:
Votes: 0
#Main
#DD
def dd_room(1,1):
dd.showroom()
choice = raw_input (": ")

if choice == ("s"):
print "You move South."
outsideofdd_room()
elif choice == ("w"):
print "You move West."
ddrestroom_room()
elif choice == ("e"):
print "You move East."
ddkitchen_room()
elif choice == ("hs"):
h.hs()
dd_room()
else:
dd_room()

#DD Bathroom
def ddrestroom_room(1,2):
ddrestroom.showroom()
choice = raw_input (": ")

if choice == ("e"):
print "You move East."
dd_room()
else:
ddrestroom_room()

#DD Kitchen
def ddkitchen_room(1,3):
ddkitchen.showroom()
choice = raw_input (": ")

if choice == ("w"):
print "You move West."
dd_room()
else:
ddkitchen_room()

#Outside of DD
def outsideofdd_room(1,4):
outsideofdd.showroom()
choice = raw_input (": ")

if choice == ("n"):
print "You move North."
dd_room()
else:
outsideofdd_room()


This is what allows me to move.
How could I control an NPC with this? :/
08 Aug, 2010, David Haley wrote in the 22nd comment:
Votes: 0
GhostInAProgram said:
Quote
What does it mean for a game to be "alive"?


Are you serious? Lol.

When you can't put the game down, when you feel what the character feels, when you feel like you're in the environment your character is, etc. My game seems stiff and rugged - I want it flexible and smooth. Ha ha.

Lol yes I'm serious lol. I like my games to be like virtual reality too. Lol, rofl.
08 Aug, 2010, GhostInAProgram wrote in the 23rd comment:
Votes: 0
Quote
Lol yes I'm serious lol. I like my games to be like virtual reality too. Lol, rofl.


You're an ass. :]
08 Aug, 2010, David Haley wrote in the 24th comment:
Votes: 0
Given your level of advancement here, when people ask you a question you should probably assume they meant something more interesting than the one you answered – you shouldn't assume their question was quite that stupid, nor is it useful to laugh at their question. This is not just an issue of simple politeness – it is also the best way for you to get the help you're looking for.
08 Aug, 2010, GhostInAProgram wrote in the 25th comment:
Votes: 0
David Haley said:
Given your level of advancement here, when people ask you a question you should probably assume they meant something more interesting than the one you answered – you shouldn't assume their question was quite that stupid, nor is it useful to laugh at their question. This is not just an issue of simple politeness – it is also the best way for you to get the help you're looking for.


Politeness and help:
I don't need your help on when I need to insert a 'lol'. I asked for MUD advice so maybe YOU need to be more polite or just leave this topic?

Dunno.

-Ghost
08 Aug, 2010, bbailey wrote in the 26th comment:
Votes: 0
GhostInAProgram said:
Quote
Lol yes I'm serious lol. I like my games to be like virtual reality too. Lol, rofl.


You're an ass. :]


Probably true, but he does illustrate the difficulty in taking someone seriously, especially in technical discussion, when they communicate as though they're texting their bud about the killer weed they just scored.
08 Aug, 2010, Cratylus wrote in the 27th comment:
Votes: 0
GhostInAProgram said:
Quote
Lol yes I'm serious lol. I like my games to be like virtual reality too. Lol, rofl.


You're an ass. :]


He's making a valid point, ass or no ass.

There is some high-caliber expertise on this forum, but a lot of those people are very conservative
with the time they spend helping, often helping those with the most likelihood of doing something
useful with the help.

Helping someone who is patently unserious and sloppy in thought is probably a waste of time.
David was helping you establish yourself as not a timesink. Calling him names was a waste
of the opportunity he gave you.

-Crat
http://lpmuds.net
08 Aug, 2010, David Haley wrote in the 28th comment:
Votes: 0
Quote
I asked for MUD advice so maybe YOU need to be more polite or just leave this topic?

I, and several others, have asked you questions to understand what exactly it is you are trying to do, so that we can actually give you this MUD advice. It's extremely hard to answer somewhat non-sensical questions. Your responses have for the most part been nothing more than "what are you serious lol I want it to be alive lol", which makes it difficult to help you. You are asked for clarification, and you laugh at the person asking you the question – the same person that is trying to help you!

If you're not willing to take these things a little more seriously and help us help you, then yes there is not really anything I can do for you and we might as well stop wasting time. :sad:
08 Aug, 2010, GhostInAProgram wrote in the 29th comment:
Votes: 0
@Cratylus Okay, if he wants to give me help I accept it in open arms!

If he wants to criticize me on how I place my 'lol's', whose time is he wasting?

-Ghost
08 Aug, 2010, GhostInAProgram wrote in the 30th comment:
Votes: 0
I was explaining more and more about my MUD.

I posted my code on how I move room to room and I gave a piece about how I stored my characters and such.

I told you what I wanted the mobs to do - aimlessly wonder around for the time being.

-Ghost
08 Aug, 2010, David Haley wrote in the 31st comment:
Votes: 0
You have been given a few answers on how to make mobs wander (the spelling mistake is confusing, hence the correction) – Crat even gave you English pseudo-code for how to do it (use a random number function to pick one of the room's exits randomly). If the answer was unclear, you should explain where you didn't understand it.
08 Aug, 2010, GhostInAProgram wrote in the 32nd comment:
Votes: 0
David Haley said:
You have been given a few answers on how to make mobs wander (the spelling mistake is confusing, hence the correction) – Crat even gave you English pseudo-code for how to do it (use a random number function to pick one of the room's exits randomly). If the answer was unclear, you should explain where you didn't understand it.


I'll go test out the random number generator.

Sorry about the name calling, but you just kept 'dogging' on my sentences… Really annoying.

-Ghost
08 Aug, 2010, David Haley wrote in the 33rd comment:
Votes: 0
Quote
Sorry about the name calling, but you just kept 'dogging' on my sentences… Really annoying.

Perhaps I should have been less subtle, but I was trying to point out to you that your writing style made it less likely for you to get the help you're looking for. (Others have said the same, so for whatever it's worth it's not just me being picky…)
08 Aug, 2010, GhostInAProgram wrote in the 34th comment:
Votes: 0
I understand David. Sorry to anyone else that felt the same way.

Anyways, back to coding?

Here's what I have so far for my random generator. The only problem is I can't seem to grasp how to place 'mob' in 'room'.
random.choice(1,2,3)
if random.choice == 1:
#Not sure…
elif random.choice == 2:
#Not sure…
elif random.choice == 3:
#Not sure…
08 Aug, 2010, David Haley wrote in the 35th comment:
Votes: 0
One of the problems here is that you have represented your world programmatically, not with data. That is to say, you have explicit control flow to decide where you go given what room you are in.

Consider instead having a data structure that represents a room, and has a map from exit direction to target room. Then, when a character tries to go "east", look up "east" in the character's current room and if there is a corresponding room, move the player there.

For mobs, you would do basically the same thing except that you pick the exit at random from the list of available exits (obtained from the map above).
08 Aug, 2010, GhostInAProgram wrote in the 36th comment:
Votes: 0
David Haley said:
One of the problems here is that you have represented your world programmatically, not with data. That is to say, you have explicit control flow to decide where you go given what room you are in.

Consider instead having a data structure that represents a room, and has a map from exit direction to target room. Then, when a character tries to go "east", look up "east" in the character's current room and if there is a corresponding room, move the player there.

For mobs, you would do basically the same thing except that you pick the exit at random from the list of available exits (obtained from the map above).


*nods* Okay. When you say 'data structure' I think 'class'. Am I right?

P.S. That code I wrote was horribly wrong. >.>

-Ghost
08 Aug, 2010, Chris Bailey wrote in the 37th comment:
Votes: 0
Another simple way of getting the hang of this would be to create a two dimensional array of Room objects. Each room object could hold a reference to all items/players/npcs in that room. When you want to move the player/item/npc, you simply update an x,y coordinate stored on the object, remove it from the contents list of the old room, add it to the new room. The item/player/npc x,y coordinates can correspond to cells in the 2 dimensional array. Trying to explain it very simply, do you understand?
08 Aug, 2010, Cratylus wrote in the 38th comment:
Votes: 0
I looked at the code you posted earlier that describes room movement.

I don't know that language, but it seems like you're not really keeping track
of where the player is in a way that lends itself to multiple users experiencing
shared events. It looks more like an adventure game or a single-user mud.

For example, is there a variable saved somewhere that indicates which
room a player is at a given time? It looks to me like you don't save that
anywhere. It looks like there isn't really anywhere you are saving a
player's location…you're just printing to the screen some messages that
the player should use to know where they are…but the *game* doesn't
seem to know where they are, so what happens if someone else joins and
enters the room? How does the mud know the two players are in the same room?

Maybe I'm missing some obvious thing about the language you're using, but
it looks to me like you're assuming that printing messages to the screen is
all that is needed. That works for maybe the very first 1 second of a mud, but
after that, the messages have to report related events that the mud keeps
track of, like who is where.

Solve that problem, and you solve your NPC problem.

If I've correctly identified how you're doing things, you are much, much, much, much
further from making a mud than you think. You've folded a paper airplane while
planning an airliner. Your approach is fundamentally mistaken.

Having said that, there's nothing wrong with coding a single-player adventure game.
Just be aware that's what it appears you're up to.

-Crat
http://lpmuds.net
08 Aug, 2010, Idealiad wrote in the 39th comment:
Votes: 0
Ghost, I didn't realize this until you posted your code, but you're making what's more usually known as a text adventure, instead of a MUD.

The two aren't really that different in essence, but you'll have an easier time looking for suitable examples if you search for text adventures. Text adventures also are better examples for what you're doing, since you don't have to deal with a MUD's networking and so on.

For example:

http://ubuntuforums.org/showthread.php?t...


eta: ninja Crat
08 Aug, 2010, GhostInAProgram wrote in the 40th comment:
Votes: 0
That is what I'm doing right now, but I want to make a MUD.

I don't understand how to save those things. I've been saving username's and passwords in a text file.
rooma = "This is room a"
roomb = "This is room b"
roomc = "This is room c"
rooma = [roomb, roomc]
roomb = [rooma]
roomc = [rooma]


I think I'm going in the right direction with this?
The language is Python by the way.

-Ghost
20.0/45