Thread: Mapping Grid?

  1. #1
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331

    Mapping Grid?

    Hi, as some of you know i have been working on my first text based RPG, and its come to a spot that i have no clue on.

    I want to make it so you can't always go all 4 directions, but in some places only say south or west, etc.

    I want to draw a picture and make that the map, how would i go about this?

  2. #2
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    i have been working on my first text based RPG
    I want to draw a picture
    Think about those two statements carefully.

    But here is a thread that has information on tile map collision. The info may be specific to Allegro, but you can still apply the same basic concepts to a text-based tile map (which it seems is what you're going to want). For more info do a search here on the board, and you'll be able to find a ton of results...text-based RPG questions have been asked a trillion and one times.

  3. #3
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    i should have clarified, i want the directional stuff in the prog to base on the pic, say there is a wall in the pic, they can't go forward, they never actually see the pic.

    I'll do that, thank you

  4. #4
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    i should have clarified, i want the directional stuff in the prog to base on the pic, say there is a wall in the pic, they can't go forward, they never actually see the pic
    Ok, well then that thread will be perfect for you; I used the same basic concept in my explanation in it.

  5. #5
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Hey man thats a beautiful example, do u mind if i include your text in the tutorial i am making along with the game? Full credit is given where do, of course.

  6. #6
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Hey, you're welcome and thanks for the compliment....

    Well, I'd rather you didn't include the example, because I have intentions of putting all of my examples and tutorials on my site.

  7. #7
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    your the boss, thanks for the example tho, its helped me alot more then u may realize : )

  8. #8
    Registered User red_baron's Avatar
    Join Date
    May 2002
    Posts
    274
    hehe check out other ppls games too

    and btw techwins what happend to that rpg u where workign on a long long time ago? the one about different races, where u put a part of the storyline on the board...
    ¿Red Baron?

    "Imagination is more important than knowledge"
    -Albert Einstein (1879-1955)

    Check out my games!

    [code] /* dont forget code tags! */ [/code]

  9. #9
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    and btw techwins what happend to that rpg u where workign on a long long time ago? the one about different races, where u put a part of the storyline on the board...
    I put that on hold, but maybe I'll do it at a later time. I simply wouldn't have the time to do it with school and work at the sametime. For now I'm creating a stupid space shooter, except that it's going to be a little bit more complicated than most amatuer space shooters you see. No idea when it'll be done because I only have time to work on it about once or twice a week. Thanks for showing interest in the other game, though.

  10. #10
    Registered User red_baron's Avatar
    Join Date
    May 2002
    Posts
    274
    same predicament i'm in i only have time to program maybe once a week sometimes not at all ! but i put c programming on hold doing a lil java hehe its easier in a way but harder in another...
    ¿Red Baron?

    "Imagination is more important than knowledge"
    -Albert Einstein (1879-1955)

    Check out my games!

    [code] /* dont forget code tags! */ [/code]

  11. #11
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Yeah, Sunday was my first day I actually had any time at all to do programming in well over week. The only reason why I was able to do that was because I stayed up really late to get some stuff done. But hey it's all good.

  12. #12
    Registered User Kirdra's Avatar
    Join Date
    Aug 2002
    Posts
    105
    I know what you mean =p ; the map I included with that Haunted Mansion game was created in MS paint, It was created as a guide to make the game easier to play. It had no connectivity with the acuall code of program.

  13. #13
    Registered User Kirdra's Avatar
    Join Date
    Aug 2002
    Posts
    105
    I useful thing to think of when working with x and y variables. Is how to create complex worlds with different locations i.e a town could open up on a new set of axis. example:

    Code:
    int World_1_X, World_1_Y; 
    
    int Town_1_X, Town_1_Y;
    To enter a new town you would need a variable to check where the user was via setting the variable to the relavent number I use the name "User_Location". for example lets say Town_1 was at:

    World_1_X = 4 World_1_Y = 2

    Code:
    if(World_1_X = 4 && World_1_Y = 2 && User_Location == 1)
    {
    
         User_Location == 2; //Number assigned prior for the town
    
    }
    If your making games like this it's a good idea to provide maps for users to look at, also a display co-ordinates option.

    Anyhow, I hope this helps.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. More Windows Trouble
    By samGwilliam in forum Windows Programming
    Replies: 9
    Last Post: 04-12-2005, 10:02 AM
  2. Cleaning up a Grid of Memory
    By Epo in forum C++ Programming
    Replies: 9
    Last Post: 02-25-2005, 10:23 AM
  3. Find a word in a 2d grid
    By The_Kingpin in forum C++ Programming
    Replies: 2
    Last Post: 02-24-2005, 05:38 PM
  4. Constructive Feed Back (Java Program)
    By xddxogm3 in forum Tech Board
    Replies: 12
    Last Post: 10-10-2004, 03:41 AM
  5. I need help making a grid!
    By Unregistered in forum Windows Programming
    Replies: 2
    Last Post: 09-02-2002, 05:46 AM