Here is how you should create a matrix with a 2x2 texture. To get rid of ugly seams you should set 'filter' value of SET MATRIX command to 1. This does no smoothing though but you don't get the horrid lines.
Run this code and it starts in horrid line mode. Press SPACE and see what happens!
sync on : sync rate 0 : autocam off
ink rgb(255,0,0),0 : box 0,0,8,8
ink rgb(0,255,0),0 : box 8,0,16,8
ink rgb(0,0,255),0 : box 0,8,8,16
ink rgb(0,255,255),0 : box 8,8,16,16
get image 1,0,0,16,16,1
make matrix 1,1000,1000,64,64
prepare matrix texture 1,1,2,2
for f=0 to 63
for g=0 to 63
set matrix tile 1,f,g,rnd(3)+1
next g
next f
randomize matrix 1,10
update matrix 1
position camera 500,50,0
do
if upkey() then move camera 1
if downkey() then move camera -1
if spacekey()
filter=1
set matrix 1,0,0,1,filter,1,1,1
endif
sync
loop
If you want to keep the smoothing, then replace code inside spacekey condition with this:
filter=2
set matrix 1,0,0,1,filter,1,1,1
set matrix trim 1,0.05,0.05
update matrix 1
This uses a newish command to trim the leaking edges from your tiled texture. This allows you to keep the nice smoothing but you will lose any absolutely seamless tiling. The numbers on SET MATRIX TRIM command have to be tinkered with a fair bit to get any sort of desirable effect. Personally I think it is a waste of time.
Boo!