No problem! That code is AWESOME.
Hmm....now all I have to do is figure out how to "glue" the following codes together.
rem load music into file 1
Load music "Dance of Darkness.mid",1
rem play midi 1
play music 1
rem tree
Load image "bark02.bmp",2
Make object cylinder 5,47
Texture object 5,2
position object 5,6800,60,7990
Load image "bark02.bmp",2
Make object cylinder 6,47
Texture object 6,2
position object 6,6800,100,7990
Load image "bark02.bmp",2
Make object cylinder 7,47
Texture object 7,2
position object 7,6800,140,7990
rem village wall
Load image "cottag02.bmp",2
make object plain 1,2025,714
texture object 1,2
position object 1,5000,20,5900
Load image "cottag02.bmp",2
make object plain 4,2025,714
texture object 4,2
position object 4,6000,20,9000
rem village
Load image "aztec01.bmp",2
Make object box 10,300,400,300
Texture object 10,2
position object 10,6240,20,6269
rem village
Load image "aztec01.bmp",2
Make object box 12,300,400,300
Texture object 12,2
position object 12,5789,20,6699
rem village
Load image "aztec01.bmp",2
Make object box 13,300,400,300
Texture object 13,2
position object 13,6790,20,6899
Sync On
Sync Rate 34
hide mouse
Backdrop on
Set camera range 1,5000
Fog on
Fog distance 1400
Fog color RGB(128,128,128)
Color Backdrop RGB(128,128,128)
Rem make matrix
Make matrix 1,10000,10000,20,20
Rem texture matrix
Load image "grass09.bmp",1
Prepare matrix texture 1,1,1,1
Fill matrix 1,0,1
rem Randomize the matrix
randomize matrix 1,125
X#=5000
Z#=5000
Rem Main loop
Do
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = WrapValue(CameraAngleY#+MousemoveX()*0.2)
CameraAngleX# = WrapValue(CameraAngleX#+MousemoveY()*0.2)
Rem Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,CameraAngleY#,10)
ZTest# = Newzvalue(Z#,CameraAngleY#,10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
If Downkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#-180),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#-180),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
If Leftkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#-90),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#-90),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
If Rightkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#+90),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#+90),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
Yrotate camera CurveAngle(CameraAngleY#,OldCamAngleY#,24)
Xrotate camera CurveAngle(CameraAngleX#,OldCamAngleX#,24)
Y# = Get ground height(1,X#,Z#)
Position Camera X#,Y#+50,Z#
Rem Refresh Screen
Sync
Loop
load bitmap "grass09.bmp",1
get image 1,0,0,256,256
delete bitmap 1
rem Make a matrix
make matrix 1,1000,1000,11,11
rem Prepare matrix with a texture cut into a 2x2 texture grid
prepare matrix texture 1,1,2,2
rem Set matrix to use a mipmap
set matrix texture 1,0,1
rem Fill matrix with first texture tile
fill matrix 1,200.0,1
for x=0 to 10
for y=0 to 10
set matrix height 1,x,5,0.0
set matrix height 1,x,6,0.0
set matrix height 1,x+1,5,0.0
set matrix height 1,x+1,6,0.0
set matrix height 1,5,y,0.0
set matrix height 1,6,y,0.0
set matrix height 1,5,y+1,0.0
set matrix height 1,6,y+1,0.0
set matrix tile 1,x,5,2
set matrix tile 1,5,y,2
next y
next x
update matrix 1
Do
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = WrapValue(CameraAngleY#+MousemoveX()*0.2)
CameraAngleX# = WrapValue(CameraAngleX#+MousemoveY()*0.2)
Rem Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,CameraAngleY#,10)
ZTest# = Newzvalue(Z#,CameraAngleY#,10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
If Downkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#-180),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#-180),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
If Leftkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#-90),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#-90),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
If Rightkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#+90),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#+90),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
Yrotate camera CurveAngle(CameraAngleY#,OldCamAngleY#,24)
Xrotate camera CurveAngle(CameraAngleX#,OldCamAngleX#,24)
Y# = Get ground height(1,X#,Z#)
Position Camera X#,Y#+50,Z#
Rem Refresh Screen
Sync
loop
I wouldn't be asking anyone about that but I've forgotten how to do that on my own....
There is no king who has not had a slave among his ancestors, and no slave who has not had a king among his
Ph33r the Ringwraiths