Hello, I just finished my text-based RPG called Helsmich, however I need a few testers to find bugs/errors and tell me. There are quite a few variables that can be changed in the games such as your name, money, armor, weapon, kills, deaths, strength, speed, defense, accuracy, health, attributes, level, alignment, etc. so I don't really feel like testing it a bunch of times.

So even if you could run through it one time, that would be great. As well, a review would be nice and comments on ways to improve.

*The game is a little over 1,000 lines so I uploaded it to a .cpp file, so you can skip the copy+paste annoyance*

P.S. I know the orderly of the code is a bit bad. (I did use arrays and functions) So please don't tell me it is bad. Constructive criticism please!

Edit: I am horrible at spelling, and I KNOW that, so please don't tell me I suck at spelling. :) However, please point out the mistakes.

Also, if you don't feel like looking through my code, here are the cheat codes for the game: (Please don't use these until AFTER you test out the game, or it will ruin it for you. :()
----------------------------
GiveMeExcaliberPlease
~ Gives you the highest weapon: Excaliber

GiveMeBerzerkerArmorPlease
~ Gives you the Highest Armor: Berzerker Armor

MOOONEY
~ Gives you 9999999 money

MusclesRule
~ Gives you 999 strength

ArmoredLikeAnAnt
~ Gives you 999 defense

RunningShoes
~ Gives you 999 speed

EagleEye
~ Gives you 999 Accuracy

HealthNut
~ Gives you 9999 Health

LetMeGuess
~ Gives you 999 Training Points

HealMe
~ Gives you 999 Health Points

ILikeAttributes
~ Gives you 999 attributes

MedicMan
~ Gives you 999 of EVERY potion

EvilBoss
~ Sends you straight to the Evil Boss

GoodBoss
~ Sends you straight to the Good Boss

IDontFeelLikeActuallyPlaying
~ Gives you insanely high stats on everything

MakeMeEvilNow
~ Gives you -20 alignment

MakeMeGoodNow
~ Gives you +20 alignment
-------------------

Ancient Dragon commented: very nice game :) +25

Very nice game -- enjoyed playing it. I have two problems

  1. On the menu "What would you like to do?", it has 8 menu items. Your program needs to validate that I enter a number 1 to 8.
  2. There is no way to quit the game, except possibly finish the game. Enter q (for quit) and the program goes into an infinite loop.

Very nice game -- enjoyed playing it. I have two problems

  1. On the menu "What would you like to do?", it has 8 menu items. Your program needs to validate that I enter a number 1 to 8.
  2. There is no way to quit the game, except possibly finish the game. Enter q (for quit) and the program goes into an infinite loop.

Ah, I forgot to test out to make sure the user enters a correct input! Thanks for the reminder.

As far as quitting the game is concerned, I figured hitting the 'x' button at the top right would be a good solution. :P
Anyway, how would I make it so if they entered in a 'q' it would automatically quit? I have quite a few loops and stuff, and I am not sure how I would do that unless I went through every single loop and changed it to if(this||q)! O.O

Edit: Sorry, I am kind of new to C++, and I do not know how to stop the infinite loop thing id the user enters a letter. Can you please help me.

Also, was the game too easy or too hard? Or just right?

Infinite loop: after getting integer input you have to flush the input stream of the <Enter> key '\n'. Read this thread

int n;
cin >> n;
// flush input
cin.ignore(1000,'\n');

>>I figured hitting the 'x' button at the top right would be a good solution.
Well, that's a terrible solution. So is pressing Ctrl+C. Get the menu selection as a char instead of int so that it will accept 'q'.

char response[2];
cin >> response;
if( response[0] == 'q')
    return;
switch( response[0] )
{
   case '1': // blabla
}

>>Also, was the game too easy or too hard? Or just right?
It was just about right for me:) But I like easy games. Teen-agers who like to play elaborate games like World of Warcraft wouldn't like your game. But you are just starting out, so don't worry about that. Your games will become more difficult as you gain experience writing them.

commented: Very helpful +1

Thank you. I think I am going to up the stats of the monsters just a little bit, as well I need to fix my text paragraphs, as their format is horrid as of right now.

I will definitely apply what you said to my code tomorrow, as I am too tired right now.

Edit: Actually, I made the changes just now, and I added a few things. Since I can't edit my main thread for some reason, I uploaded the new code bellow:

Great Game, I liked the save and load options.

Only a few problems I saw :P
You spelled 'by' as 'bye', like the man walked "bye" the person.

