hi mate.
this attached source should explain some of DBPS nuiances
rem -----------------------------------------------------
rem example helper
rem by indi 10/11/2003
rem
rem ------------------------------------------------------
rem temp sync setup to force 60 fps
sync on : sync rate 60
rem prepare the text commands with the text info
set text size 12
set text font "Arial"
rem make a random seed by feeding the current timer value into randomize
randomize timer()
rem DBP wont load any media if you havent made a file.dbpro file and saved it
rem its to help DBP know where the paths are and other compiler components.
rem open a dbpro file in note pad to see the contents if you want.
rem for sanity lets just use some primitives for this example
rem u can replace this simple load for one object
rem for testing purposes make sure its path is correct
rem and you have saved the dba and the dbpro file.
AMT = 10
for i = 1 to AMT
make object cube i,1
color object i,rgb(rnd(255),rnd(255),rnd(255))
position object i,0,wrapvalue(i*2),0
next i
rem when u dont use the camera commands the defualt camera comes into play
rem that means it forces the camera to look at the last object loaded.
rem the command autocam on and autocam off will correct that if you dont feed
rem the program the next 2 lines and position it yourself
rem pull the camera back and lift it a bit
rem from ground zero but point it at ground zero (0,0,0)
position camera 0,20,-40
point camera 0,0,0
rem lets use a while endwhile instead of a do loop
rem so we can exit and delete the media safely
REM *SPECIAL NOTE
REM SOME PEOPLE SAY THAT THIS MIGHT NOT WORK IN win 2K
REM SEE HOW YOU GO WITH DISABLING THE ESCAPEKEY THIS WAY
REM IT SHOULD WORK THO
disable escapekey
REM OUR DO LOOP BUT USING WHILE ENDWHILE
while escapekey()=0
x = x + 1
for i = 1 to AMT :rem step 1 is already assumed
ROTATE OBJECT i,wrapvalue(x),0,0
next i
text 10,10,"press escapekey to exit"
rem x doesnt go down because we are using it to track what wrapvalue is doing
rem wrapvalue resets the object from 360 to 0
rem this allows u to check how many times its been rotated if thats required.
text 10,30,"x = "+STR$(x)
rem checking the fps each loop isnt reccomended as it itself slows things down a tiny bit
rem later on learn a timer and check every second or so
text 10,50," rudimentary fps "+STR$(screen fps())
rem sync lives at the end of the main loop
rem u can use fastsync also here if you want
rem just use sync once at the end of your main loop
rem or it will update the screen when ever u use it
sync
endwhile
REM END MAIN LOOP
REM SAFE CLEANUP
for i = 1 to AMT
if object exist(i) = 1
delete object i
endif
next i
END