Advertisement

Text RPG

Started by April 27, 2002 08:26 PM
36 comments, last by gamechampionx 22 years, 5 months ago
quote: Original post by Andrew Nguyen
//Dont add .h or else Olusyi will have your head

I''ve got a better reason than that. How about "don''t add .h or else it won''t compile"?

[ C++ FAQ Lite | ACCU | Boost | Python | Agile Manifesto! ]
Didn''t see it metnioned so: instead of having a functino for CLS, just write systme("CLS") each time instead of having to call the function and do everything. Or at least have the return void and inline it.
Advertisement
quote: Original post by NoirRaven
As for the story, who cares what the story is, at this time the point of what you are doing is to learn how to program in C++ and make a game, and if I remember correctly both DOOM and Tetris had no stories (ok DOOM had "a portal to hell was opened and all your buddies were turned to zombies, here is a shotgun...have fun",) and no one complained to much, so don''t be hindered by a "lame" story or writers block. I do think it was a good idea to remove the "press a key to continue" parts, the player should never have to do something for no reason.


Tetris is about solving a puzzle. Doom is about shooting people. RPG''s are about exploring a world and a story. An RPG with a bad story isn''t worth playing -- and if the RPG is text-based, so that the narrative is the only interface between the user and the game, it becomes more important yet.

To SabreMan:

How about I''m using MinW32 which allows me to do so?
---START GEEK CODE BLOCK---GCS/M/S dpu s:+ a---- C++ UL(+) P(++) L+(+) E--- W++ N+ o K w(--) !O !M !V PS- PE+Y+ PGP+ t 5 X-- R tv+ b+ DI+ D G e* h! r-- !x ---END GEEK CODE BLOCK---
I''m having problems with a procedure, please help if you can.


  char CharacterResults(){	char yn;	do	{		Cls();		cout << "Name: " << player.name;		cout << "\nRace: " << player.race;		cout << "\nClass: " << player.characterclass;		cout << "\n\nStrength: " << player.strength;		cout << "\nDefence: " << player.defence;		cout << "\nMagic: " << player.magic;		cout << "\nAgility: " << player.agility;		cout << "\n\nMaximum Mana: " << player.maxmana;		cout << "\nMaximum HP: " << player.maxhp;		cout << "\n\nBattle Interval: " << player.battleinterval;		cout << "\n\nWould you like to keep these stats and continue?(y/n)";		cout << flush;		yn = getch();		if (yn != ''y'' && yn != ''Y'' && yn != ''n'' && yn != ''N'')		{			cout << "\n\nNot a valid choice.\n\n";			cout << "Press any key to continue...";			cout << flush;			getch();		}		else			break;	}	return yn;}  


It keeps saying that there''s an error at the return statement. How can I fix this?
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
You have to include a ''while'' part in your loop (the format is "do { something } while (some_condition);"

The ''while'' part lets the program know when to stop looping - "do this while you''ve not finished". One way to do this would be to add a bool variable before the loop. You could have this:

  bool bDone = false;do{  // what you had with cls, cout, etc  if (yn...)  {    //... etc  }  else    bDone = true;}while (bDone == false);  


It''s not the return that''s the problem here and it''s only being flagged by the compiler because it immediately follows the end of the loop.
Advertisement
i am intersested in making a text-based rpg, but i dont exactly know how to go about doing it. ive been reading your posts and replies about this text based rpg and now i understand how to start it, but after that, what? go to towns? i havent played much with MUDs or these text rpgs, but i love rpgs and i think i have a good storyline.

any advice in the length or structure of a text based game would be great.

thx



Mythril
Mythril
quote: Original post by Miserable
Original post by NoirRaven
As for the story, who cares what the story is, at this time the point of what you are doing is to learn how to program in C++ and make a game, and if I remember correctly both DOOM and Tetris had no stories (ok DOOM had "a portal to hell was opened and all your buddies were turned to zombies, here is a shotgun…have fun",) and no one complained to much, so don''t be hindered by a "lame" story or writers block. I do think it was a good idea to remove the "press a key to continue" parts, the player should never have to do something for no reason.


Tetris is about solving a puzzle. Doom is about shooting people. RPG''s are about exploring a world and a story. An RPG with a bad story isn''t worth playing – and if the RPG is text-based, so that the narrative is the only interface between the user and the game, it becomes more important yet.


I agree more with NoirRaven. gamechampionx is just learning to write c++ programs right now. It''s not like this game is gonna make him a millionare(no offense gamechampionx). He doesn''t need the greatest story in the world right now. That''s not his goal. He''s needs to learn first. Then he can start thinking about the story part.

oops. my bad. the paragraph with "Tetris is about solving a puzzle..." is a quote by Miserable. i messed up there.
This is kind of a stupid question but what is a text RPG? I know what an RPG is, but text? How could it be in text?

This topic is closed to new replies.

Advertisement