The way planets and moons are presently spawned is awkward. We execute three systems in this order:
Star spawning system places a star at [0., 0.]
Planet spawning system places a planet in orbit around the star (could be generalised to any number of planets if not for animation system)
A "demo" system places a moon in orbit around the planet (this could again be generalised for any number of moons around any number of planets)
The problem?
Too much repetition and far from enough generalisation. We should prefer something like a spawn_celestial_body function that can be reused. And we want to be able to generalise this to spawn bodies recursively (moons can have satellites too, binary star systems exist).
Prefer to be able to run one system that is capable of executing other functions to construct the system. The limiting factor to this is the necessity of "parent" bodies existence prior to querying when creating children; presently systems run in the same step are executed in parallel, so bodies end up missing.
The way planets and moons are presently spawned is awkward. We execute three systems in this order:
The problem?
Too much repetition and far from enough generalisation. We should prefer something like a
spawn_celestial_body
function that can be reused. And we want to be able to generalise this to spawn bodies recursively (moons can have satellites too, binary star systems exist).Prefer to be able to run one system that is capable of executing other functions to construct the system. The limiting factor to this is the necessity of "parent" bodies existence prior to querying when creating children; presently systems run in the same step are executed in parallel, so bodies end up missing.