Ok, something serious here:
sync on
sync rate 100
set display mode 1024, 768, 32
set window off
hide mouse
color backdrop rgb(0,0,0)
global ScreenMode
global OldTime
ScreenMode=1
OldTime=Timer()
for x=1 to 16
make object cylinder x,1
next x
autocam off
for x=1 to 4
position object x, -2, -3 + x, 5
next x
for x=5 to 8
position object x, -1, -7 + x, 5
next x
for x=9 to 12
position object x, 0, -11 + x, 5
next x
for x=13 to 16
position object x, 1, -15 + x, 5
next x
ColorMode=0
for x=1 to 16
if ColorMode=0
ColorMode=1
Color object x, rgb(0,0,255)
else
ColorMode=0
Color object x, rgb(255,0,0)
endif
next x
FadeValue = 100
StartingAngle = 0
MoveValue = 0
`*************MAIN LOOP******************
do
if ScreenMode=1
gosub RotatingCylinders
endif
gosub UpdateScreenMode
if ScreenMode=2
gosub FadeScreen
endif
if ScreenMode=3
gosub FourCubes
endif
sync
loop
`***************************************
RotatingCylinders:
for x=1 to 4
gosub Rotation
zrotate object x, object angle z(x) + RotateAngle
next x
for x=5 to 8
gosub Rotation
zrotate object x, object angle z(x) - RotateAngle
next x
for x=9 to 12
gosub rotation
zrotate object x, object angle z(x) + RotateAngle
next x
for x=13 to 16
gosub rotation
zrotate object x, object angle z(x) - RotateAngle
next x
return
Rotation:
if RotateAngle = 5
RotateAngle=-5
else
RotateAngle=5
endif
return
UpdateScreenMode:
If ScreenMode=1 and Timer() - OldTime > 10000
ScreenMode=2
OldTime=Timer()
for a=1 to 16
Zrotate object a, 0
next a
endif
return
FadeScreen:
`set ambient light 0
for a=1 to 16
fade object a, FadeValue
next a
dec FadeValue, 1
if FadeValue <=0
FadeValue = 100
ScreenMode=3
for a=1 to 16
delete object a
next a
gosub CreateFourCubes
gosub PositionCubes
endif
return
CreateFourCubes:
for x=1 to 4
make object cube x, 1
color object x, rgb(0,0,255)
next x
return
FourCubes:
if StartingAngle < 90
for x=1 to 4
zrotate object x, object angle z(x) -1
next x
inc StartingAngle, 1
endif
if StartingAngle = 90
for x=1 to 4
fix object pivot x
next x
if MoveValue < 200
move object up 1, .01
move object right 2, .01
move object left 3, .01
move object down 4, .01
inc MoveValue, 1
endif
endif
if MoveValue = 200
StartingAngle = 0
MoveValue = 0
gosub PositionCubes
endif
return
PositionCubes:
position object 1, -1,-1,6
position object 2, -1,1,6
position object 3, 1,-1,6
position object 4, 1,1,6
for x=1 to 4
zrotate object x,0
next x
return
I was bored