2025-02-27

It’s been a very productive week!

I’ve been spending some time gutting the current solar system hierarchy. I want to switch to building my systems by hand, and leave a little less to the random number generators. I think I can create unique and memorable locations in the galaxy, and some challenging approaches that you can return to again and again.

I was researching n-body orbits, and with very little code you can get some beautiful relationships between bodies in a solar system. It’s next to impossible to predict their trajectories, and at the scale I’m working in they are not very stable orbits

I found some alternative methods online. Patched conics and Kepler’s. I’m now working with a Kepler like solution, and the results are fairly stable. At least enough for my liking. They stay close enough to their initial predicted trajectories that I don’t mind the small rounding errors.

I’m also toying around with filling in the polygon textures. Wire frame textures are cool and cute, but I’ve noticed it can get a little hard to tell what you are looking at when displaying the game at higher resolutions or on smaller mobile screens. Would love some input there.

There are two “secret” physics tests to try out at the bottom of the play page. The left test is some real world data plugged in to a n-body orbit solution. The right, a two-body solution with data I made up that feels nice.

I think I prefer the two-body solution, and will be moving forward with that one. You may notice that all the orbits in this scene have a eccentricity of 0. That is because I cannot for the life of me figure out how to factor eccentricity into the formula. So for now, no elliptical orbits. Only circular. ;-;

An overview of a 2D solar system. The Sun, Mars, Earth, and it's Moon are all visible. Each have their trajectory drawn on screen.

Until next time! I need an ibuprofen.
-Ryann <3