What advantages do diesel engines have over regular gasoline ones?
Efficiency. And torque. And they produce less carbon monoxide.
They don’t use sparks to ignite the fuel - fewer parts to break, and you can run the engine without a battery or alternator.
Psst…look here for some more detailed discussion. Also, try searching too - this topic has been covered a lot.
And while they may not use sparks to ignite the fuel, they often do use glow plugs. And fuel injection. And IRL you can’t actually run the car without a battery or alternator, since you need to power that direct injection system, the glow plugs, etc.