I want to try and make a Pokemon fan game from scratch with my friend.He will do the graphics,so i need to make class that will hold Pokemon and their info.I figured it will look something like this:
It will probably be a 3D game(something like XY and ORAS games).
Edit : Does anyone know to do this better or my way is fine(Note i should do that for all 721 Pokemon so i am not sure is that an effective way to do stuff).
I would use your Pokemon class as a base class and make each pokemon derive from it. Something like:
1 2 3 4 5 6 7 8 9 10
class Pokemon {
public:
Pokemon() : attack(100), defense(100) { }
virtualvoid getPokemonInfo();
protected:
unsignedint attack,
defense;
string name;
// Other common attributes/data.
};
With the popularity of Pokemon I'm sure you can find some text file that has all the pokemon and their relevent attributes in it. Then, on starting the program, you could parse that file and initialize all the Pokemon (or initialize them as needed, as I'm sure all 721 are not going to be in play at the same time).
EDIT: Found something that might be useful: http://pokemondb.net/pokedex/all You could parse the HTML using an external library to make it easier or write it yourself.