Hiya all,
Rem Simple 3D WORLDS with refelection
sync rate 100
hide mouse
landsize=2000
make matrix 1,20000.0,20000.0,25,25
load bitmap "c:\Gfx\floor.bmp",1
get image 1,0,0,256,256
delete bitmap 1
prepare matrix texture 1,1,2,2
ghost matrix on 1
set matrix height 1,12,12,300.0
update matrix 1
autocam off
rem Create blob character to follow
make object sphere 1,100.0
make object sphere 2,100.0
autocam on
backdrop on
color backdrop 0
set ambient light 50
load image "c:\Gfx\clouds.bmp",3
rem Create cloud-cover1
load object "c:\Model_DB\sky.x",52
scale object 52,5000000,5000000,5000000
position object 52,0,550,0
texture object 52,3
ghost object on 52
rem Create cloud-cover2
load object "c:\Model_DB\sky.x",53
scale object 53,5000000,5000000,5000000
position object 53,0,545,0
texture object 53,3
ghost object on 53
scroll object texture 53,0.5,0.2
do
Create_world()
loop
rem This program operates a third person camera
function Create_world()
rem Set variables for character position
x#=500:z#=500
rem Activate manual sync
sync on
rem Begin loop
do
` frames per second
set cursor 10,10:print screen fps()
rem Control skycover
scroll object texture 52,0.001,0.0001
scroll object texture 53,0.002,-0.002
rem Control camera with arrow keys
if upkey()=1 then x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if downkey()=1 then x#=newxvalue(x#,a#,-10) : z#=newzvalue(z#,a#,-10)
if leftkey()=1 then a#=wrapvalue(a#-10.0)
if rightkey()=1 then a#=wrapvalue(a#+10.0)
rem Update character
y#=get ground height(1,x#,z#)+50.0
position object 1,x#,y#,z#
position object 2,x#,y#-250.5,z#
yrotate object 1,a#
rem Position camera to the back of the character
cx#=newxvalue(x#,wrapvalue(a#+180),300)
cz#=newzvalue(z#,wrapvalue(a#+180),300)
cy#=get ground height(1,cx#,cz#)+100.0
position camera cx#,cy#,cz#
rem Point camera at object
point camera x#,y#,z#
sync
loop
endfunction
I just want to put some buildings on the matrix but I dont know how....can anyone help me please?
cheer
Hotshot