Thread: Directions!!!!!!!!

  1. #1
    Registered User Joe100's Avatar
    Join Date
    Jul 2003
    Posts
    63

    Directions!!!!!!!!

    hey guys im back lol well while creatin my text adventure i have ran into a little problem with it as i was writing one day i realized o $$$$ ! i dont know how to use directions like north west soth east , so i was wodering if you guys and girls out ther in the programming world could give me a little nug in the right directions all help will be greatly appreciated and will surely be worthy of credits

    Sincerly Joe100
    "Be Quick Or Be Dead"

    [img]
    http://www.danasoft.com/sig/GU.jpg
    [/img]

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >> how to use directions like north west soth east
    You're going to have to explain your question better. What are you having trouble with exactly?

    Also, check out the Game Forum on here:
    http://cboard.cprogramming.com/forum...p?s=&forumid=6
    There are sample games, and tutorial links etc etc.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User Joe100's Avatar
    Join Date
    Jul 2003
    Posts
    63
    well hammer in a text game you need to like where the game actually asks you what direction u want to go in do you get what im saying
    "Be Quick Or Be Dead"

    [img]
    http://www.danasoft.com/sig/GU.jpg
    [/img]

  4. #4
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    >>well hammer in a text game you need to like where the game
    >>actually asks you what direction u want to go in do you get
    >>what im saying

    read this back to yourself and ask, "do I get what the hell I'm saying?!" probably not. Most likely not many people on this board are english majors, but when you are asking for help, make sure what you are writing could be comprehended.

    Do you mean directions as in travel? You want the user to input which way they want to go (N, NS, S etc)? please elaborate, this time clearly

    axon

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  5. #5
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Code:
    enum direction {north, east, south, west};
    There's one way. I believe that's what I've used for text based games.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  6. #6
    Registered User Joe100's Avatar
    Join Date
    Jul 2003
    Posts
    63
    ya sweet thank u some one understands me lol, joshdick could you please tell me
    "Be Quick Or Be Dead"

    [img]
    http://www.danasoft.com/sig/GU.jpg
    [/img]

  7. #7
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Originally posted by axon
    read this back to yourself and ask, "do I get what the hell I'm saying?!" probably not. Most likely not many people on this board are english majors, but when you are asking for help, make sure what you are writing could be comprehended.
    axon
    While I agree with you, it's also true that not all people on these boards speak English. For some, this is a second or third (and difficult) language.
    Away.

  8. #8
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Originally posted by Joe100
    ya sweet thank u some one understands me lol, joshdick
    You're welcome. Now, that first half of what you said makes a fair share of sense. It's the following that puzzles me:
    could you please tell me
    I don't know if you're asking another question there or what. If you are, please restate it. If not, I guess that's that.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  9. #9
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    Originally posted by confuted
    While I agree with you, it's also true that not all people on these boards speak English. For some, this is a second or third (and difficult) language.
    yes, yes, I know. I was a little frustrated last night with my computer architecture homework. I couldn't get Xilinx working probably, and tkgate kept on crashing. So, Joe100 sorry about that comment if your English indeed is poor.

    axon

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  10. #10
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Unless Joe100 uses a completely different form of written language, he SHOULD know about punctuation. A few periods here or there could make his posts so much more readable. That certainly doesn't require a huge knowledge of english.

    As for the problem, I'm as stumped as the rest of you. I'll give it a shot.

    Code:
    char *chInput=new char[32];
    
    cin >> chInput;
    
    if (strcmp(chInput,"north"))
        GoNorth();
    
    if (strcmp(chInput,"south"))
        GoSouth();
    Joe100, is that even nearly what you wanted?
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  11. #11
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    Big brother steps in

    First things first: I am not Joe100's brother!
    Here stole my name.

    Anyway, he is English, was born in America, and has no reason no to spell better. Please don't give him that pitty. If anyone here remembers any of his other posts, you'll agree with me with the statement he needs no more sympathy.

    bennyandthejets: You got it dead on. Elaborate for him because everything I tell him goes in one ear and out the other.

    And for all those wondering: He speaks as well as he writes, and he knows its wrong.
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  12. #12
    Registered User Joe100's Avatar
    Join Date
    Jul 2003
    Posts
    63
    ya benny thats the code i needed thanks and stan you $$$$ing ass i told you on the bus to not post in here man ywhy the $$$$ u gotta be an ass all the time
    "Be Quick Or Be Dead"

    [img]
    http://www.danasoft.com/sig/GU.jpg
    [/img]

  13. #13
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    If you want to argue, do it in private. I'm not interested in seeing your pathetic bickering, nor is anyone else. Do not reply to this message, just get back to the thread subject.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  14. #14
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    Getting back on "topic"

    First of all, no disrespect to you Hammer, but I was not the one bickering. And yes, you can be sure he continued it in private .

    Joe, here's some code. (Assuming you have already initialized some variables)

    Code:
    cin >> direction;
    if (strcmpi(direction,"West")==0)
    {
    x--;
    cout << room[x].description;
    }
    else
    //continue code
    Set up a class Room, make an array of rooms, and have
    char description[100], one of it's members. This may be over your head for now, so try some easier examples. Hopefully someone else will kindly show you the code. Also I'm sorry if I sounded like a "donkey" to you . But someone had to set everyone straight.
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I need directions
    By JacobN in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2008, 07:22 AM
  2. Replies: 6
    Last Post: 08-28-2008, 08:10 PM
  3. C student doesn't understand directions
    By Boboki in forum C Programming
    Replies: 9
    Last Post: 02-17-2005, 05:05 PM
  4. Directions
    By whistlenm1 in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-06-2002, 01:03 PM