commented: Thanks for the compliment +1

Great Game, I liked the save and load options.

Only a few problems I saw :P
You spelled 'by' as 'bye', like the man walked "bye" the person.

Alright, thanks for the input Kole. I will be sure to try and correct it along with other spelling errors.

gamex.cpp(31) : error C2065: 'GetConsoleWindow' : undeclared identifier
gamex.cpp(31) : error C2440: 'initializing' : cannot convert from 'int' to 'struct HWND__ *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
gamex.cpp(185) : error C2374: 'x' : redefinition; multiple initialization
gamex.cpp(178) : see declaration of 'x'
gamex.cpp(320) : warning C4508: 'main' : function should return a value; 'void' return type assumed
gamex.cpp(516) : error C2374: 'x' : redefinition; multiple initialization
gamex.cpp(511) : see declaration of 'x'
gamex.cpp(832) : error C2374: 'x' : redefinition; multiple initialization
gamex.cpp(829) : see declaration of 'x'

If I remember I'll try again at home on a different machine, different compiler, etc.

If I remember I'll try again at home on a different machine, different compiler, etc.

That's odd, I thought it would work for mostly all of the compilers. What compiler are you using, Dev?

Actually, I think I found the problem. Look at the top of the code, and you should see this:

HWND hWnd = GetConsoleWindow();
	ShowWindow(hWnd,SW_MAXIMIZE);

Just delete it, and I think the program will work just fine. (At least it does in Dev++)

Like a charm.

I tried in VS 6.0 as well as several other version of VS, the included command line compiler, some other compiler we have at work, etc. All complaining about the same thing, so I guess removing the lines that fixed dev probably would have fixed the others. I compiled it in dev at home since all my visual studio installations are hosed up :-(

I'll give 'er a go here in a bit.

The version of windows.h that is supplied with VC++ 6.0 is a little buggy. Dowload and install the Windows Platform SDK which has those bugs fixed.

Hmm... as I am a bit of a Grammar Nazi, here are some spelling mistakes you made :P

In your opening paragraph , you say "the village were".
This should be "The village where".

In the stats page, it says "You currently have ## attribute pojnts"... Should be "attribute points"

Also, in the shops, you say dollars. everywhere else, you say gold.

Actually a quite fun game, all in all. I liked it :)

Thanks for pointing out the mistakes. I shall fix them soon.

I am glad that you liked it. :)

The version of windows.h that is supplied with VC++ 6.0 is a little buggy. Dowload and install the Windows Platform SDK which has those bugs fixed.

Yep. Works fine on VS 2008. As ancient dragon says, i think you can use the platform SDK with vs6 (i think you need the 2003 version?)

Once youve made the changes mentioned so far, can you upload the newest revision?

Not bad, not bad. I didn't get to finish it because I was battling satan and I went into the PC's memory to try and figure out where my health was saved and tweak it :confused: and it was apparently the wrong memory location that I tweaked...it went into some sort of fit where I attacked every time rather than having a choice of attack/drink/forfeit.

A couple spelling errors...after you beat a monster it says "pojnts" rather than points and "dreary" is misspelled as "dreery"

Also, the game has some choices to tweak your weapons, armor, attributes, etc. but other than that there aren't many choices (other than the alignment choices of stealing/helping and buying/killing). This makes the game very linear and not incredibly exciting. Consider adding more than one location to go to at each step rather than just the one. Maybe also add a "look around" option at each locale which gives an X% chance of finding goodies and a Y% chance of finding a bad dude to battle. That would give less linearity and more opportunities to get attributes/gold/etc.

Lastly, consider adding an "inn" or something in the village which lets you save the data. If you don't want to do file I/O, maybe when you visit the inn they can give you a code (some hex value of hashed variables or something) that you can re-enter when you return to the game and want to load it up.

HTH

Yep. Works fine on VS 2008. As ancient dragon says, i think you can use the platform SDK with vs6 (i think you need the 2003 version?)

Hmmm...I would have thought that it would work on the dev PC I was on at work. It's what I make a lot of our commercial software on, so IIRC I try to keep it up to date. Maybe I wasn't on the machine or IDE I thought I was.

Once youve made the changes mentioned so far, can you upload the newest revision?

Open source, duuuude. Where's your fixed copy? :cool: ;)

@donald Thanks for the feedback, and I like the look around option. However, I don't know what you mean by tweaking the armor/weapon choices. Do you mean adding more that what is there? As well, I will fix the infamous spelling errors. Also, by adding more than one location, do you mean going from one place to another without the menu option?

