Posted: 3rd Nov 2002 00:15
`This will put up 100 cubes "take a few moments"
`The sqaure's will appear in the upper right corner
`Since the square's are glued they will move as one
`USE THE ARROW KEYS TO ROTATE THE SQUARE'S
`As the squares move out of the camera view
`they will disappear
`soon only a couple squares remain
`This is a very cut down version of the original
`program, but still demonstates the problem
set display mode 640,480,16
sync rate 0
sync on
cls rgb(255,0,0)
b=1
sp1=1
dim sb(100)
for sb=1 to 100
sz=rnd(40)
xp=rnd(100)
make object cube sb,sz
if sb>1 then glue object to limb sb,1,0
position object sb,xp,rnd(100),rnd(100)
color object sb,rgb(rnd(255),rnd(255),rnd(255))
next sb
do
a$=inkey$()
if a$="f" then fix object pivot b
if leftkey()=1 then x#=x#+sp1:gosub rotobj
if rightkey()=1 then x#=x#-sp1:gosub rotobj
if downkey()=1 then y#=y#-sp1:gosub rotobj
if upkey()=1 then y#=y#+sp1:gosub rotobj
color backdrop rgb(0,0,0)
ink rgb(200,200,200),0
frames$=str$(screen fps())
text 240,70, frames$
position camera 0,0,-100
point camera 0,0,0
set camera view 215,0,640,320
sync
loop
`--------------------------------------------
Rotobj:
inc x
if x#>360 then x#=0
if x#<0 then x#=360
if y#>360 then y#=0
if y#<0 then y#=360
if z#>360 then z#=0
if z#<0 then z#=360
rotate object b,y#,x#,z#
return
`------------------------------------------------
`sorry lost part of the code the first time