Simple gravity simulation in FreeBasic
Written in Freebasic (Available here: https://www.freebasic.net/ ) the code simulates basic gravity between upto 100000 particles and a central object.
UP/DOWN Arrows adjust the speed of the simulation.
LEFT/RIGHT Adjust the initial speed of the particle (direction angle is random)
+/- Adjust the particles mass
B Resets particles with a burst (all 100000 particles released at once)
M Enables/disables mouse mode. Allows you to move the central mass around with the mouse.
D Toggles particles drawn as points or circles.
E Toggles particle recycle.
R Resets simulation
ESC exits the simulation.