A downloadable simulator for Windows, macOS, and Linux

Download NowName your own price

Protect the world from asteroids like in Deep Impact, watch debris rings accrete into moons, and more!

~ What is an N-body Simulator? ~

An N-body simulator accurately simulates the movement of celestial objects. Movies like Star Wars imply that things in space just float around aimlessly. In reality, every mass gravitationally attracts every other mass, leading to complex and beautiful phenomena.

~ What makes this simulator special? ~

The best way to learn physics is to goof around with it. The beloved video game Kerbal Space Program embraces this principle by letting players manage a realistic space program; however, that game costs $40 and only simulates two-body physics. This N-Body Simulator is free, configurable, fully-explorable, and optimized to run smoothly on integrated graphics laptops. 

~ Features ~

  • Smooth N-Body physics up to 100 bodies (tested on an Asus Zenbook 14X laptop)
  • Atmospheric drag and collision/heating VFX
  • An advanced configuration tool for creating custom simulations
  • A pilotable ship with deployable bombs, invincibility, and infinite fuel
  • Three celestial bodies (Earth-like, Inner Moon, and Outer Moon)

~ Controls ~

  • Camera zoom direction:  S/W or up/down arrow keys or mouse scroll
  • Camera zoom speed: 1, 2, 3, 4 keys (1 is slowest, 4 is fastest)
  • Turning: A/D or left/right arrow keys
  • Activate engine: Spacebar
  • Deploy bomb: B
  • Detonate all bombs: M
  • Access/hide config: C or left mouse click

~ The Configuration Panel ~

The configuration UI enables you to customize the simulation experience. Want to blow up asteroids?  See a debris ring form into moons? Destroy the world? You can do all those things using the configuration panel.

Top Buttons

  • ADD (+): Add a new config. 
  • RUN SIM: Spawn each configuration into the simulation in real-time.

Bottom Buttons

  • RESET OBJs: Deletes all spawned objects from the simulation.
  • RESET SIM: Deletes all spawned objects from the simulation AND resets the ship and major celestial bodies back to their starting positions, velocities, and appearances.

Configuration Options

  • DEL(-): deletes the attached config
  • APPLY: applies changes to the config
  • Active (Dropdown): whether the config should spawn when RUN SIM is hit
  • Object to Spawn (Dropdown):  the object type to spawn; options include circles, squares, triangles, or functioning bombs
  • Parent of Objects (Dropdown): the celestial body to spawn objects around; options include Earth, Inner Moon, and Outer Moon
  • Quantity (Integer): the number of objects to spawn
  • Spawn Distribution (Dropdown): Random or Clump. Random spawns the objects around all sections of a circular orbit; Clump spawns the objects in a specific segment of the orbit
  • Clump Spread (Float): how close together the objects should spawn; requires "Clump" to be the Spawn Distribution
  • Clump Epoch (Float): the segment or arc of circular orbit that objects spawn in; requires "Clump" to be the Spawn Distribution
  • Tangential Velocity Mult (Float): 0 means objects spawn without tangential (horizontal) velocity; +1 or -1 means objects spawn in a CW or CCW circular orbit; other numbers spawn objects on elliptical, suborbital, or escape trajectories
  • Radial Velocity Mult (Float): 0 means objects spawn without radial (vertical) velocity; other numbers spawn objects on inward or outward trajectories
  • Default Individual Mass (Float): the base mass of each object
  • Mass Variance Mult (Float): possible + or - variations in spawned object masses
  • Default Individual Size (Float): the base size of each object
  • Size Variance Mult (Float): possible + or - variations in spawned object sizes
  • Spawn Altitude Mult (Float): 0 spawns objects at sea level; other numbers spawn objects at higher altitudes
  • Altitude Variance Mult (Float): possible + or - variations in spawned object altitudes

~ Credits ~

Thank you Brackeys for the core DynamicBody code! This project would be nothing without your excellent N-body tutorial video.

~ Known Bugs ~

  • Reentry trails sometimes flicker visibly as objects travel through space
  • Objects' reentry trails might remain visible after leaving Earth's atmosphere. I like to think of them as comets

~ License ~

Beyond Brackeys's DynamicBody code, the inner moon texture, and the outer moon texture, this software and its textures are licensed under All Rights Reserved. You cannot create copies, direct derivations, or profits from this software.

Please reach out with any questions, comments, or concerns. Happy landings!

Download

Download NowName your own price

Click download now to get access to the following files:

PetulaNBodySimV1.0.zip 37 MB

Leave a comment

Log in with itch.io to leave a comment.