ForumsProgramming ForumText based adventure?

7 7617
jacksonghuntington
offline
jacksonghuntington
347 posts
Nomad

Hey, ive been playing some real old fashioned games called text based adventures. If you dont know what they are, heres a link to a lot. http://en.wikipedia.org/wiki/List_of_text-based_computer_games I know u can do it in notebook like with the word echo and stuff but what programs do u need and how is it done? thanks.

  • 7 Replies
Darkroot
offline
Darkroot
2,763 posts
Peasant

You don't need any program to make a game like that you could just download python and just strictly make it like that. If you want to upload it to the net you would want to use Flash/Java/HTML(static),HTML5 (dynamic using canvas for fancy stuff) or whatever else you know how to use.

Each language uses echo different and some don't use it at all. You mostly use echo as output while testing not for a dynamic text area.

For flash and as3 you would create a dynamic textbox and either clear the text for new text or use appendText() method to add to the text area.

WhiskeyedJack
offline
WhiskeyedJack
80 posts
Shepherd

I always love building the word parser for text based adventures. My final project for my very first programming class was a text-based Monty Python adventure.

ExplosionsHurt
offline
ExplosionsHurt
249 posts
Nomad

For a text-based adventure, I would recommend using Javascript. All you need is a text editor like Notepad, but Notepad ++ will help a lot.

You should be able to use alert() and prompt() to create something, however, it doesn't look professional.

This is a good example of what is possible using Javascript.

ooier
offline
ooier
28 posts
Shepherd

i think the simplest way to make a text-based adventure game is to learn java or python or c++. the commandprompt shows your text.
in c++ is cout << the output and cin >> the input.

example:

#include <iostream>;

int main(){

String name;
cout << "What\\'s your name?" << endl;
cin >> name;
cout << endl << "Welcome" << name;
return 0;
}

2timothy316
offline
2timothy316
109 posts
Nomad

If I were to be doing a text based game, I would either use C++ or Javascript. Use the "cout" or &quotrompt" commands (respectively) to give output. For the look of the thing, I guess Javascript would be better, but if you're thinking about making it complicated, I would use C++.

Darkroot
offline
Darkroot
2,763 posts
Peasant

C++ is definitely not the best choice for something as simple as a textbased game, unless it's the only language you know well. All you need is an understanding of input, printing strings dynamically, randomization and conditional structures.

master565
offline
master565
4,107 posts
Nomad

C++ is definitely not the best choice for something as simple as a textbased game


It's true, I just learnt it today and i can already create one.
Showing 1-7 of 7