Txt Based Rpg [modified]
-
Hello all I would like to ask how to make a simple graphics for this txt based rpg I create . I was planning to make some via dark gdk . So my question would be if anyone would like to tell some basic sprite in dark gdk below here is my game <pre> #include<iostream> #include<string> #include<ctime> #include<cstdlib> using namespace std; // player class /////////////////////// class player { int getDamage( ); string getName( ); string getJob( ); public: //player info string p_name; string p_job; //player items; int potion; int manaPotion; int powerPotion; //player status int p_lvl; int p_damage; int p_magicDamage; int p_powerDamage; int p_life; int p_mana; int p_power; int p_xp; int p_gold; int p_maxXp; int p_maxLife; int p_maxMana; int p_maxPower; //constructor of the class player ( ); }; //player contructor definition player :: player( ){ p_maxLife = 30; p_lvl = 1; p_maxXp = 2; p_xp = 0; p_gold = 10; p_name = getName ( ); p_job = getJob ( ); p_life = p_maxLife; p_damage = getDamage ( ); if ( p_job == "Warrior" ){ p_maxMana = 5; p_maxPower = 10; p_magicDamage = 5; p_powerDamage = 10; p_mana = p_maxMana; p_power = p_maxPower; }else if ( p_job == "Assasin" ){ p_maxMana = 7; p_maxPower = 7; p_magicDamage = 7; p_powerDamage = 7; p_mana = p_maxMana; p_power = p_maxPower; }else{ p_maxMana = 10; p_maxPower = 5; p_magicDamage = 10; p_powerDamage = 5; p_mana = p_maxMana; p_power = p_maxPower; } } //get the player name string player::getName( ) { system ( "cls" ); cout<<"\tJourney Txt Fighting Game\n\n" <<"What is your name : "; string name; cin>>name; system ( "pause" ); return name; } //get the player choosen job string player::getJob( ) { int choice; do{ system ( "cls" ); cout<<"\tJourney Txt Fighting Game\n\n" <<"What job do you want :\n" <<"[ 1 ] - Warrior\n" <<"[ 2 ] - Assasin\n" <<"[ 3 ] - Soolsa\n" <<"Choice : "; cin>>choice; } while ( choice < 1 || choice > 3 ); system ( "pause" ); if ( choice == 1 ){ return "Warrior"; }else if ( choice == 2 ){ return "Assasin"; }else{ return "Soolsa"; } } //get the playerDamage int player::getDamage( ) { sra
-
Hello all I would like to ask how to make a simple graphics for this txt based rpg I create . I was planning to make some via dark gdk . So my question would be if anyone would like to tell some basic sprite in dark gdk below here is my game <pre> #include<iostream> #include<string> #include<ctime> #include<cstdlib> using namespace std; // player class /////////////////////// class player { int getDamage( ); string getName( ); string getJob( ); public: //player info string p_name; string p_job; //player items; int potion; int manaPotion; int powerPotion; //player status int p_lvl; int p_damage; int p_magicDamage; int p_powerDamage; int p_life; int p_mana; int p_power; int p_xp; int p_gold; int p_maxXp; int p_maxLife; int p_maxMana; int p_maxPower; //constructor of the class player ( ); }; //player contructor definition player :: player( ){ p_maxLife = 30; p_lvl = 1; p_maxXp = 2; p_xp = 0; p_gold = 10; p_name = getName ( ); p_job = getJob ( ); p_life = p_maxLife; p_damage = getDamage ( ); if ( p_job == "Warrior" ){ p_maxMana = 5; p_maxPower = 10; p_magicDamage = 5; p_powerDamage = 10; p_mana = p_maxMana; p_power = p_maxPower; }else if ( p_job == "Assasin" ){ p_maxMana = 7; p_maxPower = 7; p_magicDamage = 7; p_powerDamage = 7; p_mana = p_maxMana; p_power = p_maxPower; }else{ p_maxMana = 10; p_maxPower = 5; p_magicDamage = 10; p_powerDamage = 5; p_mana = p_maxMana; p_power = p_maxPower; } } //get the player name string player::getName( ) { system ( "cls" ); cout<<"\tJourney Txt Fighting Game\n\n" <<"What is your name : "; string name; cin>>name; system ( "pause" ); return name; } //get the player choosen job string player::getJob( ) { int choice; do{ system ( "cls" ); cout<<"\tJourney Txt Fighting Game\n\n" <<"What job do you want :\n" <<"[ 1 ] - Warrior\n" <<"[ 2 ] - Assasin\n" <<"[ 3 ] - Soolsa\n" <<"Choice : "; cin>>choice; } while ( choice < 1 || choice > 3 ); system ( "pause" ); if ( choice == 1 ){ return "Warrior"; }else if ( choice == 2 ){ return "Assasin"; }else{ return "Soolsa"; } } //get the playerDamage int player::getDamage( ) { sra
Hi, I only have two comments: 1. You must have noticed your PRE tags did not work. That probably is because they got encoded, i.e. the < sign got replaced by < etc. Please fix this (edit again) if you hope to get any help. 2. You're in the wrong forum; yours is a programming question about graphics; I suggest you repost in the Graphics forum. If you fix both and I notice so, I'll delete this message, and then you'll be able to delete yours. :)
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
-
Hi, I only have two comments: 1. You must have noticed your PRE tags did not work. That probably is because they got encoded, i.e. the < sign got replaced by < etc. Please fix this (edit again) if you hope to get any help. 2. You're in the wrong forum; yours is a programming question about graphics; I suggest you repost in the Graphics forum. If you fix both and I notice so, I'll delete this message, and then you'll be able to delete yours. :)
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
I would like to apologize to all if my post was not that appropriate. I just really like to have some idea or comments that would make my txt based game better. I was now trying to create some graphic of that txt rpg using dark gdk kit. Again if my post was not appropriate kindly reply to this and I will delete it.