Also, the auto-save thing I have works fine I think. I did it this way so you don't forget to save and lose all of your data..I did that quite a few times.

@Jbennet, sure I will upload the new version tomorrow. :)

Edit: I forgot to mention in the thread that I just started c++ about one-two months ago. My class hasn't even started on functions yet!..I like looking up codes and figuring out problems for myself.

@donald Thanks for the feedback, and I like the look around option. However, I don't know what you mean by tweaking the armor/weapon choices. Do you mean adding more that what is there? As well, I will fix the infamous spelling errors. Also, by adding more than one location, do you mean going from one place to another without the menu option?

Also, the auto-save thing I have works fine I think. I did it this way so you don't forget to save and lose all of your data..I did that quite a few times.

I meant that you already have the options for tweaking the armor, etc. and that you should add more stuff like that...more choices in the game.

RE: going different places, I mean like in the main menu (where you choose to visit medic, armory, heal, train, etc.) instead of just having the option to go to the cave or to hell, etc. have the option of going to the cave (where you will do battle) OR you can go to the town square (or where ever) where you could end up finding a fair maiden (+ health), some gold (+ gold), a bad dude (fight), fall in a hole (end up dead), etc. Just more places to go rather than a single track game trying to battle your way to your mom.

Also, I'm not sure if it's due to the memory tweak or not, but I'm having weird things happen when I try to load up my game. Under status it says that I'm Conquering °". Also, even though I was in the middle of battling satan, i start off battling the demon in hell rather than satan in hells throne. Also, the text is a little...off (e.g. The body of the Your Mother lays accross the floor, however you cannot seem to find your mother. You look around some more and discover a dark and dreery portal leaning against the door. You step up to it, and peer inside. ) where I think the bold part should be "wolf." Also...isn't a portal a door? :)

I meant that you already have the options for tweaking the armor, etc. and that you should add more stuff like that...more choices in the game.

RE: going different places, I mean like in the main menu (where you choose to visit medic, armory, heal, train, etc.) instead of just having the option to go to the cave or to hell, etc. have the option of going to the cave (where you will do battle) OR you can go to the town square (or where ever) where you could end up finding a fair maiden (+ health), some gold (+ gold), a bad dude (fight), fall in a hole (end up dead), etc. Just more places to go rather than a single track game trying to battle your way to your mom.

Also, I'm not sure if it's due to the memory tweak or not, but I'm having weird things happen when I try to load up my game. Under status it says that I'm Conquering °". Also, even though I was in the middle of battling satan, i start off battling the demon in hell rather than satan in hells throne. Also, the text is a little...off (e.g. The body of the Your Mother lays accross the floor, however you cannot seem to find your mother. You look around some more and discover a dark and dreery portal leaning against the door. You step up to it, and peer inside. ) where I think the bold part should be "wolf." Also...isn't a portal a door? :)

Ah, I see what you are saying, and I like the idea of having multiple paces to go. It would make the game much more dynamic, however that would be a major update. I will try to accomplish this within a few days or weeks maybe.

Also, the issue with the status is because you exceeded the array I set. It is easily fixable by just expanding the array, so I will have that fixed soon.

Thanks for your suggestions and comments.

Alright, I took everyone's suggestions (mostly on grammar issues) and changed the game a bit. I have yet to add more courses to take as Dave suggested, but I plan on doing that sometime soon.

Thanks everyone, you've been a good help.

*still open to suggestions*

commented: Good Gamr +0

For some reason I don't have the option to 'edit' anymore, and it kind of annoys me at times, because I have to keep posting a new post to add information.

Anyway, I was wondering if any of you have played a Win32 Console RPG that was better than this one before? Also, if you have played one that is better than this, could you give me a link to it so I may use it as reference? Because right now I don't really have many references to use to increase my game's prestige.

Before I post, and am not able to edit:
I am thinking of aborting this RPG and starting a new one where you pick your name, character type(Orc, Warlock, Troll, etc), class type(Warrior, Spell Caster, Guard, etc.), and play from there. You will have an alignment as well in this one, but it will change more drastically. (from like 0-100 instead of this game which is 0-10).

I also want the new game to have experience, a leveling system, weapon upgrades, armor upgrades, and resources used to upgrade your weapon/armor. I would also like to add a betting system where you bet a certain amount of money to guess a number, and if you guess it right you win that amount of money, and vise-versa.

So what do you think? Should I abandon this RPG and start on the new one, or continue to expand on this one?

