THE PHYSICS
Every body pulls on every other.
Two-body motion has exact conic-section solutions. Add a third body and the shared gravitational feedback can become exquisitely sensitive, producing resonances, close encounters, ejections and chaos.
The default kick–drift–kick method is symplectic, making it better suited than simple Euler integration to long orbital experiments.
Softening prevents singular acceleration at zero separation. Collision merging conserves mass and linear momentum but simplifies real astrophysics.
The galaxy presets are educational particle models. Real simulations include dark matter, gas, star formation and vastly more particles.