I had an idea to build something very similar a couple of years ago, but didn't have the skills/time for it.
What I built ended up being quite visually simple (, pragmatic,), but it's cool in that you can control some of the parameters of the differential equation solver to trade off between speed and accuracy. Mine also shows you where the bodies will go in the future, rather than just a trail of where they have been. And you can click and drag to add a planet with initial velocity and see how the entire system will react immediately and interactively.
I also implemented collision with conservation of momentum (the displayed body radius is much larger than the simulated radius).
Trying to figure out how to create a stable orbit makes me think of "The Three-Body Problem" by Liu Cixin (https://en.wikipedia.org/wiki/The_Three-Body_Problem_(novel)). The characters in the book have to figure out something similar, though more complex and in a VR like world.
As an aside, question for astronomy / orbital mechanics experts: I've always assumed that science fiction landscapes of earth-sized planets with a huge planet or moon in the sky, not to mention several, is basically impossible. Either tidal effects would destroy the landscape, or the planet-in-the-sky would be far enough away but too large to actually be a planet. Is there a solar system configuration that would allow that kind of landscape?
It's possible... sort of. The closest distance two identical planet-sized bodies in a hypothetical binary system can be together without destroying each other is about 2.5 radii, which is pretty close and the other planet would take a noticeable chunk of the sky. At that distance they'd be very oblate and tidally locked to each other; not exactly a world friendly to biological life, and won't look like your picture either.
If you have enough zoom, you can place the camera far enough and take such a photo of our moon. With a large telescope, I guess you can even do the same thing with Venus (on a very clear afternoon). So this is by no means "impossible", this is already the planet that we live in!
The most sensible such situation is having the action happen on a moon of a smallish gas giant. Something a bit smaller than Saturn could hold an earth-sized moon in close enough orbit to have reasonable day-night cycles even if it's tidally locked. (And those days would be a bit freaky -- unless it had a very high inclination, in such a close orbit around such a large body, there would likely be an eclipse every day at midday.)
I'm pleased to say I managed to invent a system so crazy that it actually caused a planet to reverse direction and go counter-clockwise around the sun before slingshotting wildly out of the solar system. Very fun to see what craziness can be invented.
18,260,000 at the 1000 year limit. Just restating till you get a starting planet in the habitable zone and adding the largest mass in a super tight binary is very stable.
I got it to 43M with this basic idea and some experimentation with starting planet distances. Getting the dwarf star stable relative to the planets in the habitable zone allows you to drop a few more Earths into the habitable zone and push the score up.
I did the same thing, with similar results: 17,398,525 points after 1100 years. It has to be pretty far into the habitable zone, though, and the dwarf star has to be in an uncomfortably-tight orbit, and timing probably matters a fair bit, too.
Putting dwarf stars on the outside produces some rather fun and funky orbits, though :)
EDIT: and I managed to accidentally (and disappointingly) produce a stable one with a far-orbiting dwarf star; 12,122,408 points at 1101.1 years.
27M points at 385.7 years. I added an ice giant at a 1:1 resonance with the highly elliptical orbit. Looks like it wasn't perfectly in resonance, but it was close enough to get the 385 years.
It seems surprisingly easy to make stable orbits in this simulation. I once made a solar system simulator a long time ago (in VB6 of all things) but when I placed a large mass in a similar orbit to a small mass, the small mass would often get ejected out the system. Here that doesn't seem to happen very easily. I used simple newton integration so my sim wasn't very accurate but I wonder if there's more to it than that.
I had an idea to build something very similar a couple of years ago, but didn't have the skills/time for it.
What I built ended up being quite visually simple (, pragmatic,), but it's cool in that you can control some of the parameters of the differential equation solver to trade off between speed and accuracy. Mine also shows you where the bodies will go in the future, rather than just a trail of where they have been. And you can click and drag to add a planet with initial velocity and see how the entire system will react immediately and interactively.
I also implemented collision with conservation of momentum (the displayed body radius is much larger than the simulated radius).
https://jurasofish.github.io/gravity/