Dunnet FTW!!!

Does it make you log in or anything before you make your next post? I think that if you're cookies are hosed you won't see the edit button but the reply button should be available [?].

I think you've got a good start going on this one and it would be a good base from which to expand it rather than starting over from scratch. Let this one be your beta version, keep working on it and get it really good, THEN apply the lessons you learned to your next game project.

Good. Now try to be more organized and start learning classes. Once you
have a "good" grasp, convert the code into objects.

Dunnet FTW!!!

Does it make you log in or anything before you make your next post? I think that if you're cookies are hosed you won't see the edit button but the reply button should be available [?].

I think you've got a good start going on this one and it would be a good base from which to expand it rather than starting over from scratch. Let this one be your beta version, keep working on it and get it really good, THEN apply the lessons you learned to your next game project.

Alright, I suppose I will just work on this one for now then. As well, I forgot to mention that I use Google Chrome, and I believe that might be the reason, as it always seems to delete cookies after about an hour or two. (This happens when logging on as well, I tell it to keep me logged in, and the next day I am logged out again. :().

As FirstPerson said, I guess I will start my 3rd RPG once I learn classes. BTW, what is a class?

Also, have you guys found any other RPGs sort of like this one or better? I would really like to see some.

For some reason I don't have the option to 'edit' anymore

There is a 30 minute limit.

I will start my 3rd RPG once I learn classes

If you use classes then you can use Inhritance and Polymorphesism for monsters and items which is a better way of doing things (e.g all weapons are items so can be dropped, examined, and a sword is a specialised version if a weapon, which can be used for either swinging or thrusting)

Also, look into using std::vector instead of arrays, that way they can be any size. A bit tricker to code, but better in the long run as that means e.g you can have a large inventory when you need it, but a small one when you dont. More efficient as well as more flexible.

I would start again from scratch using OOP. Im gonna have no free time until after 14. December, but after that ill have a bash at it. I did this sort of thing for an assignment once. I had each room as an object, with an east,west,north,south field which was a pointer to another area, so you could travel. Within areas, you could move around in a 3d space (3d grid array of objects, may the be monsters, items or null (grass)). Worked quite well, i based the concept off of the game netHack

There is a 30 minute limit.

If you use classes then you can use Inhritance and Polymorphesism for monsters and items which is a better way of doing things (e.g all weapons are items so can be dropped, examined, and a sword is a specialised version if a weapon, which can be used for either swinging or thrusting)

Also, look into using std::vector instead of arrays, that way they can be any size. A bit tricker to code, but better in the long run as that means e.g you can have a large inventory when you need it, but a small one when you dont. More efficient as well as more flexible.

I would start again from scratch using OOP. Im gonna have no free time until after 14. December, but after that ill have a bash at it. I did this sort of thing for an assignment once. I had each room as an object, with an east,west,north,south field which was a pointer to another area, so you could travel. Within areas, you could move around in a 3d space (3d grid array of objects, may the be monsters, items or null (grass)). Worked quite well, i based the concept off of the game netHack

Ah, a 30 minute limit..that explains it.

Anyway, your game sounds like it would be great, and I hope to see it if you make it in the future.

As well, I will look into vectors in a little while.

Also, have you guys found any other RPGs sort of like this one or better? I would really like to see some.

Dunnet FTW!!!

FREE with every copy of emacs...also free. Also, you get an intro to Eliza, an AI-lite chat bot, so you can start in on some AI stuff. Both are written in LISP, IIRC.

Oh, ok, I did not know that it was a game. Where can I play it?

And is it possible to see the coding?

THIS looks to be the source for dunnet. I suppose the easiest way I know of playing it would be to fire up a copy of emacs and run it from within that.

HERE is a project on SF called console RPG. I didn't look too closely, but it seems like something that might be up your alley.

ANOTHER one called Wrathlands.

commented: Helpful +1

Thanks for the links Donald.

Also, I have been working on the RPG off and on now.

So far I have added:
- Spells/magic
- Look around the area (this gives you aluminum, iron, steel, or gold)
- Upgrade shop (This allows you to make your weapons stronger, and it adds a new component to your weapons, so you will now see it as: "cutlass+1" or something like that)

I also fixed many spelling errors and some logic errors.

Here is a preview of the stat page:
[img]http://clip2net.com/clip/m0/1258492924-clip-16kb.png?nocache=1[/img]

*As you can see the stat page extends all the way to the bottom of the window, so I do not think I will be adding any more stats to change.*

I will have the updated version later tonight. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.