• Create Account

## Creating a text-based game,

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

29 replies to this topic

### #21unwantedminority  Members

Posted 29 June 2008 - 03:02 AM

Well basically... what I was looking for was somebody who I could contact to find out what languages I should and learn and help me if I ever got stuck at some point... I don't want to get other people to make the game for me... I'm genuinely interested in learning the languages so I can use them for other projects myself, without any help.

### #22Anexa85  Members

Posted 29 June 2008 - 04:20 AM

People need to stop being so paranoid, especially in the "For Beginners" section. If you want to answer the question, you should answer in the way that you find best and if you don't want to hold his hand, then don't. I think it's rude and uneccesary to respond so sarcastically.

If you think it's a dumb question, don't answer it and just point him to a place that can help. At least give people a chance before you decide their asking you to make their game for them.

I was interested in this thread because I have been working hard to learn C++ but am still not quite sure how to best implement a system for a text-based RPG. I was hoping for some answers as to methods or possibly a site that does show some good methods. I want to do the programming myself or I wouldn't be busting my tail to learn C++ but sometimes all you need is someone to give you an idea about how to think about the problem. Thankfully some people provided that for me and I believe that I can start programming my text-based RPG by myself.

Some people might want their hand held and I have seen that a lot on here but some people are working hard and come to the "For Beginners" section becuse they are new and don't know where to find the best resources yet.

### #23oler1s  Members

Posted 29 June 2008 - 08:43 AM

Quote:
 Anexa:If you think it's a dumb question, don't answer it and just point him to a place that can help. At least give people a chance before you decide their asking you to make their game for them.
I don’t think he had a dumb question. I think it’s a question that will not get any answer. You ask someone to personally contact you and spend time guiding you, you will either be ignored or be berated. Except for me, not a single person responded to OP’s query for personal help. I’m not being sarcastic or paranoid. I’m giving a response, so OP doesn’t keep repeating a query that will continue to be ignored, and will eventually get a sharper reprimand. It’s bad etiquette to come on a forum and ask for personal one-on-one help when it isn’t warranted. It isn’t here.

Quote:
 what I was looking for was somebody who I could contact to find out what languages I should and learn and help me if I ever got stuck at some point
If you’re looking for information on how to pick a programming language, you should go through this subforum’s post archive. Your “what programming language” query shows up literally about every other day. If you go through the posts from now until a long way back, you will get more information than you can ever read on picking a language. I’ll summarize very quickly: Python and C# get recommended the most. C and C++ have big fat “do not touch” stickers on them here. Everything else is talked about marginally when you ask a “what programming language” question. You’re told to investigate yourself, and if you can’t make up your mind, just go with something.

Also, please don’t mistake learning a programming language for learning how to program.

### #24Anexa85  Members

Posted 29 June 2008 - 09:21 AM

Once again , this is "For Beginners" and your second reply there was actually helpful for once.

Also, since I am a beginner, and do not have the time to take classes, learning the language is my first step into learning to program.

You are being negative for no reason and should probably not post in for beginners especially since you don't seem willing to actually acknowledge people who are trying.

### #25Chris27  Members

Posted 29 June 2008 - 10:10 AM

I've actually never written a text based game, but I was thinking of how one could be done and came up with this as a beggining to creating an invisible game board in my mind. It's not a game yet, but it has the basic structure for a game I think. I'm sure someone else could have done a lot better job.

