err here is the code
Rem Project: QuickStart Tutorial 8 - 2D Starfields
Rem Created: 05/02/2003 23:50:39
Rem ***** Main Source File *****
sync rate 0
rem sync on
rem hide mouse
rem load image "media/logo.png",1,1
starquantity = 5000
starlayers = 10
speedfactor# = 0
` Here we'll setup our starfield type
type starfield
X AS FLOAT
Y AS FLOAT
Z AS INTEGER
speed AS FLOAT
color AS DWORD
endtype
` Now let's create some stars
dim stars(starquantity) as starfield
` We need to give each star a location, colour and depth
for s=0 to starquantity
stars(s).x = rnd(1024)
stars(s).y = rnd(768)
stars(s).z = int(s/(starquantity/starlayers))+1
stars(s).speed = stars(s).z * speedfactor#
temp_col = (255/starlayers) * stars(s).z
stars(s).color = rgb(temp_col, temp_col, temp_col)
next s
set sprite 1,0,1
` Now our main loop!
repeat
cls 0
for s=0 to starquantity
sx# = stars(s).x
dot sx#, stars(s).y, stars(s).color
sx# = sx# - stars(s).speed
if sx# < 0 then sx# = 1024
stars(s).x = sx#
next s
sprite 1,200,182,1
sync
until spacekey()=1
end