Forums

ForumsProgramming Forum

Text based adventure?

Posted Jun 17, '11 at 8:16pm

jacksonghuntington

jacksonghuntington

353 posts

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.

 

Posted Jun 18, '11 at 12:23am

Darkroot

Darkroot

2,879 posts

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.

 

Posted Jun 18, '11 at 7:08am

WhiskeyedJack

WhiskeyedJack

85 posts

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.

 

Posted Jun 25, '11 at 7:25am

ExplosionsHurt

ExplosionsHurt

262 posts

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.

 

Posted Jul 22, '11 at 7:40am

ooier

ooier

30 posts

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;
}

 

Posted Aug 8, '11 at 12:00pm

2timothy316

2timothy316

109 posts

If I were to be doing a text based game, I would either use C++ or Javascript. Use the "cout" or "prompt" 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++.

 

Posted Aug 8, '11 at 12:55pm

Darkroot

Darkroot

2,879 posts

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.

 

Posted Aug 8, '11 at 5:57pm

master565

master565

4,288 posts

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.
 
Reply to Text based adventure?

You must be logged in to post a reply!