No crankshaft, no problem: Toyota's free piston engine is brilliant
Seems like needing the piston to change directions is a waste of momentum. What about a similar design where a ball is propelled around the inside of a circular doughnut to generate electricity?