Nice and simple execution, my only gripe is that the perspective is messed up since the larger/closer stars should be moving faster than the further/smaller stars, you have it the other way around!
Once that is fixed I think the effect will be even better!
astute observation, my friend
Thanks for the tip Mattan
Whoa, hold up. This thing is playing tricks on my eyes. This critique would be true if I were traveling through space in one plane/basically along one axis, right? But when I first looked at it, it gave me the impression that I was almost orbiting around the closer stars, moving in two dimensions. And if I were, the perspective would be right, wouldn't it?
In other words, it would be like I'm moving myself around an object in the center of the room to get a better look at it, and while I do that, the object moves much slower than the background.
But maybe this wasn't the intention. Ha!
You are 100% correct.
If you were orbiting one of those stars from very far away but looking inwards at your point of orbit, it could look like the stars close to the point of orbit move less while those further away move more relative to you.
However I believe the intention was simple single-axis motion.
Ha! Ok, cool. I'm not crazy. :)
Not necessarily, since stars have many different sizes and brightnesses. If they were uniform, that would be true.
For this purpose, however, I think you're right that it would improve the effect if that were the case.
Oh, and I forked it and made those changes and some more, including making the biggest stars round.
Good point about the size of stars, to be more accurate you could even put subtle color variations.
I don't know how I missed this. Looks much better!
The stars stop about 2/3 the way across my screen, probably because my resolution is so big.
Ahh yes. The height is hard coded to about 2000px on an infinite loop. Will update this soon.