Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Pokemon Game Help
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bluedevils_77




PostPosted: Tue Jun 06, 2006 6:44 pm   Post subject: Pokemon Game Help

any suggestions on how i could code the Grass move vs Water pokemon super effective thing. i got my damage calculator working.. i just iunno how i could make the program auto reconize the type advantages and disafvantages
Sponsor
Sponsor
Sponsor
sponsor
Remm




PostPosted: Tue Jun 06, 2006 6:50 pm   Post subject: (No subject)

First of all, i stab myself a thousand times for helping anyone promote pokemon. Twisted Evil

Second, have a boolean or variable for what type they are, so have your grass guy's grass = true for a sec.

then, when attacking, you could have a if statement if grass = true then take your damage and multiply it by your number,

so like
code:

%grass monster thingy
grass = true
%=======

%fire attack
stuff goes here.... (a damage variable in there too)
if (grass = true) then
damage := damage x 2 % your massive dmg for opposite type
end if


so the program will just skip over that if its not a grass guy, and deal its normal damage.
Remm




PostPosted: Tue Jun 06, 2006 6:51 pm   Post subject: (No subject)

er... yeah.. kinda made that for fire vrs grass Very Happy my bad, i forgot what you were talking about. Sub in fire for grass and grass for water ^_^
bluedevils_77




PostPosted: Tue Jun 06, 2006 6:56 pm   Post subject: (No subject)

ohhhh ok .. so hvae

if fire = ture then %if fire move

if grass = ture then damage x 2
elsif water = true then damage / 2


end iff


kinda thing right
Remm




PostPosted: Tue Jun 06, 2006 7:06 pm   Post subject: (No subject)

Hmm. Remember you can always look in the Turing Walkthrough for stuffs.

yeah, cept the way you put it down its right damn confusing. Very Happy

so just specify that the attack is fire, then you can do all that.
Your damage ifs should be in the attack tho, so:

code:

%Fire attack
var damage : int
damage:= Rand.Int (50,60)
if (plant = true) then
damage := damage x 2
elsif (water := true) then
damage := damage / 2
elsif (fire := true) then
damage := 0           % deals no damage to same type, you could also
end if                         % have absorb (shown further below)



%for absorb instead of null
elsif (fire := true ) then
damage := 0 - damage % so then your subtracting a negative from
end if                           % the creatures health, making it heal. That should work... :D
bluedevils_77




PostPosted: Tue Jun 06, 2006 7:08 pm   Post subject: (No subject)

alright thnx man.. im tryin to amke a pokemon stadium tpye dealys.. lol
Remm




PostPosted: Tue Jun 06, 2006 7:16 pm   Post subject: (No subject)

*shiver* Pokemon and anything else that ends in mon + Yu gi oh
Its all evil, i tell you. Stuff can only be dragged so far by begging fans before it turns to crap. I still remember I had watched two episodes of pokemon, saying that it didint look too bad. About a year or so later i saw one: i wanted to vomit. Well, i must admit, their games WERE addictive. I only played them because my dad got me the game for xmas when i was younger. Pokemon red. lmao, that game was acually well made.
---------Anyways, post / pm me if you have any other questions. I'll try to turn a blind eye to the pokemon-ish-ness of your game and look forward to when you post it. We'll see how it turns out Wink Good luck!
bluedevils_77




PostPosted: Tue Jun 06, 2006 7:30 pm   Post subject: (No subject)

yea... well im doing this for my grade 11 game.. iunno what else to do.. me and my friend are the only one doing hard ones.. hes doing risk.. eveyrone seems to be doing liek snake or pong.. or a amaze gaem
Sponsor
Sponsor
Sponsor
sponsor
Remm




PostPosted: Tue Jun 06, 2006 7:34 pm   Post subject: (No subject)

wow. that sounds VERY petty for a grade 11 project. like.. pong!? maze!?!comon! My grade 10 final project is more complex than that. I hope your teacher marks you up a bit for not just sitting back and pushing out some pong code. . . . Although, randomly generated mazes sounds prty nifty. Anyone remember that maze game for windows? how you could go into first person view? that was the stuff. If anyoen can re-create that goodness, that'd be awsome. and bit-worthy
bluedevils_77




PostPosted: Tue Jun 06, 2006 7:57 pm   Post subject: (No subject)

that game was pretty sweet, i was gonna do a maze game. but wiht a shooter thing.. more less ur stuck in a maze wiht a bunch of guys who wants to kill u.. and it owuld be the old school doom no scope just if ur gun lines up wiht the bad guy in the x value and u shot hed die
TheOneTrueGod




PostPosted: Tue Jun 06, 2006 7:58 pm   Post subject: (No subject)

Ugh, don't listen to REMM, thats an INCREDIBLY inefficient way to do it. Instead, create a two dimensional table, and use it as a combat multiplier.

First of all, Pokemon is an awesome RPG, the show sucks, the TCG sucks. The formulas they used are genius, and so few people have researched enough to appreciate them. I hope you did your research and know the formulas they use for calcuating stats.

That being said, here is what I mean when I say a table.

code:

%First of all, I suggest learning enum, as it'll make your life a bit more easier.  Anyways,
%0 = water, 1 = grass, 2 = fire.
const combMult : array 0..2,0..2 of real := init(
0.5, 0.5, 2,
2, 0.5, 0.5,
0.5, 2, 0.5
)


Declaration Explanation

Allright, now to get to explaining. First of all, know that the const array is declared in the following order:

0-0,0-1,0-2,
1-0,1-1,1-2,
2-0,2-1,2-2

They don't have to be arranged in a grid like that, but it makes it MUCH easier to look at, and MUCH easier to debug.

Values in the table
0.5 is because when an attack is not very effective, it deals half damage. 2 is because when an attack is super effective, it deals double damage. To determine what goes where, you just plug the attacker's number into the first part of the array, and the defenders type into the second number

0.5, 0.5, 2,
2, 0.5, 0.5,
0.5, 2, 0.5

Lets take a look at that bolded value there. If you refer to the "init" chart I created above, you will notice that its the part of the chart "0-1" This means that its water (Since I chose water to be 0) vs grass (Since I chose grase to be 1) Obviously water is not very effective vs grass, so the multiplier is 0.5, causing half damage.

Good luck, and keep in mind that RPGs are VERY massive projects that should not be taken lightly. Be sure you know what you are getting yourself into before starting this.
Remm




PostPosted: Tue Jun 06, 2006 8:08 pm   Post subject: (No subject)

uh.... sorry? lol
he isint doing rpg, he doin stadium. Very different >.>
well... uh... least my way... was less confusing! Very Happy
agrh! how does one defend himself from god? lol
bluedevils_77




PostPosted: Tue Jun 06, 2006 8:18 pm   Post subject: (No subject)

ok i understnad ur way too theonetrue god guy.. its looks pretty relatively simple.. for the stats.. i did look up the damage calculator.. but im not doing the rpg.. cuz that would take a long ass time.. so jsut teh stadium with set levels(10,25,50,75,100)
bluedevils_77




PostPosted: Tue Jun 06, 2006 8:21 pm   Post subject: (No subject)

dam i cant modify my messeges.. what does init mena? i knwo int.. but init
Remm




PostPosted: Tue Jun 06, 2006 8:25 pm   Post subject: (No subject)

Yeah well.. arrays baffle me. WELL guess it'l be me whos goin back to the Turing Walkthrough today. G'day all. ^_^
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 26 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: