Didn't came well between te code tags
try again:
Rem Various resolutions
`Width = 640 : Height = 480
Width = 800 : Height = 600
`Width = 1024 : Height = 768
Rem Set the display options
Set display mode Width,Height,32
Sync On
Hide Mouse
Rem Set some variables
Dim MatrixSize(1)
Dim MatrixSlices(1)
MatrixSize(1) = 70
MatrixSlices(1) = 35
Rem Load the mediafiles
Rem Call the functions
CreateTheMatrix(1)
SetCamera()
Rem Main loop
Do
Rem Print various texts to the screen
Set cursor 10,10
Print screen fps()
Rem Check for zooming
If scancode() = 78 Then move camera +.5
`and camera position y() > 1.5 then move camera +.5
If scancode() = 74 Then move camera -.5
`and camera position y() < 15 Then move camera -.5
Rem Set the camera controls
If upkey() = 1 then MoveMatrix(3)
If downkey() = 1 then MoveMatrix(4)
If leftkey() = 1 then MoveMatrix(1)
If rightkey() = 1 then MoveMatrix(2)
Rem Give the syncronize command
Sync
Loop
Rem Create a matrix
Function CreateTheMatrix(WaterSwitch)
Rem Create the matrix itself
Make matrix 1, MatrixSize(1),MatrixSize(1),MatrixSlices(1),MatrixSlices(1)
Rem Make a random map
Randomize matrix 1,2
Update matrix 1
Rem Create the water effect if switch is on
If WaterSwitch = 1
Make object plain 1000, MatrixSize(1),MatrixSize(1)
position object 1000,MatrixSize(1)/2,-.1,MatrixSize(1)/2
xrotate object 1000, wrapvalue(object angle x(1000) +90)
color object 1000,rgb(0,0,160)
EndIf
EndFunction
Rem Set the camera to the begin position
Function SetCamera()
Position camera MatrixSize(1) /2,4,8
XRotate camera wrapvalue(camera angle x() + 40)
EndFunction
Rem Move the matrix and all the visible objects
Function MoveMatrix(direction)
Remstart
The direction declarations:
1 = Left
2 = Right
3 = Up
4 = Down
RemEnd
If direction = 1
shift matrix right 1
EndIf
If direction = 2
shift matrix left 1
EndIf
If direction = 3
shift matrix down 1
EndIf
If direction = 4
shift matrix up 1
EndIf
Update matrix 1
EndFunction