Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Product Lifecycle
  3. Collaboration / Beta Testing
  4. Txt Based Rpg [modified]

Txt Based Rpg [modified]

Scheduled Pinned Locked Moved Collaboration / Beta Testing
questiongraphicsgame-devtutorialcareer
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    akosidandan
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • A akosidandan

      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

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      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!


      A 1 Reply Last reply
      0
      • L Luc Pattyn

        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!


        A Offline
        A Offline
        akosidandan
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups