heres a simple code for an effective (maybe?) starscape that has every star moving at a unique speed for 3d effect, starcolor becomes darker the slower they move hope someone benefits from this, i use it in my "2d space" game
Rem Project: Dark Basic Pro Project
Rem Created: Monday, January 03, 2011
Rem ***** Main Source File *****
set display mode 1680,1050,32,1
sync on
sync rate 0
sw = screen width()
sh = screen height()
dim starx#(1000)
dim stary#(1000)
dim starrgb(1000)
position mouse sw/2,sh/2
for xx = 1 to 255
starx#(xx) = rnd(sw)
stary#(xx) = rnd(sh)
starrgb(xx) = 256-xx
next xx
do
mx# = mousex()
my# = mousey()
for xx = 1 to 255
starx#(xx) = starx#(xx)-(mx#-(sw/2))/(sqrt(xx*50)+50)
stary#(xx) = stary#(xx)-(my#-(sh/2))/(sqrt(xx*50)+50)
if starx#(xx) > sw then starx#(xx) = 0
if stary#(xx) > sh then stary#(xx) = 0
if starx#(xx) < 0 then starx#(xx) = sw
if stary#(xx) < 0 then stary#(xx) = sh
dot starx#(xx),stary#(xx),rgb(starrgb(xx),starrgb(xx),starrgb(xx))
next xx
sync
cls
loop