Question regarding the organization/structure of a pokemon-style game

I've been working on a Pokemon clone for a short while now and have made considerable progress with just about everything but the actual pokemon and the battle engine. I was curious as to how I would go about programming this, however. For those of you who haven't played pokemon, the player can encounter wild pokemon on certain areas of a given map. The player is then taken to a turn-based battle against the wild pokemon where the pokemon in your party can either defeat it or capture it (making it a part of your party).

My idea was to create a class that would create a random pokemon (out of, for example, 5 possible different pokemon) on each random encounter, but I'm not sure what to do from here. When a pokemon is captured, should I add the randomly-generated pokemon class to an array that would hold all the pokemon in my party? Would an array of objects work in this situation? Any help, suggestions, or reading material is much welcome and appreciated! :)

Answers

  • So... nerd time.

    Pokémon are set to about 5 to 10 types per 'area'. So, for each time you see the Route number change or cave area change, a new set of Pokémon are 'loaded' into the area. As the player enters trigger areas (tall grass, cave grounds, etc), there's a random chance that a pokemon will pop. Either that, or you can have pokemon locations loaded in every five movement spaces - both will appear pseudorandom enough to fool the player.

    I would make a data array of all possible pokemon, and when a pokemon is encountered, you make a clone or a new instance of that pokemon with slightly randomized stats (like in actual pokemon).

    As for those in your party, since the party size is restricted, an array would definitely work best here as long as all pokemon inherit a base type.

Sign In or Register to comment.