Computer Science Canada RPG Items |
Author: | rownale [ Wed May 31, 2006 7:23 am ] | ||
Post subject: | RPG Items | ||
I am trying to make an rpg and it will have lots of items. I dont know the best way to program it though. So far im using this.... (I know its probably a really bad way to do it.)
You can ignore the stuff at the bottom. Thats not the real way itll work really. I just need help with the procedure part. Is there a better way to do this?? |
Author: | Albrecd [ Wed May 31, 2006 7:36 am ] |
Post subject: | |
Most definatly. Check out Cervantes' tutorial on Classes (part 1, part 2, and part 3) In which he covers pretty much this exact topic. |
Author: | sylvester-27 [ Wed May 31, 2006 7:41 am ] |
Post subject: | |
well...all it does so far is tell u what u pick up [You pick up a Hatchet!] Yes there is a way way simpler method of having the comp output this. it is called "put" statements which i am sure you are familiar with. You can't really do anything with the program untill you add more things. start with the actual adventure mode and get some basics down like moving the character and background. |
Author: | rownale [ Wed May 31, 2006 2:55 pm ] |
Post subject: | |
Thanks Albrecd. I will try to learn classes but they look really confusing. Im only in GR10 Compsci and we have only just learned colour. We havent learned procedures or classes or anything cool. But i will try to learn classes on my own.. In response to syvelster, I cant have something that just says you pick up a hatchet because I want every item to have different variables like gold sell price, min wep damage, max wep damage, Strength bonuses, armor, etc. Some items will share the same variables, (eg. Hatchet uses sell price and damage as does short sword.) others wont (eg. Emerald Gem has health bonuses but the hatchet wont...) Basically it has to be more in depth than "You pick up hatchet".... |
Author: | Cervantes [ Wed May 31, 2006 6:10 pm ] | ||
Post subject: | |||
rownale wrote: Thanks Albrecd. I will try to learn classes but they look really confusing. Im only in GR10 Compsci and we have only just learned colour. We havent learned procedures or classes or anything cool. But i will try to learn classes on my own..
Excellent! Learning outside of the classroom is arguably a better way to learn. sylvester-27 wrote: well...all it does so far is tell u what u pick up [You pick up a Hatchet!] Yes there is a way way simpler method of having the comp output this. it is called "put" statements which i am sure you are familiar with. You can't really do anything with the program untill you add more things. start with the actual adventure mode and get some basics down like moving the character and background. That's not good advice at all. First, hardcoding a
gets you nowhere. What's more, there is plenty he can do with the program before he starts adding graphics and making the adventure and the background and all those other fancy things that mean squat to the meat of the program: the engine. |
Author: | Clayton [ Wed May 31, 2006 7:21 pm ] |
Post subject: | |
you could use a folder to store all information on an item and using file I/O get the information you need in a class(best way) or procedure(decent way) ![]() |
Author: | [Gandalf] [ Wed May 31, 2006 9:56 pm ] |
Post subject: | |
Umm... As much as I appreciate learning classes early on, I really don't think rownale is ready for them in Turing. How about learning about arrays, records, functions, file I/O, and a bunch of other stuff first? You can do this by following the general order of the Turing Walkthrough. |