• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Tome Steve Srsan

Members
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

146 Neutral

About Tome Steve Srsan

  • Rank
    Member
  1. Ive only a beginner myself but i have to say, Thank you for doing this as i'm doing C++ in my spare time and I am loving this :) thank you very much for doing this journal, i will be following along with it all the way though, just keep up the good work :)
  2. sorry but thats what my problem so i named it as such but thank you anyway [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] yea i'm still new to c++ obviously so thanks for all the help so fair [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
  3. i only have one problem and i have one problem why its not working, and i can't figure out what is wrong [CODE] #include <iostream> #include <string> using namespace std; int main() { cout << "Hello everyone and welcome to this game.\n"; cout << "In this game the aim is to attack the wolf with what you think is the best attack, goodluck!\n"; int healthme=500; int healthit=500; while(healthme>0 && healthit>0 ) { cout << "Your Health is " << healthme << " and the wolfs health is " << healthit << "\n"; cout << "So, what attack do you want to hit the wolf with a weapon or with magic?"; string attack; cin >> attack; if (attack.find("weapon") != std::string::npos) { cout << "What part of the wolf do you want to attack, the body or the head?\n"; string bodypart; cin >> bodypart; if(bodypart.find("body") != std::string::npos) { healthit-= getdamage(50, 10); cout << "You hit the wolf!\n"; } else if(bodypart.find("head") != std::string::npos) { healthit -= getdamage(100, 20); healthme -= getdamage(20, 5); cout << "It was a good hit, but it bites back!\n"; } else cout << "you missed! (spelt it wrong) \n"; } else if (attack.find("magic") != std::string::npos){ cout << "what element would you like to attack with? fire lightning, ice, water, or earth?\n"; string magic; cin >> magic; if(magic == "fire"){ healthit-= getdamage(50, 10); cout << "It does good damage!\n"; } else if(magic == "lightning"){ healthit-= getdamage(100, 10); cout << "It does amazing damage!\n"; } else if(magic == "earth"){ healthit-= getdamage(70, 10); cout << "It hits hard!\n"; } else if(magic=="ice") { healthit -= getdamage(30, 5); cout << "It doesn't seem to hurt much!\n"; } else if(magic=="water") { healthit -= getdamage(10, 2); cout << "It seems unaffected!\n"; } else cout << "You missed! (spelt it wrong!)\n"; } else cout << "you took to long! (spelt wrong!)"; if(healthit>=0){ if(healthit<=100){ cout << "He is Angry now and doing more damage!\n"; healthme -= getdamage(75, 10); } else { cout << "The wolf goes out to attack!\n"; healthme-= getdamage(50, 10); } } } if(healthme<=0) cout << "Your Dead... Game over i guess?"; else cout << "The wolf is dead! You Win!"; return 0; } // Returns a random value within DamageRange of Damagebase int getdamage(int damagebase, int damagerange) { // if DamageBase is 50, and DamageRange is 10, DamageBase will be 40 here int damagedealt = damagebase - damagerange; // if DamageRange is 10, then this will add anywhere from 0 to 20 damage* damagedealt += (rand() % (damagerange*2)); return damagedealt; } [/CODE] when compiling the program the error 'getdamage' identifier not found i can't figure out whats wrong its probably something stupid but still thanks for any help anyway [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  4. Beer Nuts and arkane7 thank you the the tips and hints that i can use, i will be adding most of those things into my game little by little [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] but once again thank you for the idea [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  5. that's the type of comments that i want [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] thank you
  6. Hello Everyone i am just wondering if i can get some tips on how i could improve on my code that i have done, i know that some parts could be redone but i just want to know what parts i could make better [CODE] #include <iostream> #include <string> using namespace std; int main() { cout << "Hello everyone and welcome to this game.\n"; cout << "In this game the aim is to attack the wolf with what you think is the best attack, goodluck!\n"; int healthme=500; int healthit; for(healthit=500 ;healthme>0 && healthit>0; ) { cout << "Your Health is " << healthme << " and the wolfs health is " << healthit << "\n"; cout << "So, what attack do you want to hit the wolf with a weapon or with magic?"; string attack; cin >> attack; if (attack.find("weapon") != std::string::npos) { cout << "What part of the wolf do you want to attack, the body or the head?\n"; string bodypart; cin >> bodypart; if(bodypart.find("body") != std::string::npos) { healthit=healthit-50; cout << "You hit the wolf!\n"; } else if(bodypart.find("head") != std::string::npos) { healthit = healthit-100; healthme=healthme-20; cout << "It was a good hit, but it bites back!\n"; } else cout << "you missed! (spelt it wrong) \n"; } else if (attack.find("magic") != std::string::npos){ cout << "what element would you like to attack with? fire lightning, ice, water, or earth?\n"; string magic; cin >> magic; if(magic == "fire"){ healthit=healthit-50; cout << "It does good damage!\n"; } else if(magic == "lightning"){ healthit=healthit-100; cout << "It does amazing damage!\n"; } else if(magic == "earth"){ healthit= healthit-70; cout << "It hits hard!\n"; } else if(magic=="ice") { healthit = healthit-30; cout << "It doesn't seem to hurt much!\n"; } else if(magic=="water") { healthit = healthit - 10; cout << "It seems unaffected!\n"; } else cout << "You missed! (spelt it wrong!)\n"; } else cout << "you took to long! (spelt wrong!)"; if(healthit>=0){ if(healthit<=100){ cout << "He is Angry now and doing more damage!\n"; healthme = healthme-75; } else { cout << "The wolf goes out to attack!\n"; healthme= healthme-50; } } } if(healthme<=0) cout << "Your Dead... Game over i guess?"; else cout << "The wolf is dead! You Win!"; return 0; } [/CODE] if you can bother please take the time and tell me what i could make better [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] thank you
  7. Finally finished first text based game! its not really good but still cheering :D
  8. Actually don't worry i figured it out i got the game to work [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] i'm cheering, thanks for everyone's input and help [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  9. [quote name='Codarki' timestamp='1340969899' post='4953927'] Just now looked your code. Can you describe what this line is trying to do? [code] for(healthme=500;healthme<0; ); (healthit=500; healthit<0; ) { [/code] [/quote] i know i got that wrong quite badly but all i'm trying to do there is set a for that looks at both of those conditions before going through with the loop.
  10. Hello everyone i was just wondering what i'm doing wrong with my code, as when i try to compile it comes up with what i describe as code dump, there are a few other problems but once i get the code dump out the way i should be able to fix everything else [CODE] #include <iostream> #include <string> using namespace std; int main() { cout << "Hello everyone and welcome to this game.\n"; cout << "In this game the aim is to attack the wolf with what you think is the best attack, goodluck!\n"; int healthme; int healthit; for(healthme=500;healthme<0; ); (healthit=500; healthit<0; ) { cout << "Your Health is " << healthme << " and the wolfs health is " << healthit << "\n"; cout << "So, what attack do you want to hit the wolf with a weapon or with magic?"; string attack; cin >> attack; if(attack=="a weapon" , "weapon" , "the weapon") { cout << "What part of the wolf do you want to attack, the body or the head?"; string bodypart; cin >> bodypart; if(bodypart == "the body" , "body") { healthit=healthit-50; cout << "You hit the wolf!\n"; } else if(bodypart == "the head" , "head") { healthit = healthit-100; healthme=healthme-20; cout << "It was a good hit, but it bites back!\n"; } else cout << "you missed! (spelt it wrong) \n"; } else if(attack =="magic" , "with magic"){ cout << "what element would you like to attack with? fire lightning, ice, water, or earth?\n"; string magic; cin << magic; if(magic == "fire"){ healthit=healthit-50; cout << "It does good damage!\n"; } else if(magic == "lightning"){ healthit=healthit-100; cout << "It does amazing damage!\n"; } else if(magic == "earth"){ healthit= healthit-70; cout << "It hits hard!\n"; } else if(magic=="ice") { healthit = healthit-30; cout << "It doesn't seem to hurt much!\n"; } else if(magic=="water") { healthit = healthit - 10; cout << "It seems unaffected!\n"; } else cout << "You missed! (spelt it wrong!)\n"; } else cout << "you took to long! (spelt wrong!)"; if(healthit<=100){ cout << "He is Angry now and doing more damage!\n"; healthme = healthme-75; } else { cout << "The wolf goes out to attack!\n"; healthme= healthme-50; } } if(healthme<=0) cout << "Your Dead... Game over i guess?"; else cout << "The wolf is dead! You Win!"; return 0; } [/CODE] Sorry about the neatness but would be appreciated if someone could tell me what i'm doing wrong, thank you in advance [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  11. thanks for the info, like i said i'm not good at programming, not at all yet, but i'm still learning, what my problem was is that when i try to run the program it wouldn't read my input for picking a weapon then after everytime i try to attack it wouldn't say the same thing over and over again depending on how many letters i used, but ill try to fix that now, thank you
  12. fair enough here you go [CODE] // RPG style console game #include <iostream> using namespace std; char e; char c; char item; int healthme; int healthit; int wolf; char attack; char tsw = tsw; char ta = ta; char ts = ts; char itemd; int count = 0; char s = s; char m = m; char magic = magic; char weapon = weapon; int main() { cout << "Now ventur..... no not yet you need experience in the field of battle.\n" "pick up ur weapon because here comes a wolf, what weapons?\n the ones on the ground of course!\n" "quickly now! pick one up! a sword, a axe or the staff? (reply with ts for sword ta for axe and ts for staff)\n"; cin >> item; if(item == tsw) { itemd=75; } else if(item == ta) {itemd = 100; } else if(item == ts) { itemd = 50; } else { itemd == 25; cout << "no weapon??? okay then.\n"; } cout << "now battle!\n\n" ; healthit = 500; while(healthit>150) { cout << "the wolf has " << healthit << " health!"; cout << "now choose a class out of swordsmen (s) or mage (m): "; cin >> c; if(c==s) { healthme = 200; cout << "what do u want to attack with? magic or weapon?"; cin >> attack; if(attack == magic){ cout << "what magic would u like to use, fire, ice or wind? "; cin >> e; switch (e) { case 'wind': cout << "it does weak damage! NOT VERY EFFECTIVE!"; healthit = healthit-25; if(item = ts) healthit = healthit-10; break; case'ice': cout << "it does good damage!"; healthit = healthit-50; if(item = ts) healthit = healthit-10; break; case 'fire': cout << "It looks like it hurts!"; healthit = healthit-75; if(item = ts) healthit = healthit-10; break; } } else if(attack == weapon) { cout << "Where do u want to slash the wolf? the head? or the body? (reply with 'the *****' "; cin >> wolf; switch (wolf){ case 'head': cout << "hits hard but it scratches back! "; healthit = healthit-itemd; healthme = healthme-10; break; case 'body': cout << "the hit makes contact!"; healthit = healthit-(itemd-25); break; } } cout << "health of wolf is now" << healthit << "\n"; cout << "The wolf goes in for a attack! and bites u!"; count++; healthme = healthme - (10*count); cout << "You only have " << healthme << " left!"; cout << "This attack looks like it will hurt more next time!"; } else if(c==m) { healthme = 150; cout << "what do u want to attack with? magic or weapon?"; cin >> attack; if(attack == magic){ cout << "what magic would u like to use, fire, ice or wind? "; cin >> e; switch (e){ case 'wind': cout << "it does weak damage! NOT VERY EFFECTIVE!"; healthit = healthit-35; if(item = ts) healthit = healthit-15; break; case 'ice': cout << "it does good damage!"; healthit = healthit-60; if(item = ts) healthit = healthit-15; break; case 'fire': cout << "It looks like it hurts!"; healthit = healthit-85; if(item = ts) healthit = healthit-15; break; default: cout << "The attack failed! Wrong enchantment (U SPELT IT WRONG DUMBASS!)"; break; } } cout << "health of wolf is now " << healthit << "\n"; if(attack == weapon) { cout << "Where do u want to slash the wolf? the head? or the body? (reply with 'the *****' "; cin >> wolf; switch (wolf){ case 'head': cout << "hits hard but it scratches back! "; healthit = healthit-itemd; healthme = healthme-10; break; case 'body': cout << "the hit makes contact!"; healthit = healthit-(itemd-25); break; default: cout << "MISSED!"; } } cout << "health of wolf is now" << healthit << "\n"; cout << "The wolf goes in for a attack! and bites u!"; count++; healthme = healthme - (10*count); cout << "You only have " << healthme << " left!"; cout << "This attack looks like it will hurt more next time!"; } } cout << "now the wolf looks angry! nows the time to tell you about your special attack!"; if(c == s){ cout << "Imbue your sword with energy of the elements fire, ice or wind. Which do you choose?"; cin >> e; switch (e) { case 'wind': cout << " As the skys above grow dark" << item << "glows brightly, creating a wind that grows stronger with every passing second. \n"; cout << " Then all of a sudden a gust of wind comes and knocks the wolf into the air, as the wind lifts you off the ground above the wolf\n"; cout << " you swing your sword and come crashing back down to earth the the force of a tornado behind ur sword."; healthit = 0; break; case 'ice': cout << " As the air around chills << item << glows brightly, freezing the land around you as" << item << " is filled with the power of 100 ice ages.\n\n" << item << "strikes the wolf and shatters it into a 1000 pieces with a single blow."; healthit = 0; break; case 'fire': cout << " As the sun scorches the land " << item << " glows brightly as fire ignites around you, the heat is drawn towards " << item << "\n"; cout << " as it has the power of the sun. This power is power is then used! The wolf is burnt to a crisp from one slash, and it was hard to see\n"; cout << "if the sword even made contact!"; healthit = 0; break; default : cout << " Oh no the injury's from the fight has made u stagger! (your a horrible speller!)"; } } else if(c == m); { cout << "Imbue your body with the element of fire, ice or wind. Which do you choose?"; cin >> e; switch (e) { case 'wind': cout << "As the skys above grow dark your body fills up with the power of storms, the power flowing through your veins is power enough to create\n"; cout << " tornado's as u use that power to throw the wolf around and into the ground crushing it with the power of ten whirlwinds."; healthit = 0; break; case 'ice' : cout << "As the air chills around you the ground starts to freeze around you, as you concentrate the cold air into the palms of ur hand"; cout << "the cold air is forced towards the wolf as it freezes everything in its path, including the wolf!.\n"; cout << "you walk up to the wolf and with " << item << " shatter the wolf with one swing"; healthit = 0; break; case 'fire': cout << " As the sun scorches the land you start heating up as all the heat from the sun goes into you. its starting to become unbareable\n"; cout << " until you turn all that heat into the power to bellow fire, burning the wolf to crisps as you run out of the fire the wolf is nothing but ash"; healthit = 0; break; default : cout << "oh no!"; if(healthit>0) { cout << "The Wolf is charging! it reaches you and you can't defend yourself from using all your energy from the last attack!\n"; cout << " This looks like the end of you.... already "; } else cout << "Congratulations! you have defeated the wolf! Now for the game to begin!.... maybe later"; } } return 0; } [/CODE] i know its a mess but i'm not that good so sorry [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]
  13. Hello I just need some help with getting the switch to read characters instead of numbers, how would i be able to do that because so far when the program compiles the program can't read what i write
  14. Thank you [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] yeah i'm not very good yet [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] hoping to get better soon at least [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  15. Hello everyone, i'm have to say i'm very, very bad at programming so far but i'm trying to learn, so far i have been trying to make some text based games (no graphics) and so far i haven't gotten anything to work yet i know the solution is easy but still can someone help me? and yes i could improve it but still [img]http://public.gamedev.net//public/style_emoticons/default/dry.png[/img] just in advance thank you [CODE] #include <iostream> using namespace std; class monster { // These are private int health; // health of monster int damagedelt; // damage of general monsters int speed; // speed of general monsters int defence; // defence of general monsters public: monster(int h, int dd, int s, int d) { health = h; damagedelt = dd; speed = s; defence = d; } // accessor functions. int get_health() { return health; } int get_damagedelt() { return damagedelt; } int get_speed() { return speed; } int get_defence() { return defence; } }; class wolf:public monster { int speedplus; // wolf has increased speed public: // construct for wolf wolf(int h, int dd, int s, int d, int sp) : monster(h, dd, s, d) { speedplus = sp; } int truespeed() { return get_speed() + speedplus; } //accessor function for speed int get_speedplus() { return speedplus; } }; class jelly:public monster { int defenceplus; // extra defence public: // construct for jelly jelly(int h, int dd, int s, int d, int dp) : monster(h, dd, s, d) { defenceplus = dp; } int truedefence() { return get_defence() + defenceplus; } // accessor function for defence int get_defenceplus() { return defenceplus; } }; class dragon:public monster { int damagedeltplus; public: dragon(int h, int dd, int s, int d, int ddp) : monster(h, dd, s, d) { damagedeltplus=ddp; } int truedamage() { return get_damagedelt() + damagedeltplus; } int get_damagedeltplus() { return damagedeltplus; } }; class me { // These are private int health; // health of me int damagedelt; // damage of me int spelldelt; // damage of spells int speed; int defence; public: me(int h, int dd, int sd, int s, int d) { health = h; damagedelt = dd; spelldelt = sd; speed = s; defence = d; } //accessor function int get_health() { return health; } int get_damagedelt() { return damagedelt; } int get_spelldelt() { return spelldelt; } int get_speed() { return speed; } int get_defence() { return defence; } }; // class declareation for rouge class rouge:public me { int speedplus; public: rouge(int h, int dd, int sd, int s, int d, int sp) : me(h, dd, sd, s , d) { speedplus = sp; } int truespeed() { return get_speed() + speedplus; } int get_speedplus() { return speedplus; } }; //class declareation for paladin class paladin:public me { int damageplus; public: paladin(int h, int dd, int sd, int s, int d, int dp) : me(h, dd, sd, s, d) { damageplus = dp; } int truedamage() { return get_damagedelt() + damageplus; } int get_damageplus() { return damageplus; } }; // class declareation for mage class mage:public me { int spellplus; public: mage(int h, int dd, int sd, int s, int d, int sp) : me(h, dd, sd, s, d) { spellplus = sp; } int truespell() { return get_spelldelt() + spellplus; } int get_spellplus() { return spellplus; } }; int main() { int c; rouge(200, 40, 25, 50, 50, 50); mage(150, 30, 50, 50, 50, 30); paladin(300, 50, 25, 50, 50, 30); cout << "which class do you want to choose? rouge mage or paladin? 1, 2, 3: "; do { cin >> c; switch (c) { case '1': cout << "you are the dark rouge who sneaks around at night stalking his pray\n"; break; case '2': cout << "you are the powerful mage who has the power to decimate all\n"; break; case '3': cout << "you are the proud paladin who will stop at nothing to take down his enemy with brute force\n"; break; default: cout << "Please pick your selection out of 1 (rouge) 2 (mage) 3 (paladin)?\n"; } } while (c<0, c>4); cout << " you are now ready for your big adventure, have fun"; return 0; } [/CODE] I don't know why but for some reason when i try and run this program it doesn't pick up the number you have put in, however if you do one of the right numbers it skips the part its suppose to say and goes straight to the end, any help?