Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Star Distribution

Star Distribution

JackOatley
JackOatley
Spiral Lords: Armada · · 1 min read
1,983 2
So graphically, the galaxy has always spun around even when you play, I don't know why I done this but I just found it cool (you can turn it off though, lol). However, it spun around evenly... Meaning that the stars further away from the center of the galaxy moved faster to keep an equal orbit, this looks a little weird on large maps, but it stopped the map from changing. The reason I didn't want the map changing was because I didn't know, when I first done it, how to handle stars overlapping (because they all moved at the same speed, stars in the center had shorter orbits). But the solution I'm using now uses specific regions to place stars, so instead of a completely random distance, it rounds it to the nearest 200 pixel. So now I can have pretty chaotic, ever-changing galaxy maps:

c63bab255436e0ca130487cfdd802610.gif


(Sped up for demonstration)

Discussion

Loading comments...