Computer Science Canada

Pokemon Game Help

Author:  bluedevils_77 [ 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

Author:  Remm [ Tue Jun 06, 2006 6:50 pm ]
Post 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.

Author:  Remm [ Tue Jun 06, 2006 6:51 pm ]
Post 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 ^_^

Author:  bluedevils_77 [ Tue Jun 06, 2006 6:56 pm ]
Post 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

Author:  Remm [ Tue Jun 06, 2006 7:06 pm ]
Post 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

Author:  bluedevils_77 [ Tue Jun 06, 2006 7:08 pm ]
Post subject: 

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

Author:  Remm [ Tue Jun 06, 2006 7:16 pm ]
Post 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!

Author:  bluedevils_77 [ Tue Jun 06, 2006 7:30 pm ]
Post 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

Author:  Remm [ Tue Jun 06, 2006 7:34 pm ]
Post 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

Author:  bluedevils_77 [ Tue Jun 06, 2006 7:57 pm ]
Post 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

Author:  TheOneTrueGod [ Tue Jun 06, 2006 7:58 pm ]
Post 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.

Author:  Remm [ Tue Jun 06, 2006 8:08 pm ]
Post 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

Author:  bluedevils_77 [ Tue Jun 06, 2006 8:18 pm ]
Post 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)

Author:  bluedevils_77 [ Tue Jun 06, 2006 8:21 pm ]
Post subject: 

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

Author:  Remm [ Tue Jun 06, 2006 8:25 pm ]
Post subject: 

Yeah well.. arrays baffle me. WELL guess it'l be me whos goin back to the Turing Walkthrough today. G'day all. ^_^

Author:  HellblazerX [ Tue Jun 06, 2006 8:26 pm ]
Post subject: 

Remm wrote:
well... uh... least my way... was less confusing!

Are you kidding me, it's like a multiplication table. And don't make fun of Pokemon. It was a good game. Very Happy Well, the older ones anyways.

Also, bluedevils, it would nice to learn about records and classes. Remm maybe be right in that you're not making an RPG, but Pokemon stadium does incorporate many things in RPGs, like leveling up and the battle systems. You can find tutorials for records and classes in the Turing Walkthrough.

Author:  TheOneTrueGod [ Tue Jun 06, 2006 8:26 pm ]
Post subject: 

Ok, be sure to look up things such as hidden values (IVs and EPs) when randomly generating stats for the pokemon (Which, as it turns out, isn't random Razz) I suggest you get the base stats of all pokemon from a data file, as it'll help you out immensly, and it'll reduce hard coding by quite a bit. Check out the [Turing Walkthrough] for how to get that from the data file.

You have two choices on how to do it, you can either store all of the pokemon's base stats in an array of a record. The record would contain each of the pokemon's stats.
(Element one of the array refers to bulbasaur, Element two refers to ivysaur, etc.)

Or, you can load the data file only when you load that pokemon.

Be sure to name each data file something sensible, like 001.pkm for bulbasaur. (You can name the dot extension anything you want, really. preferably not something allready taken like ".gif" or ".zip", though they *might* work as well (Havn't tested it, never felt the need to))
(A lot of teachers don't seem to realise that you can open those spontaneous dot extensions with note pad Razz)

Author:  TheOneTrueGod [ Tue Jun 06, 2006 8:28 pm ]
Post subject: 

Sorry for double post, but I forgot to add this into the main one.

I meant no offense by what I said REMM, but to do it that way would require roughly 15^2 different if statements... needless to say, thats a world of hurt to look at.

And to answer your question, you don't Razz

Author:  bluedevils_77 [ Tue Jun 06, 2006 8:33 pm ]
Post subject: 

thats what im kinda gonna do.. have liek all teh pokemon in a data file. import in it.. have all moves and decriptions and power stats adn accuracy in data file import it in.. have the pokemon pics import them in. and make the fiel read them all know what they are.. adn take it from tehre

Author:  Remm [ Tue Jun 06, 2006 8:38 pm ]
Post subject: 

Ah its ok. After all, im prolly missing a whole lot i should know on turing, so its only natural that once or twice i slip up when giving advice and give a horrible answer Very Happy Least my way woulve worked and wasnt totaly a failure, but yea- it would be an eyesore.

And i can protect my self. I'll hide behind a lag wall of mass processes inside of other proccesses inside of a loop and so on (all popping up random images and pictures in random locations). Invincible, i tell you!

ok, im off the computer for now. Cya all.

Author:  Clayton [ Tue Jun 06, 2006 9:44 pm ]
Post subject: 

also something i find useful when dealing with massive amounts of data from files is to load it all during an initial "loading" screen (like whenever you start the game) as i find it reduces lag during the game, even though you have many variables stored to memory, it takes less time to call for that piece of information Very Happy

Author:  Anonymous [ Wed Jun 07, 2006 4:41 pm ]
Post subject:  Pokemon Red

Pokemon would be a difficult game to make... How far are you planning to go with it? Pokemon Red was the best one ever made. I quit Pokemon after I beat Silver.

Author:  bluedevils_77 [ Wed Jun 07, 2006 8:58 pm ]
Post subject: 

i jsut want to do a pokemon stadium type thing.. wehere u pick ur pokemon adn fight other people.. set levels so its not liek an rpg

Author:  Anonymous [ Wed Jun 07, 2006 9:01 pm ]
Post subject: 

You got like the best avatar on this site lol.

Author:  bluedevils_77 [ Wed Jun 07, 2006 9:06 pm ]
Post subject: 

lol Very Happy my emo alien

Author:  Clayton [ Wed Jun 07, 2006 9:10 pm ]
Post subject: 

^the above 2 posts are spam^ plz refrain from posting in topics useless information that is not related to whatever the topic you are posting in Very Happy


: