It's quite possible to create the illusion of an infinite matrix using only one matrix.
To create the illusion, use SHIFT MATRIX then either UP, DOWN, LEFT, or RIGHT, depending on what direction you need to scroll it.
Here's code that demonstrates it, it's commented, but if you have any questions, just ask...
` Screen settings
sync on : sync rate 40 : hide mouse : autocam off
backdrop on : color backdrop 0
` Create a water texture
create bitmap 1, 64, 64
cls rgb(0, 0, 200)
for i = 1 to 32
dot rnd(64), rnd(64), rgb(0, 0, 255)
next i
get image 1, 0, 0, 64, 64
delete bitmap 1
` Create a fairly-large matrix
` We will divide a 1000 sq unit matrix into 10 squares
` That means each square will be 100 units in size
` We will need this information later to smoothly scroll our matrix
make matrix 1, 1000, 1000, 10, 10
prepare matrix texture 1, 1, 1, 1
randomize matrix 1, 30 : update matrix 1
` Default camera position
camX# = 500.0 : camY# = 50.0 : camZ# = 0.0
` Main loop
do
` Move camera
camZ# = camZ# + 10.0
position camera camX#, camY#, camZ#
point camera camX#, camY# - 2.0, camZ# + 10.0
` Scroll matrix with camera
` Get the difference between camera's position and matrix's position
camMtrxDif# = camZ# - matrix position z(1)
` When the difference between the camera and the matrix is more than
` 100 units (the size of one matrix square), shift the matrix
if int(camMtrxDif#) > 100
` This bit right here keeps the matrix with the camera
position matrix 1, 0, 0, matrix position z(1)+100
` Of course, keeping the matrix with the camera by itself will make
` it look like the matrix is only sliding along with the camera.
` We use SHIFT MATRIX DOWN to scroll the matrix tiles
shift matrix down 1 : update matrix 1
endif
sync
loop
You can fool some people some of the time, but you can't fool all the people all the time.