Original Post
I'm less-then-beginner in C++ at the moment and I'm working on my first official game: A Text Adventure.
I realized it should be simple enough to do, and I want to start with a basic one. Can I have 1 .cpp file for each room? Here's some example rooms:
|R1|R2|R3|
|R4|R5|R6|
|R7|R8|R9|
So l want it to make it so you start in the bottom room, it tells you what the room looks like, the name of the room, and gives you 3 choices.
Type in "N" for north "E" for east "W" for west.
So if you want to go north to the middle room, you type in "N" and hit enter.
Then you appear in the middle room, and the same thing happens.
However, I want to be able to have locked doors & keys.
So lets say there's a key in the top-right room, and you collect it if you walk into the room. Then there's door1 (you just collected key1) all around the middle room. Then if you try to walk in, it will act as if the door isn't there and you let you in. Otherwise it says you need the key.
Might be confusing, and I'm willing to take the time to write this, but I really want to make it happen.
Thanks in Advance.
Regards, King of the Boneheads.
I realized it should be simple enough to do, and I want to start with a basic one. Can I have 1 .cpp file for each room? Here's some example rooms:
|R1|R2|R3|
|R4|R5|R6|
|R7|R8|R9|
So l want it to make it so you start in the bottom room, it tells you what the room looks like, the name of the room, and gives you 3 choices.
Type in "N" for north "E" for east "W" for west.
So if you want to go north to the middle room, you type in "N" and hit enter.
Then you appear in the middle room, and the same thing happens.
However, I want to be able to have locked doors & keys.
So lets say there's a key in the top-right room, and you collect it if you walk into the room. Then there's door1 (you just collected key1) all around the middle room. Then if you try to walk in, it will act as if the door isn't there and you let you in. Otherwise it says you need the key.
Might be confusing, and I'm willing to take the time to write this, but I really want to make it happen.
Thanks in Advance.
Regards, King of the Boneheads.