Re: New stars! server clone proposal |
Mon, 01 October 2007 04:53 |
|
m.a@stars | | Commander | Messages: 2765
Registered: October 2004 Location: Third star to the left | |
|
yartrebo wrote on Sun, 30 September 2007 21:51 | Would you mind sharing your algorithm(s)? I was planning on only doing the basic stars! generation, but it's more for a lack of ideas than for it being particularly difficult.
|
Well, generating the coordinate distributions isn't actually hard, at least for "classical" shapes like rectangles, rings, globular clusters and spiral galaxies. The main issues are eliminating those coordinates too close to others and automatically placing the HomeWorlds, and I do both by mostly brute-force.
The hardest is (to me) to find a good enough way for the game creator to specify how the galaxy should be created, by using criteria such as:
overall star density, not just size, particularly for non-rectangular galaxies, or where there's more than one shape involved (say, 4 squares inside a ring)
non-standard HW placement (for example, in spirals, or scenario games)
generally, how to specify which galaxy you want without needing to use an endless set of numbers...
Perhaps you'll be better off by sticking to standard shapes 1st and waste time on candy later when everything else is already rolling.
But it would be nice if your "engine" had room for that candy from its inception.
So many Stars, so few Missiles!
In space no one can hear you scheme! Report message to a moderator
|
|
|