Oxomoco
aka "How Not To Do Gravity"
When I was 17, I was taught, formally, the law of gravitation. So, of course, I hacked together a 2D gravity simulator in Löve in my spare time! And as it turns out, two years later in University, I got an assignment to make what was, essentially, this but with a few bits more. Neat, huh?
It's completely a toy project, but it has:
- reference frames, showing you different paths in different reference frames!
- A renderer for the gravitational field strength, which is CPU-bound so a lil slow
- A neat grid system which fades in different grid sizes as you zoom (
Scrollwheel
)! - A simulation speed slider (
Shift+Scrollwheel
), which has no simulation speed limit so you can very quickly go into the Unphysical Realm and fling the Moon into the great beyond! - The ability to move things around in real-time, or add random comets, and see how they, ah, destabilise things!
I never got to include the Solar System with accurate orbits (because I was a kid), but I still think this is pretty neat considering I was 2017 and, like, barely sentient. Clearly so, because this thing runs its own object-oriented engine and physics.
Instructions
Download Löve, extract this to a folder of your choice, and run love path/to/oxomoco
. You might need an older version to run without bugs, sorry.
In addition to the tools available on 1, 2, 3 and 6, the following controls exist:
Space
: pause and play simulationScrollwheel
: zoom in and outShift-scrollwheel
: Make time run faster or slowerF5
: RestartF11
: Fullscreen9
: Go into grid move8
: Show gravitational field strength (pressF2
to render - it's slow!)D
: Toggle debug displayT
: Toggle body titlesP
: Toggle pathsC
: Toggle connections between bodiesV
: Toggle velocity vectorB
: Toggle body
License
2017 – 2019. To the extent possible under law, Mia yun Ruse has waived all copyright and related or neighboring rights to Oxomoco. .