The code is:
Rem Project: QuickStart Tutorial 8 - 2D Starfields
Rem Created: 05/02/2003 23:50:39
Rem ***** Main Source File *****
sync rate 0
sync on
hide mouse
load image "media/logo.png",1,1
starquantity = 400
starlayers = 5
speedfactor# = 0.75
` 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(800)
stars(s).y = rnd(600)
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# = 800
stars(s).x = sx#
next s
sprite 1,200,182,1
sync
until spacekey()=1
end
But i just can't seem to get it to go from the top of the screen to the bottom. Help? Chris
Goverment... is just another way to say Better, Than, You!