Damn, I'll need to make myself a GitHub account, maybe then I could not only just track issues by myself, but also contribute to development.
Though regarding being privy to how things should work, we could really use people with actual background in that stuff.
I know a bit about molecular biology, but other than that I'm pretty much just an avid science geek.
FluffyFreak wrote:What would be super useful is that you (I think it was you) mentioned that most of the gas giants are being made with approximately half the radius they should have? Well if you can find in the code where that's happening then it would help me track it down.
I expect that it's somewhere in StarSystem.cpp but the file is one HUGE mess that we're slowly tackling the rewriting of. If you can find it and figure out what's wrong with the maths then I should be able to fix it and at least then the planets should be the correct size. It's also the file where most of the things you're discussing is initially decided so some familiarity with it would be very helpful :)
FluffyFreak wrote:Having said that it looks like it might be around line 1843 in SystemBody::PickPlanetType
It looks like it would be it.
If the planetary radius (in Earths) is expressed as just the cube root of mass (also in Earths), then without provisions for different planet types it gives all planets the same density, which is, uh, wrong.
Earth's density is around 5.5g/cm^3, our local gas giants range from 0.7 (Saturn), to 1.6 (Neptune).
Giving generated gas giants density of 5.5, underestimates their actual volumes for given mass by the factor of between 7.9 and 3.4 which yields radii between 1.5 and 2 times too low, which is around where I eyeballed it.
This means, that for example icy satellites and planets will be noticeably off as well.
Pioneer needs some better way of doing that, unfortunately providing actual functional relationships is beyond my skill or knowledge, I can just drop some guidelines - like that above Jupiter mass gas giants generally don't increase in volume (because they just get more of their hydrogen compacted into liquid metallic form) up to and including brown dwarves and faintest of M stars.
Speaking of masses and some other values - is there any reason why instead of performing all its conversion calisthenics doesn't just use unsigned 64bit ints (possibly encapsulated in something friendlier)?
That would be enough to store any of the coordinates of an object in any reasonably (and some unreasonably) scaled planetary system with sufficient precission to not have it jitter around even if it's as small as a spacecraft, or to store mass of pretty much any celestial body up to and including most massive of stars (Eddington limit) in around trillion ton chunks, which happen to be reasonable lower mass estimate of any celestial body Pioneer might generate and are still smaller than the mass of Deimos.
Also, regarding atmospheres, I see the molar masses are already in use in planet.cpp - it would be neat if all the gas constants got their own header and could be used to first calculate what gases a body can and cannot hold in generation phase, when determining the atmosphere.
Finally, I think that cosmetically it would help a lot to have "X rich atmosphere" rather than just "X atmosphere", because "rich" makes for a nice, fuzzy term - at least as temporary fix.