Application for creating a Matrix from .x file by Anonymous Coder28th Mar 2009 22:22
|
---|
Summary The zip code contains a program .exe that fully describes everything, this .exe extracts information from a .x file let's say a mountain and creates a .txt containing data about th Description well the long description is in the .exe file but there is no big deal. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com sync on sync rate 30 hide mouse MatrixDataFile = 1 open to read MatrixDataFile ,"valle.txt" AguaImg = 1 load image "wateranim.jpg" , AguaImg MountainImg = 2 load image "Mountain.jpg" , MountainImg make matrix 1, 400 , 500 , 20 , 30 prepare matrix texture 1 , MountainImg , 1 , 1 rem aqui lee del archivo para hacer la matris for z=0 to 30 for x=0 to 20 read string MatrixDataFile , tmpString$ set matrix height 1 , x , z , val( tmpString$ ) next x next z update matrix 1 AguaMatrix = 2 make matrix AguaMatrix , 400 , 500 , 2 , 3 prepare matrix texture AguaMatrix , AguaImg , 1 , 1 position matrix AguaMatrix , 0 , -1 , 0 ghost matrix on AguaMatrix set matrix AguaMatrix , 0 , 0 , 0 , 0 , 0 , 0 , 0 update matrix AguaMatrix main: do if leftkey()=1 then yrotate camera 0 , camera angle y(0)-5 if rightkey()=1 then yrotate camera 0 , camera angle y(0)+5 if upkey()=1 then move camera 0 , 2 if downkey()=1 then move camera 0 , -2 position camera camera position x(0) , get ground height(1 , camera position x(0) , camera position z(0))+4 , camera position z(0) sync loop return |