# Creating a map/cordinate system for a text game

• 04-10-2007
Nalif
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?
• 04-10-2007
brewbuck
Quote:

Originally Posted by Nalif
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.
• 04-10-2007
Nalif
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.
• 04-11-2007
pronecracker
Text games are archaic.
• 04-11-2007
Junior89
They are, ha, but a simple struct, array, class, vector...etc. And the job would be done.

Good lucK!
• 04-11-2007
dwks
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.

 Once you get to be a more advanced programmer, roguelikedevelopment.org is great. [/edit]
• 04-11-2007
brewbuck
Quote:

Originally Posted by pronecracker
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?