Hi, I'm not sure why this got moved to the DarkBasic Classic board, as it clearly is DB Pro code.
Anyway, the program runs fine on my rig, but it is a tad faster than what you have (I7 quad core at 3.2 per core). To make it run faster, you can use the LOCK PIXELS along with UNLOCK PIXELS commands. I ran it at SYNC RATE 0 using the following code. It ran at 1800 FPS without locking/unlocking the pixels and 3600 with it, so literally a double speed increase. Check it out:
staramount = 100
xres = 800
yres = 600
Type StarField
x as integer
y as integer
s as integer
endtype
dim stars(staramount) as StarField
set display mode xres,yres,32
sync on
sync rate 60
for x = 0 to staramount
stars(x).x = rnd(xres)
stars(x).y = rnd(yres)
stars(x).s = rnd(5)+1
next x
do
cls
lock pixels
for x = 0 to staramount
inc stars(x).y, stars(x).s
if stars(x).y > yres
stars(x).x = rnd(xres)
stars(x).y = 0
endif
ink rgb(stars(x).s*50,stars(x).s*50,stars(x).s*50),0
Dot stars(x).x,stars(x).y
Next x
unlock pixels
` text 10,20,"FPS: " + str$(screen fps() )
Sync
Loop
EDIT: I forgot to mention that using the DOT command is not the most efficient way to do this, and there are other options available to you, but if you are new to DBP, it should work for you. An advanced option would be using MEMBLOCKS to accomplish what you want. Do a forum search for them and you should be able to find some decent examples.
So many games to code.....so little time.