I'll be using something like the following for the title sequence of my game (except the tiles will be textured). It sort of takes off The Matrix (green texture and spin around effect, which I modified from Mighty Atoms code).
autocam off
sync on
sync rate 0
TYPE _TITLETILE
obj as DWORD
xPos# as double float
yPos# as double float
zPos# as double float
xStep# as double float
yStep# as double float
zStep# as double float
xAng# as double float
yAng# as double float
zAng# as double float
xAngStep# as double float
yAngStep# as double float
zAngStep# as double float
endtype
#constant MAXTILES 75
#constant DISTANCE 2.0
dim tiles(MAXTILES) as _TITLETILE
randomize timer()
for x=1 to MAXTILES
tiles(x).obj=x
tiles(x).xPos#=(rnd(1000)-500.0)*1.0
tiles(x).yPos#=(rnd(2000))+500.0
tiles(x).zPos#=(rnd(2000.0)-1000.0)*1.0
tiles(x).xStep#=0.0
tiles(x).yStep#=(rnd(10)+1)*-0.9
tiles(x).zStep#=0.0
tiles(x).xAng#=(rnd(4)-2)*1.0
tiles(x).yAng#=(rnd(4)-2)*1.0
tiles(x).zAng#=(rnd(4)-2)*1.0
tiles(x).xAngStep#=(rnd(6)-3)*1.0
tiles(x).yAngStep#=(rnd(6)-3)*1.0
tiles(x).zAngStep#=(rnd(6)-3)*1.0
make object box tiles(x).obj,100.0,100.0,4.0
yrotate object tiles(x).obj,180.0
position object tiles(x).obj,tiles(x).xPos#,tiles(x).yPos#,tiles(x).zPos#
color object tiles(x).obj,rgb(255,255,255)
next x
make object sphere 255,50000.0
position object 255,0.0,0.0,0.0
set object cull 255,0
set camera range 10.0,150000.0
color object 255,rgb(0,255,0)
angle#=0.0
SpinCameraAround(0.0,0.0,0.0,DISTANCE,0.0,0,angle#)
position light 0,0.0,0.0,0.0
color light 0,10,64,10
show light 0
count=0
do
text 0,0,str$(screen fps())
if count>=5000
angle#=SpinCameraAround(0.0,0.0,0.0,DISTANCE,0.25,0,angle#)
if angle#>360.0
angle#=0.0
count=0
endif
endif
for x=1 to MAXTILES
inc tiles(x).yPos#,tiles(x).yStep#
if tiles(x).yPos#<=-500.0 and object in screen(tiles(x).obj)=0
tiles(x).xPos#=(rnd(1000)-500.0)*1.0
tiles(x).yPos#=(rnd(2000))+500.0
tiles(x).zPos#=(rnd(2000.0)-1000.0)*1.0
tiles(x).xStep#=0.0
tiles(x).yStep#=(rnd(10)+1)*-0.9
tiles(x).zStep#=0.0
tiles(x).xAng#=(rnd(4)-2)*0.5
tiles(x).yAng#=(rnd(4)-2)*0.5
tiles(x).zAng#=(rnd(4)-2)*0.5
tiles(x).xAngStep#=(rnd(6)-3)*0.75
tiles(x).yAngStep#=(rnd(6)-3)*0.65
tiles(x).zAngStep#=(rnd(6)-3)*0.55
endif
rotate object tiles(x).obj,tiles(x).xAng#,tiles(x).yAng#,tiles(x).zAng#
tiles(x).xAng#=wrapvalue(tiles(x).xAng#+tiles(x).xAngStep#)
tiles(x).yAng#=wrapvalue(tiles(x).yAng#+tiles(x).yAngStep#)
tiles(x).zAng#=wrapvalue(tiles(x).zAng#+tiles(x).zAngStep#)
position object tiles(x).obj,tiles(x).xPos#,tiles(x).yPos#,tiles(x).zPos#
next x
inc count
sync
loop
function SpinCameraAround(targetX#, targetY#, targetZ#, DistanceFromObject#, Speed#, CameraNumber, angle# as float)
local value# as float
value#=wrapvalue(270.0+angle#+speed#)
xPos# = targetX# + cos(value#) * DistanceFromObject#
yPos# = targetY#
zPos# = targetZ# + sin(value#) * DistanceFromObject#
position camera CameraNumber, xPos#, yPos#, zPos#
point camera CameraNumber, targetX#, targetY#, targetZ#
inc angle#,speed#
endfunction angle#
Avatar & Logo by Indi. Insert witty comment here...