26F-Studio / Techmino

Techmino:方块研究所唯一官方仓库(Github)
https://www.studio26f.org
GNU Lesser General Public License v3.0
550 stars 67 forks source link

Solar System Background #803

Open Not-A-Normal-Robot opened 1 year ago

Not-A-Normal-Robot commented 1 year ago

What feature do you want to suggest to the game?

A background that shows the orbital paths of the 8 planets (and also maybe Ceres and Pluto).

A little bit like this: (Warning: Programmer Art) image

This is pretty hard because we have to actually implement orbital mechanics. We DON'T have to make it compute gravity, instead, we can "trace out an orbital path" and make the planet go in that path. This is similar to what is used in Kerbal Space Program. (they call it "on rails", if you want to search it up)

I sadly don't know how do that, so maybe if coincidentally MrZ (or another person in the team) has a degree in orbital mechanics maybe they can help? 😃

Or maybe we can just use the gravity approach. I don't know if that's going to be stable when lag spikes occur, and it may cause a division-by-zero error if the planet falls into the sun. I also don't know which one is more efficient, but I'm guessing the path method is more efficient than the gravity simulation.

And no, we can't really use a tilting effect to easily get away with it (like in the galaxy background). Some planets have different orbital inclinations and eccentricities.

MrZ626 commented 1 year ago

I think this is totally unnecessary, at least for Techmino (also for the new one, at least I don't need the Solar system)

MrZ626 commented 1 year ago

btw I've written a 2D solar system with gravity long long ago

farteryhr commented 1 year ago

techmino galaxy (really real)

Not-A-Normal-Robot commented 1 year ago

Galaxy background: 😶

C29H25N3O5 commented 1 year ago

Make the positions of the planets match their actual positions based on the date

Not-A-Normal-Robot commented 1 year ago

speaking of which now I know the basics of keplerian orbits (I coded up a little thing in one of my repos). I could probably make this if I figure out how to convert 3d coords to screenspace coords.