check the tutorials "monster hut" heres a basic code
autocam off
hide mouse
`make objects and matrix
make object sphere 4,50
position object 4,0,100,0
make matrix 1,4000,4000,30,30
Fog on
Fog distance 2000
Fog color RGB(0,0,5)
Color Backdrop RGB(0,0,5)
Make object cylinder 1,2
xrotate object 1,90
fix object pivot 1
scale object 1,100,100,500
position object 1,0,-7,15
lock object on 1
make object sphere 2,3
hide object 2
hide object 4
`set camera and sync
set camera range 1,3000
sync on
sync rate 100
`begin game loop
do
`position camera at location and rotation of object 4
position camera object position x(4),object position y(4),object position z(4)
rotate camera object angle x(4),object angle y(4),object angle z(4)
`define camera variables
wvtx=object angle x(4)
wvty=object angle y(4)
wvtz=object angle z(4)
wcax=wrapvalue(wvtx)
wcay=wrapvalue(wvty)
wcaz=wrapvalue(wvtz)
`controls
`aiming
cya#=wrapvalue(cya#+(mousemovex()/3.0))
cxa#=cxa#+(mousemovey()/3.0)
if cxa#<-45.0 then cxa#=-45.0
if cxa#>45.0 then cxa#=45.0
cx#=newxvalue(x#,cya#,sin(cxa#)*10)
cz#=newzvalue(z#,cya#,sin(cxa#)*10)
rotate camera wrapvalue(cxa#),cya#,0
rotate object 4,0,camera angle y(),0
position camera object position x(4),object position y(4),object position z(4)
`walking
If keystate(17)=1 then move object 4,8
If keystate(31)=1 then move object 4,-8
`jumping
if controlkey()=1 and ajump=1
jumpb=1
height=30
endif
if jumpb=1
height=height-1
position object 4,object position x(4),object position y(4)+height,object position z(4)
endif
if object position y(4)>100 then ajump=0 else ajump=1
if object position y(4)<100
position object 4,object position x(4),100,object position z(4)
jump=0
height=0
endif
`shooting
if mouseclick()>0 and dst=0
shot=1
bdst=1
show object 2
position object 2,object position x(4),object position y(4)-1,object position z(4)
rotate object 2,camera angle x(),camera angle y(),camera angle z()
endif
if object position x(2)<0 or object position x(2)>4000 or object position z(2)>4000 or object position z(2)<0 or object position y(2)<0 or object position y(2)>1000
hide object 2
dst=0
shot=0
endif
if shot=1
dst=dst+1
bdst=bdst+1
endif
if shot=1
move object 2,100
dst=dst+1
endif
`sync
sync
`end game loop
loop
` This code was downloaded from The Game Creators
` It is reproduced here with full permission
` http://www.thegamecreators.com
sync on
sync rate 30
`hold file in varible
save$="save2.dba"
`loop
do
`if file do not exist you will make a file
if file exist(save$)=0
`put something in a file
input "What is your name? ";name$
`make a file
open to write 1,"save2.dba"
`write the name to file
write string 1,name$
`clear screen
cls
endif
`if file open then close it
if file open(1) then close file 1
`open file to read
if file exist(save$)=1
open to read 1,save$
`read string
read string 1,name$
set cursor 0,0
`print the string
print name$
`delete or don't delete
text 100,100,"do you want to delete your name? enter=Yes escape=no"
if returnkey()=1 then delete file "save2.dba" : text 100,200,"deleted"
if escapekey()=1 then end
endif
sync
loop
200GB HARD DRIVE 1GB RAM 256MB GRAPHICS CARD