Yeah, it is more work that, say using a matrice - but the benefits are worth it. You have direct control, so matrice problems like the ugly lines can be combatted because your making the UV data yourself - simply shrinking the UV's in a little gets rid of it and your terrain looks much better. You can also rotate tiles, add colour, there's just no comparison once you suss out howto make your own. Also as far as my tests go, a memblock mesh is far faster than a matrice. I use a function that passes all the memblock data for a vert, you end up using something like Writevector(x,y,z,normalx,normaly,normalz,colour,uvx,uvy), you have to setup the memblock and know how many triangles you need beforehand, but take a look at some of the code below.
Build the memblock:
function maketerrain()
mem=100
tilesizex#=100.0
tilesizez#=100.0
polys=64*64*2
size=(polys*36*3)+12
if memblock exist(mem)=1 then delete memblock mem
make memblock mem,size
write memblock dword mem,0,338
write memblock dword mem,4,36
write memblock dword mem,8,polys*3
pos=12
for x=1 to 64
for z=1 to 64
h#=height(x,z)/100.00
tile=tile(x-1,z-1)
tiley=tile/8
tilex=tile-(tiley*8)
gfix#=0.001
matuvxd#=((tilex*0.125))+gfix#
matuvyd#=((tiley*0.125)+0.125)-gfix#
matuvxa#=((tilex*0.125)+0.125)-gfix#
matuvya#=((tiley*0.125)+0.125)-gfix#
matuvxb#=((tilex*0.125)+0.125)-gfix#
matuvyb#=((tiley*0.125))+gfix#
matuvxc#=((tilex*0.125))+gfix#
matuvyc#=((tiley*0.125))+gfix#
writevectordata(mem,pos,(x-1.0)*tilesizex#,safeheight(x-1,z-1),(z-1.0)*tilesizez#,matnormx#(x-1,z-1),matnormy#(x-1,z-1),matnormz#(x-1,z-1),matcol(x-1,z-1),matuvxd#,matuvyd#)
writevectordata(mem,pos+36,x*tilesizex#,safeheight(x,z),z*tilesizez#,matnormx#(x,z),matnormy#(x,z),matnormz#(x,z),matcol(x,z),matuvxb#,matuvyb#)
writevectordata(mem,pos+72,x*tilesizex#,safeheight(x,z-1),(z-1.0)*tilesizez#,matnormx#(x,z-1),matnormy#(x,z-1),matnormz#(x,z-1),matcol(x,z-1),matuvxa#,matuvya#)
writevectordata(mem,pos+108,(x-1.0)*tilesizex#,safeheight(x-1,z-1),(z-1.0)*tilesizez#,matnormx#(x-1,z-1),matnormy#(x-1,z-1),matnormz#(x-1,z-1),matcol(x-1,z-1),matuvxd#,matuvyd#)
writevectordata(mem,pos+144,(x-1.0)*tilesizex#,safeheight(x-1,z),z*tilesizez#,matnormx#(x-1,z),matnormy#(x-1,z),matnormz#(x-1,z),matcol(x-1,z),matuvxc#,matuvyc#)
writevectordata(mem,pos+180,x*tilesizex#,safeheight(x,z),z*tilesizez#,matnormx#(x,z),matnormy#(x,z),matnormz#(x,z),matcol(x,z),matuvxb#,matuvyb#)
pos=pos+216
next z
next x
if mesh exist(10)=1 then delete mesh 10
if object exist(10)=1 then delete object 10
make mesh from memblock 10,mem
make object 10,10,2
endfunction
Write vector data function:
function writevectordata(mem,pos,X# as float,Y# as float,Z# as float,NX# as float,NY# as float,NZ# as float,color as dword,TU# as float,TV# as float)
write memblock float mem,pos,X#
write memblock float mem,pos+4,Y#
write memblock float mem,pos+8,Z#
write memblock float mem,pos+12,NX#
write memblock float mem,pos+16,NY#
write memblock float mem,pos+20,NZ#
write memblock dword mem,pos+24,color
write memblock float mem,pos+28,TU#
write memblock float mem,pos+32,TV#
endfunction
These use my own arrays, so you'd have to fix the code, but you can see how relatively straightforward it is. The safeheight function is used in case the data overflows, not really needed, in that instance you could access an array directly.
Van-B

I laugh in the face of fate!