Creating a map/cordinate system for a text game

This is a discussion on Creating a map/cordinate system for a text game within the C++ Programming forums, part of the General Programming Boards category; I'm trying to come up with a coordinate/map system for a text game I'm working on that's easy to work ...

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    14

    Creating a map/cordinate system for a text game

    I'm trying to come up with a coordinate/map system for a text game I'm working on that's easy to work with and understand. Here's what I've come up with so far, but it seems overly complicated:

    there are different maps/floors in the game. As such, they will be of different sizes. One floor may be 20x20 sqaures, while another room is only 10x10. As such, there will need to be two variables; one that defines the floor's size and another one, an array, that defines what every single room inside that floor is. 1's would be rooms the player is allowed to move through. 0's would be walls. 2's would be stairs that lead up while 3's would be stairs that would move down. To keep things simple, I've decided all maps/floors will be perfectly square.

    Does this sound like a viable system, or am I making things overly complicated?
    Last edited by Nalif; 04-10-2007 at 02:54 PM.

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,249
    Quote Originally Posted by Nalif View Post
    Does this sound like a viable system, or am I making things overly complicated?
    Before asking that question, I'd suggest trying to imagine an equivalent system that is LESS complicated. I certainly can't.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    14
    That's what I was thinking.

    It'd be nice if Zork or some other reputable text adventure were made open source, but then I'm sure a lot of the programming used in those games were archaic.

  4. #4
    Registered User pronecracker's Avatar
    Join Date
    Oct 2006
    Location
    netherlands
    Posts
    158
    Text games are archaic.

  5. #5
    Registered User
    Join Date
    Nov 2004
    Location
    Pennsylvania
    Posts
    434
    They are, ha, but a simple struct, array, class, vector...etc. And the job would be done.

    Good lucK!
    "Anyone can aspire to greatness if they try hard enough."
    - Me

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    There are several open-source text based adventure games. I know of t-o-m-e.org (Tales of Middle Earth) and dungeoncrawl.org (crawl). Neither is very well written, but still. Wikipedia has others I'm sure.

    [edit] Once you get to be a more advanced programmer, roguelikedevelopment.org is great. [/edit]
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  7. #7
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,249
    Quote Originally Posted by pronecracker View Post
    Text games are archaic.
    Silly assertion. That's like saying "books are archaic." Those of us with functioning imaginations have no trouble enjoying a good book or a Zork-style game. I guess your literary choices are limited to illustrated books for 3 year olds?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Text based game
    By wipeout4wh in forum C Programming
    Replies: 12
    Last Post: 03-26-2009, 04:39 PM
  2. text based mmo type game.....
    By SONAR in forum Game Programming
    Replies: 0
    Last Post: 12-09-2008, 04:17 AM
  3. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 12:32 PM
  4. Text Based Game
    By drdroid in forum C++ Programming
    Replies: 2
    Last Post: 02-18-2002, 05:21 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 06:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21