Text Rpg
I''m planning on making a text rpg, strongly based on magic spells. I need some ideas. Should I feature different races and classes, and if so, which ones? Also, how should I do the (turn-based) combat system???
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
Hey, what are you doing it in?
If you care about her/him, you''''ll listen
If you love her/him, you''''ll heal his/her wounds
If you like her/him, you''''ll do all of the above, and help her/him in need
A person who cares is a person who never speaks
If you care about her/him, you''''ll listen
If you love her/him, you''''ll heal his/her wounds
If you like her/him, you''''ll do all of the above, and help her/him in need
A person who cares is a person who never speaks
Hmm....I attempted this once before! I did OK but it got to hard (for me) to code after a while so the project was basically scrapped. In my opinion, all RPG''s should have different races and classes. I once found a website that hosted a zip file containing a combat system code for a MUD. I got lost trying to figure out what was what.
If your going to code a text-based RPG, I suggest using C++. THe "If" statements are great. Let me know if you need any help and I''ll be glad to help you out!
Master Conjurer
If your going to code a text-based RPG, I suggest using C++. THe "If" statements are great. Let me know if you need any help and I''ll be glad to help you out!
Master Conjurer
quote: Original post by masterconjurer
Let me know if you need any help and I''ll be glad to help you out!
I ain''t on this project, but can you help on the "if" statements, because here''s my problem:
I want to have an yes/no type of thing, and here''s the code for choice:
if (yesno == 1 || yesno == 2 || yesno == 3 || yesno == 4) cout << "Ok, now your ready to go....aren''t you?\n"; cin >> "yesno";
now, after the cin >> "yesno";, I typed this:
if (yesno == no)
cout << "Just start this prog when your ready.";
else
{
cout << "Great let''s start!";
}, the only thing that works is the else statement. Does anyone know how to fix this?
If you care about her/him, you''''ll listen
If you love her/him, you''''ll heal his/her wounds
If you like her/him, you''''ll do all of the above, and help her/him in need
A person who cares is a person who never speaks
That... is ... the... worst code I HAVE _EVER_ seen. Sorry.
---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---
Three points:
1) Learn to use switch statements where appropriate (incidental to your code):
2) Learn to use the operators >, >=, <, <=, etc. It'll save you quite a lot of bother.
3) Your code doesn't work because you put quotes around "yesno" in your cin statement. It's a variable, so it doesn't want those quotes. Also, it is after the if statement. "if this variable holds these values, then get its value?" Use a different variable, because you seem to be comparing it as a string at one point and as an int at another point.
Sorry about being so snippy, but I've got to do work and it's put me in a bad mood. Grrrrrrrr!
EDIT: Andrew, I assume you code with your eyes shut? Yo mama's so fat, she stepped on a talking scale and it told her "Sorry, we don't do livestock."
Alimonster
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I will gladly change. I seek the truth, which never yet hurt anybody. It is only persistence in self-delusion and ignorance which does harm." -- Marcus Aurelius
[edited by - Alimonster on March 24, 2002 2:03:03 PM]
1) Learn to use switch statements where appropriate (incidental to your code):
switch (yourNumber){case 1: doSomething(); break;case 2: doAnotherThing(); break;// etc.}
2) Learn to use the operators >, >=, <, <=, etc. It'll save you quite a lot of bother.
if (yesno >= 1 && yesno <= 4)...
3) Your code doesn't work because you put quotes around "yesno" in your cin statement. It's a variable, so it doesn't want those quotes. Also, it is after the if statement. "if this variable holds these values, then get its value?" Use a different variable, because you seem to be comparing it as a string at one point and as an int at another point.
Sorry about being so snippy, but I've got to do work and it's put me in a bad mood. Grrrrrrrr!
EDIT: Andrew, I assume you code with your eyes shut? Yo mama's so fat, she stepped on a talking scale and it told her "Sorry, we don't do livestock."
Alimonster
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I will gladly change. I seek the truth, which never yet hurt anybody. It is only persistence in self-delusion and ignorance which does harm." -- Marcus Aurelius
[edited by - Alimonster on March 24, 2002 2:03:03 PM]
quote: Original post by Alimonster
Three points:
1) Learn to use switch statements where appropriate (incidental to your code):
switch (yourNumber){case 1: doSomething(); break;case 2: doAnotherThing(); break;// etc.} 2) Learn to use the operators >, >=, <, <=, etc. It'll save you quite a lot of bother. if (yesno >= 1 && yesno <= 4)...
3) Your code doesn't work because you put quotes around "yesno" in your cin statement. It's a variable, so it doesn't want those quotes. Also, it is after the if statement. "if this variable holds these values, then get its value?" Use a different variable, because you seem to be comparing it as a string at one point and as an int at another point.
1. I did start out with swtiches, but it wouldn't work, so I decided to go with "if" statements, and then I just realized that I did that little quote thing, so I'll fix that...and I'll do the <= and stuff, thanks.
If you care about her/him, you''ll listen
If you love her/him, you''ll heal his/her wounds
If you like her/him, you''ll do all of the above, and help her/him in need
A person who cares is a person who never speaks
[edited by - Quantrizi on March 24, 2002 1:41:26 PM]
Switch statements are useful if you want to get rid of many if statements of the form:
if (something == 1)
// blah
else
if (something == 2)
// blah
else
if (something...) // etc
...so it''s not what you need to do here, but is handy to know for the future. You want something akin to the following. User validation and making it good is left as an exercise.
Alimonster
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I will gladly change. I seek the truth, which never yet hurt anybody. It is only persistence in self-delusion and ignorance which does harm." -- Marcus Aurelius
if (something == 1)
// blah
else
if (something == 2)
// blah
else
if (something...) // etc
...so it''s not what you need to do here, but is handy to know for the future. You want something akin to the following. User validation and making it good is left as an exercise.
int choice;char blah[100];cout << "Enter your choice, punk: "; cin >> choice; if (choice >= 1 && choice <= 4){ cout << "All your base are belong to us?" << endl; cin >> blah; if (strcmp(blah, "yes") == 0) { // they said yes. }}
Alimonster
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I will gladly change. I seek the truth, which never yet hurt anybody. It is only persistence in self-delusion and ignorance which does harm." -- Marcus Aurelius
I''m wondering if I should do my game in Vb6, or C++6. I''m more experienced in VB. I don''t know how to make a GUI in C++. Also, if I used C++, would I do it for DOS or Windows? BTW, I want to make one text-box for output, and one for input, so my simple DOS C++ line-by-line knowledge would not be sufficient, and I don''t know how to program for Windows in C++. I could do it in Java, which I''m currently learning.
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
I''m wondering if I should do my game in Vb6, or C++6. I''m more experienced in VB. I don''t know how to make a GUI in C++. Also, if I used C++, would I do it for DOS or Windows? BTW, I want to make one text-box for output, and one for input, so my simple DOS C++ line-by-line knowledge would not be sufficient, and I don''t know how to program for Windows in C++. I could do it in Java, which I''m currently learning. Also, I need help with ideas for designing caracter classes, spells...
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement