Thanks to shenanigans involving alternate dimensions in Pokémon Omega Ruby and Alpha Sapphire, Pokémon's timeline has officially become bonkers. But, there is a way to make sense of it.
Basically, there are three different Pokémon dimensions, all of which house their own Pokémon games.
In one dimension, you've got all the original Game Boy games, from Red to Crystal. Here, the Link Cable provided a way to interact with different versions of the same world. But, beyond that, the technology in this dimension is still kind of primitive. Then you've got the "connectivity" dimension. That's where the Game Boy Advanced and Nintendo DS games go, from Fire Red to Black and White 2. Here, Link Cable tech is so advanced, Pokémon can actually travel into the future. And then we've got the Infinity dimension, where the 3DS games take place. The least is known about this dimension, but it's the most interesting so far. This dimension is the most advanced, but they're worse off for it, arguably -- the Infinity Energy that they rely on uses the life force of things like Pokémon. On the other hand, they have mega evolutions, so it's not all bad.
Tumblr user azzyfox explains this mess in great detail in this infographic, and it's a must-read if you'd like to understand Pokémon's timeline. Click on "expand" to see it in full.
Dang. And people like to say Pokémon's story is simple. Actually, it's getting quite wild.