Open Not-A-Normal-Robot opened 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)
btw I've written a 2D solar system with gravity long long ago
techmino galaxy (really real)
Galaxy background: 😶
Make the positions of the planets match their actual positions based on the date
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.
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)
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.