Page 1 of 1

Text based game help

Posted: Mon Feb 23, 2009 8:51 pm
by MadPumpkin
A week or two ago Marcel told my that to start programming with C++, a good starting project would be a text based game... SO, in order to do this i need a little help

ex. i need an item system, i would like some sort of combat system, i want a quest system, and of course obviously i need a movement system!

If ANY-one would like to help with any of these im taking pretty much any ideas! and i need multiple ways to do each type of thing because i need this to be a learning project not just a "Hey lets just take this guys code here!"

Re: Text based game help

Posted: Tue Feb 24, 2009 8:56 am
by deryni21
MadPumpkin wrote:A week or two ago Marcel told my that to start programming with C++, a good starting project would be a text based game... SO, in order to do this i need a little help

ex. i need an item system, i would like some sort of combat system, i want a quest system, and of course obviously i need a movement system!

If ANY-one would like to help with any of these im taking pretty much any ideas! and i need multiple ways to do each type of thing because i need this to be a learning project not just a "Hey lets just take this guys code here!"
well hell how much do you know? thats all things you could do with begginers knowledge (take it from someone who did) but it wouldn't be easy adn it would frustrate the living hell out of you (it did me) suggest leaning for more then 2 weeks before going at that.

Re: Text based game help

Posted: Tue Feb 24, 2009 8:02 pm
by MadPumpkin
lol its been two weeks dude... and YES i DO know how. i just want a better way of doing these things, like maybe a better way of my current way of doing item systems, and combat systems... i have to say a text based combat system isn't rocket science but it is kinda confusing to me

Re: Text based game help

Posted: Tue Feb 24, 2009 8:04 pm
by deryni21
MadPumpkin wrote:lol its been two weeks dude... and YES i DO know how. i just want a better way of doing these things, like maybe a better way of my current way of doing item systems, and combat systems... i have to say a text based combat system isn't rocket science but it is kinda confusing to me
no its definately not but it is annoying =)

Re: Text based game help

Posted: Tue Feb 24, 2009 8:38 pm
by eatcomics
Mine still isn't working right, damn array... :lol:

Re: Text based game help

Posted: Wed Feb 25, 2009 9:06 am
by Kros
What exactly are you asking for help here with? Help from a design prospective (what this forum is technically for), as in "should my system be turn based?" "Should the items have this kind of stat and this kind of stat?" or are you looking for implementation help, i.e. programming assistance.

If the latter, then can you help us out by giving a run down on what C++ concepts you understand thus far, so we know what to suggest you look at?

Also, you mention that you already have these systems implemented in some form. In what state are they currently in? How would you like to further improve them?

Answering these questions will help us, help you.

Thanks!

Re: Text based game help

Posted: Wed Feb 25, 2009 9:16 pm
by KuramaYoko10
Cool... I also had that in mind to start learning C, but I stopped at the beginning, I have to keep working on it... I dont have the battle and item system implemented so I cant help you much...

but this guy might :
http://www.rdxgames.com/projects/wrathlands/index.html


Hope that is what you are looking for ;)

Re: Text based game help

Posted: Wed Feb 25, 2009 9:51 pm
by eatcomics
KuramaYoko10 wrote:Cool... I also had that in mind to start learning C, but I stopped at the beginning, I have to keep working on it... I dont have the battle and item system implemented so I cant help you much...

but this guy might :
http://www.rdxgames.com/projects/wrathlands/index.html


Hope that is what you are looking for ;)
I love those vids, I need to rewatch them sometime...

Re: Text based game help

Posted: Wed Feb 25, 2009 10:32 pm
by MadPumpkin
well the combat system im looking for is maybe just not based on turns but chance. so according to certain stats it says 1-10 chance of winning then you do it but im to C++ deficiant to know how to do that

Re: Text based game help

Posted: Wed Feb 25, 2009 11:18 pm
by MarauderIIC
While hte player is in the combat state, loop inside the combat function.

And you use srand() and rand() to do random numbers.
rand() % 10
gives you a # between 0 and 9
% is modulus, look it up on wikipedia

rand() % 10 + 5
gives you a # between 5 and 14 (0+5 through 9+5)

Note that vanilla srand()/rand() calls generally suck when it comes to randomness so you might get the same number a few times in a row. I find it alleviates the problem a bit if you seed with your last unmodified rand result.

Re: Text based game help

Posted: Thu Feb 26, 2009 11:47 am
by MadPumpkin
thank you very much marauder!