#include <iostream>using std::cin;using std::cout;using std::endl;// Shows current player board positionvoid ShowPosition(int X, int Y);// Outputs message when you are at the end of the boardvoid EndOfBoard();int main(){	// end of board	const int lrMax = 4;	// beggining of board	const int lrMin = 1;	// top of board	const int udMax = 5;	// bottum of board	const int udMin = 1;	// board position	int boardPosition[2] = {1, 1};	// keyboard input choice	char getKey;		cout << "Welcome to Game Board Example!"		 << endl		 << " press n to quit"		 << endl;	do	{		cout << "Which direction would would you like to go?"			 << endl			 << "1 left, 2 right, 3 up, 4 down"			 << endl;		cin >> getKey;		switch(static_cast<int>(getKey))		{			case static_cast<int>('1'):				// if greater then beggining move left				if(boardPosition[0] > lrMin)				{					boardPosition[0] -= 1;					ShowPosition(boardPosition[0], boardPosition[1]);				}else EndOfBoard();				break;			case static_cast<int>('2'):				// if less then end move right				if(boardPosition[0] < lrMax)				{					boardPosition[0] += 1;					ShowPosition(boardPosition[0], boardPosition[1]);				}else EndOfBoard();				break;			case static_cast<int>('3'):				// if less then top move up				if(boardPosition[1] < udMax)				{					boardPosition[1] += 1;					ShowPosition(boardPosition[0], boardPosition[1]);				}else EndOfBoard();				break;			case static_cast<int>('4'):				// if greater then bottum move down				if(boardPosition[1] > udMin)				{					boardPosition[1] -= 1;					ShowPosition(boardPosition[0], boardPosition[1]);				}else EndOfBoard();				break;			case static_cast<int>('n'):				// end of game message				cout << "Goodbye" << endl;				break;			default:				// error for wrong input from keyboard				cout << "Please enter 1, 2, 3, or 4" << endl;		}		// if you are at this board position you are dead!  game over		if(boardPosition[0] == 1 && boardPosition[1] == 3)		{			cout << "Trap triggered! You are dead!" << endl;			getKey = static_cast<int>('n');		}	// exit the game game if n is pushed	}while(static_cast<int>(getKey) != static_cast<int>('n'));	//system("pause");	return 0;}void ShowPosition(int X, int Y){	cout << "Current board position = [" << X << "] [" << Y << "]" << endl;}void EndOfBoard(){	cout << "You are at the end of the board!" << endl;}

### #26wodinoneeye  Members

Posted 29 June 2008 - 02:08 PM

Maybe the OP is more interested in 'scripting' text games rather than programming the text game engine.

That could be answered with references to 'MUDs' and similar text engines (which still can require a reasonable amount of logic work depending on the desired game).

### #27DancinZerg  Members

Posted 30 June 2008 - 12:49 AM

I want to respond to your question in general, and by how it seems you worded your post, you don't understand a text based RPG, it is WAY more difficult than you are thinking it is, it takes a lot of time to actually make a decent text based RPG, make a hello world app, and start from there, sadly thats how you learn a programming language, by making a ton of simple programs to see how the mechanics work in a language. And if someone helped you make a text based RPG, how much fun would that be than to say that you made it yourself? Hit the books.

### #28Anexa85  Members

Posted 30 June 2008 - 02:34 AM

Based on his later responses I don't think he was asking someone to make the game for him. I think he was wondering what goes into it, which you guys have pretty well answered now. I think a lot of us beginners think that a text-based game must be an easy start at first because you don't have to deal with graphics.

What we don't realize is that it is only easy relatively and not absolutely. The more I've been programming (all the little things like DancinZerg was talking about), the more I realize how hard it would be. I think Dancin is right about not really going anywhere until you really learn the mechanics of the language and even then it will be difficult for the average person. Well, time for me to hit the books again!

### #29GTEgares  Members

Posted 05 February 2013 - 12:00 PM

I know a little of c++ and I have created a real text base game with real decisions, food supply levels, and even money. Its very easy. I learned everything I know from the newboston. Just search him on youtube and go to his c++ tutorial. He has over 5 hour of tutorial there. And I havnt even watched the whole thing, and I can create a simple text base game. he doesnt teach explicitly programing, but a good programer can apply what he learns.

~GTE

### #30Benderwiz  Members

Posted 06 February 2013 - 06:51 PM

Oler1s is correct. I don't beleave anyone really has time to.

I suggest the book "beginning C++ through Game Programming, Third Edition". It teaches you C++ through text based programming for video games. From rolling a dice, characters health and how to create bosses. Its is all displayed CMD Prop window and will give you a good boost after reading the book. If you can learn HTML in half an hour then you should be able to get the hang of this book with-in a week or 2.

You will need to get microsoft visual express c++ 2010.

Im still a beginner but my research points to that book.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.