Magnetic Motors - The end of gasoline?

Aren't trains and roller coasters and things that use magnets on rails powered by electro-magnets? Electricity controlling the magnets.

Yep. Electromagnetic roller coasters possess the smoothest acceleration I've ever experienced. It defies description. I haven't looked into the specifics of how it works, but I'd assume that the rate is controlled by changing the offset/alignment between poles.

I hope something like this is proven to work as stated. I built something like the magnetic motor in my head in the late 80s/early 90s and it looked great... until I put everything down on paper. Once it was all laid out in a more linear fashion, it turned out I had devised a very involved generator.