-
text rpg
could everyone please post there rpg game on this post and the source so i could look at the source and try to learn from that
1. i wont edit the code at all
2. i wont post it anywere
3. i wont give it away or distribute it in any way
its just so i can look at them play them and learn from them thanx
(text rpg prefered)
thanx
-
I posted some code for a text-based adventure game a while ago on this thread:
http://www.cprogramming.com/cboard/s...&threadid=3613
and a very basic outline for setting up a text-based RPG here:
http://www.cprogramming.com/cboard/s...&threadid=1025
You're welcome to do whatever you want to either of these. I also have been working on a graphical RPG battle system, which I could send you the source code for if you are interested (and you post your e-mail here so I know where to send it.)
-
thanx
anymore code would be nice for those of u who have code that could give it to me
-
check my website
well ive written a small text-based rpg, which you may call crap, but it works, and its got some decent coding. however, i wouldnt suggest taking too much from it because its not exactly the best method of doing an rpg. anyways, enough said. theres the rpg that i finished and theres the current version for the expansion (for the first one) that im working on.
not sureif that made sense.
ah yes, the site addy...altho you could click on the www button, but this is easier, since the www button dosent take you right to the download page...i dont think
http://www.geocities.com/beornsos/twcdownload.html
when you get there, look under the heading "The Warrior Chronicles"-> latest version-> TWC Final (with source)
theres two versions of the final version, one with hte source code and one without. make sure you get the one with the source code.
the expansion has more efficient coding if you want to look at that
later
-
thanx agerealm its helped me
-
whats the easiest way to make and display a map in text mode and have a person move around on it using arays or what ever
thanx
-
well, i didnt figure out the easiest way until about october...lol. i did it the painful way in The Warrior Chronicles. the easiest way, that i know of, would be using two dimensional arrays, print out the array onto the screen and then when the user hits a key (up, down, left, right), it moves the character up or down or left or right on the array...hes a simple example...hope this helps:
int map[5][5]={0,0,0,0,0,
0,0,0,0,0, //two-dim array
0,0,0,0,0,
0,0,0,0,0,
0,0,0,0,0 };
int player=1; //symbol used for player on the map
int x=0,y=0; //the players coordinates. however, TAKE
//NOTE,that if you do use x and y, then remember
//that x will be rows, not columns and y will be
//columns not rows. its reveresed because...well
//because thats how 2-dim arrays are
for (int a=0;a<5;a++) {
cout << "\n"; //this is needed so that the map isnt printed on
//on one line. after each row it goes to next line
//so it comes out as a 5x5 square
for (int b=0;b<5;b++) {
cout << map[a][b]; //this prints the map out
}
}
///((((the following would be in another function...maybe a
///movment function)))
if (keyhit==UP) { x--; }
if (keyhit==DOWN) { x++; }
if (keyhit==LEFT) { y--; }
if (keyhit==RIGHT) { y++; }
//of course, UP, DOWN, LEFT, RIGHT can either be constants or
//whatever. it would probably be better to use CASE statements
//instead of if statements, but you can see the logic behind it (i
//hope).
//hope this helps you...let me know if youve got any questions.
later
-
right....well ok it didnt feel like putting my indention in the coding...how do you get it to do that? thanks.
later
-
its helped me but what do you mean by
indention
-
I think she meant Indentation. For example
code is indented. Understand?
edit...never mind it wont let me indent the it sorry. But if I remember right it automatically indents teh code :-/ Indentation isskipping some place ont the line. Like at the begining of paragraphs.
-
ok i get it now
one more thing what when you put
>>if (keyhit==RIGHT) { y++; }
do you need to use the word "keyhit"
or can it be anything
and do you need to set a variable for it
-
I have an example Text RPG designed for learning. Have a look here .
-
-
ok 2 more things...
1.
Code:
#include <iostream.h>
#include <stdlib.h> //the header files
#include <dos.h>
...
int playerpos[5][5];
void playermov(void)
{
switch playerpos[x][y]
case(keyhit == UP):
y++; //increase player pos when UP pressed
break;
case(keyhit == DOWN):
y--; //decrease player pos when down pressed
break;
case(keyhit == LEFT):
x--; //move the player left when left pressed
break;
case(keyhit == RIGHT):
x++; //move the player right when right pressed
break;
clrscr(); //clear the screen
map(); //go to the map
}
1. would this work for moving a person on the screen
2. how would you make it so yoiu press a button then it moves the player and then reprints the screen updated
-
Here's one
I made this a while ago here's the url:
http://www.geocities.com/sa_hand/rpg_vc6.zip
Email me with questions at
[email protected]