Welcome to the Planetary Simulator. This is a real-time N-body gravity sandbox where you can create solar systems, galaxies, or chaotic clusters of matter. Observe how gravity shapes movement, how collisions merge or shatter planets, and how stars form.
Controls
Left Click (on planet): Select and Track a planet.
Ctrl + Click & Drag: Launch a new planet. Drag to set direction and velocity.
Middle Click & Drag: Pan the camera view. (Or use Arrow Keys).
Mouse Wheel: Zoom in and out.
Click on Minimap: Teleport camera to that location.
Physics & Features
Gravity: All objects attract each other. Large masses pull harder.
Collision: Objects merge on contact.
Explosions: Massive collisions (Mass > 100) have a chance to cause a violent explosion, scattering debris.
Stars: Objects with mass > 50,000 become stars and emit a glow.
Performance: The simulation automatically switches to optimized algorithms (Barnes-Hut) when object counts get high.