There should be a little tutorial on the top left (not shown if you've completed it in the past).
That's all you need to get started, I think. The rest should be
self-explanatory. Let me know if it's not!
Bad Gravity is a small simulator I made
because I had a very hard time finding an existing minigame where I
can just pilot a ship without installing software, perhaps buying it, then
building a rocket that must first make it into orbit... I just had questions
about orbital mechanics that online videos weren't answering and I figured: how
hard could this be to make? Well... here we are :)
Time controls. The simulation always tries to do 60
runs per second, but in every run you can do multiple steps. In a
step, the amount of attraction that each body feels towards each other is
updated, their positions are updated, and the line is drawn. By doing more
steps per run, the simulation runs faster, but your computer is limited in how
many steps it can do before at 60 runs per second. To speed up further, the
time per step control lets you increase the amount of time that passes
in each step, but it gets less precise because there is more distance between
each time the forces are calculated.
Spacebar creates a light body, pushed from A into the
direction of the mouse. It was meant to simulate: what would happen if you
shoot a bullet from a spacecraft? If A is moving relative to your target, it's
no bug that the new body doesn't move directly towards the mouse!
Units
Mass: kilograms
Distance: meters
Speed: meters per second
Thrust: newtons
Time unit: 1 step = 10 seconds
Earth goes around the Sun in roughly t = 365.24×24×60 minutes
With time per step = 1 and steps per run = 1, if the simulation always reaches 60 frames per second,
then the Earth will go around in t/10/fps/tps/spr = 525960/10/60/1/1 = 876.6 minutes
With time per step = 100 and steps per run = 100, it goes around in ≈5 seconds
Scale: see bottom right (adjust with scroll wheel)
Thanks to Paul Lutus over at https://arachnoid.com/orbital_dynamics/
for releasing their code as GPLv2! Their simulation is written in a straightforward
manner that made it perfect to learn from. Also special thanks to my good
friend Frédéric for frequent feedback and expert advice on
anything game-dev related. Even Bad Gravity was not made in isolation :-)
Why Bad Gravity, yet another browser experience? Because you can't simply fly around with arrow keys and try out orbital mechanics as a game in any of the others!
[Windows] Orbiter (no https available at the time of writing)
[Multi] Juno: New Origins a.k.a. Simple Rockets, originally a mobile game built out to a worthy rocket, plane, and orbital mechanics simulator. Runs on Linux using a specific Proton version and command-line options