and here is the code (but media is 40mb so i can give it realy..)
set display mode 1024 , 768 ,32
`setup game
sync on
sync rate 0
hide mouse
`rem make bullet !
Make Object Sphere 200,1
scale object 200,15,15,15
Hide Object 200
`in order to make far cry kind of graphic , we can reali use some trees
`now let`s add some
`tree 1
load object "a3dtree.3ds" , 201
position object 201 , 5353 , 0 , 27624
scale object 201 ,40,40,40
set object collision to boxes 201
`tree 2
load object "a3dtree.3ds" , 202
position object 202 , 5005 , 0 , 25624
scale object 202 ,40,40,40
set object collision to boxes 202
`tree 3
load object "a3dtree.3ds" , 203
position object 203 , 5353 , 0 , 23624
scale object 203 ,40,40,40
set object collision to boxes 203
`tree 4
load object "a3dtree.3ds" , 204
position object 204 , 5455 , 0 , 19624
scale object 204 ,40,40,40
set object collision to boxes 204
`tree 5
load object "a3dtree.3ds" , 205
position object 205 , 5605 , 0 , 35624
scale object 205 ,40,40,40
set object collision to boxes 205
`LOAD MUSIC AND PLAY IT
load music "Yaya my bend rulez.mp3",1
play music 1
`arrays
dim hmap(1)
dim partx#(300)
dim party#(300)
dim partz#(300)
dim partxvel#(300)
dim partyvel#(300)
dim partzvel#(300)
dim partlife(300)
dim max(1)
max(1)=99
health=100
`load and position guns
gun=1
load sound "shoot.wav",1
load object "ak47-model-hold.3ds",1
yrotate object 1,90
zrotate object 1,355
fix object pivot 1
scale object 1,1000,1000,1000
set object rotation zyx 1
disable object zdepth 1
set object 1,1,0,1,0,1,1,1
color limb 1,1,rgb(50,50,50)
color limb 1,2,rgb(70,70,70)
color limb 1,3,rgb(20,20,20)
color limb 1,4,rgb(30,30,30)
color limb 1,5,rgb(230,165,106)
color limb 1,6,rgb(230,165,106)
`---------------------------
load object "sniper-model-hold.3ds",2
scale object 2,1000,1000,1000
set object rotation zyx 2
disable object zdepth 2
set object 2,1,0,1,0,1,1,1
hide object 2
color limb 2,1,rgb(50,50,50)
color limb 2,2,rgb(30,30,30)
color limb 2,3,rgb(131,48,16)
color limb 2,4,rgb(30,30,30)
color limb 2,5,rgb(30,30,30)
color limb 2,6,rgb(30,30,30)
color limb 2,7,rgb(30,30,30)
color limb 2,8,rgb(230,165,106)
color limb 2,9,rgb(30,30,30)
`metak
`meetaaak
`accessories
make object plain 3,20,10
position object 3,0,-4,300
load image "target.bmp",1
texture object 3,1
lock object on 3
set object 3,1,0,1,1,0
disable object zdepth 3
ghost object on 3
`------------------
`------------------
`------------------
`------------------
`MAPA DELOVI NJE
load object "models\zid2.3ds",66
position object 66,5555,0,22550
load object "models\zid1.3ds",66
position object 66,5555,0,22550
scale object 66 , 310 , 200 , 170
`zid
set object collision to boxes 66
`player
set object collision to spheres 1
`------------------
`BOT:
load object "models\WALK.X",70
position object 70,5755,0,22550
if speed >0 then loop object 70
speed = -1
`----------------------------
`---------------
load image "gunflare.bmp",2
make object plain 4,6,6
texture object 4,2
set object 4,1,0,1,0,0
position object 4,6,-4.2,45
lock object on 4
zrotate object 4,37
yrotate object 4,30
fix object pivot 4
hide object 4
`----------------
make object cylinder 5,100
scale object 5,0.6,0.6,500
lock object on 5
position object 5,19,-13.2,545
color object 5,rgb(255,255,0)
ghost object on 5
hide object 5
xrotate object 5,45
yrotate object 5,355
fix object pivot 5
`-----------------
make object sphere 6,2
hide object 6
`----------------
make object cylinder 7,100
scale object 7,1.2,0.8,500
lock object on 7
position object 7,19,-18.2,400
color object 7,rgb(255,255,0)
ghost object on 7
hide object 7
xrotate object 7,5
yrotate object 7,355
fix object pivot 7
`----------------
make object plain 9,10,10
position object 9,0,-4,300
load image "target2.bmp",5
texture object 9,5
lock object on 9
set object 9,1,0,1,1,0
disable object zdepth 9
ghost object on 9
hide object 9
`-----------------
Make object Plain 10,1,1
position object 10,-2.7,1.9,4
Lock object on 10
ghost object on 10
hide object 10
`levels
level=1
load image "landtex.JPG",3
make matrix 1,30000,30000,70,70
prepare matrix texture 1,3,1,1
backdrop on
color backdrop rgb(128,86,254)
set camera range 1,25000
set ambient light 5
fog on
fog color rgb(128,86,254)
fog distance 20000
getheightbmp("land.bmp")
for x=1 to 70
for z=1 to 70
set matrix height 1,x,z,hmap(x,z)*20
next x
next z
update matrix 1
`normalise matrix
for z=1 to 69
for x=1 to 69
h8#=get matrix height(1,x,z-1)
h4#=get matrix height(1,x-1,z)
h#=get matrix height(1,x,z)
h2#=get matrix height(1,x,z)
x1#=(x-1)*25.0 : y1#=h#
x2#=(x+0)*25.0 : y2#=h4#
dx#=x2#-x1#
dy#=y2#-y1#
ax#=atanfull(dx#,dy#)
ax#=wrapvalue(90-ax#)
z1#=(z-1)*25.0 : y1#=h2#
z2#=(z+0)*25.0 : y2#=h8#
dz#=z2#-z1#
dy#=y2#-y1#
az#=atanfull(dz#,dy#)
az#=wrapvalue(90-az#)
nx#=sin(ax#)
ny#=cos(ax#)
nz#=sin(az#)
nox#=nx#*25000
noy#=ny#*9000
noz#=nz#*1000
set matrix normal 1,x,z,nox#,noy#,noz#
next x
next z
set matrix 1,1,1,1,1,1,1,1
update matrix 1
`variables
camspeed#=5
recoil=0
reload=0
rt=3
rts=50
x#=5353
z#=22624
y#=get ground height(1,x#,z#)
camy#=180
position camera x#,y#,z#
power=1
`timer
timer = 50
`How many bullets should player have on the beggining
bullet = 100
`main loop
do
if speed <0 then loop object 70 else stop object 70
`timer lowerer
if g=e then timer=timer-1
`za pucanje kod
if mouseclick()=1 and timer = 0
timer = 50
show object 200
Position object 200,X#,Y#,Z#
Set object to camera orientation 200
goto 3:
endif
`control camera
3:
move object 200,45
`if timer < i then set it 50 again
if timer <1 then timer = 50
camf#=0
camx#=wrapvalue(camx#+mousemovey()*0.8)
camy#=wrapvalue(camy#+mousemovex()*0.8)
acamx#=curveangle(camx#,acamx#,2.5)
acamy#=curveangle(camy#,acamy#,2.5)
rotate camera acamx#,acamy#,0
if upkey()=1 then camf#=camf#+camspeed#*3
if downkey()=1 then camf#=camf#-camspeed#
if inkey$()="a" then x#=newxvalue(x#,wrapvalue(camy#-90),7) : z#=newzvalue(z#,wrapvalue(camy#-90),7)
if inkey$()="d" then x#=newxvalue(x#,wrapvalue(camy#-90),-7) : z#=newzvalue(z#,wrapvalue(camy#-90),-7)
if camf#<>0 then move camera camf#
p#=wrapvalue(p#+20.0)
py#=cos(p#)*6
x#=camera position x()
z#=camera position z()
if upkey()=1
y#=get ground height(1,x#,z#)+30+py#
else
y#=get ground height(1,x#,z#)+30
endif
crx#=wrapvalue(camx#-180)
if crx# > 225 then camx#=45
if crx# < 135 then camx#=315
`collision
`slide on hills (from iced)
fx#=0 : fz#=0
for r=0 to 35
ex#=newxvalue(x#,r*10,15)
ez#=newzvalue(z#,r*10,15)
eh#=get ground height(1,ex#+mx#,ez#+mz#)
if eh#<-50.0 then eh#=-50.0
force#=(eh#+50.0)/10.0
fx#=fx#+((ex#-x#)*force#)
fz#=fz#+((ez#-z#)*force#)
next r
if y#>400
if z#<18500 or z#>10400
if x#>17600 or x#<16000
x#=x#-(fx#/20.0)
z#=z#-(fz#/20.0)
endif
endif
endif
`sniper position message
if z#>18500
if z#<19200
if x#>16000
if x#<17600
ink rgb(0,0,255),0
set text font "comic sand ms"
set text size 30
center text 319,99,"Look! You could snipe from that hill!"
center text 321,99,"Look! You could snipe from that hill!"
center text 319,101,"Look! You could snipe from that hill!"
center text 321,101,"Look! You could snipe from that hill!"
ink rgb(255,0,0),0
center text 320,100,"Look! You could snipe from that hill!"
endif
endif
endif
endif
`position camera
g#=wrapvalue(g#+20.0)
gy#=cos(g#)*-0.2
position camera x#,y#,z#
`swap guns
if leftkey()=1 then gun=1
if rightkey()=1 then gun=2
if gun=1
show object 1
hide object 2
show object 3
hide object 9
power=1
endif
if gun=2
hide object 1
show object 2
hide object 3
show object 9
power=5
endif
`position guns
if upkey()=1
position object 1,x#,y#+gy#,z#
position object 2,x#,y#+gy#,z#
else
position object 1,x#,y#,z#
position object 2,x#,y#,z#
endif
rotate object 1,acamx#,acamy#,0
rotate object 2,acamx#,acamy#,0
`shoot
if mouseclick()=0
endif
bx#=object position x(6)
by#=object position y(6)
bz#=object position z(6)
if gun=1
`PUCANJE --------------------------------------------
if mouseclick()=1 and bulletlife=0 and bullet > 0
bullet=bullet-1
bulletlife=5
position object 6,x#,y#,z#
set object to camera orientation 6
endif
if bulletlife>0
dec bulletlife
move object 6,pdist1
recoil=1
endif
if bulletlife<0
bulletlife=0
endif
if bulletlife=0
position object 6,x#,y#,z#
set object to camera orientation 6
endif
if bulletlife>3 and bulletlife<5 then show object 4 else hide object 4
if bulletlife>3 and bulletlife<5 then show object 5 else hide object 5
if bulletlife>3 and bulletlife<5 then play sound 1
`recoil
if recoil>0 and mouseclick()=1
dec rt
recang#=wrapvalue(recang#-1)
else
recang#=0
endif
if rt<2 and mouseclick()=1
rotate object 1,wrapvalue(acamx#+wrapvalue(recang#)),acamy#,0
else
rotate object 1,acamx#,acamy#,0
endif
if rt<0 then rt=3 : recang#=0
endif
`sniper
if gun=2
if mouseclick()=1 and sbulletlife=0 and bullet > 0
sbulletlife=55
position object 6,x#,y#,z#
set object to camera orientation 6
endif
if sbulletlife>0
dec sbulletlife
move object 6,pdist1
endif
if sbulletlife<0
sbulletlife=0
endif
if sbulletlife=0
position object 6,x#,y#,z#
set object to camera orientation 6
endif
endif
if sbulletlife>53 and sbulletlife<55 then show object 7 else hide object 7
if sbulletlife>53 and sbulletlife<55 then play sound 1
`show health
ink rgb(0,255,0),0
box 11,11,11+health,21
ink rgb(255,0,0),0
box 10,10,10+health,20
ink rgb(0,0,0),0
box 11+health,11,111,21
ink rgb(255,255,255),0
box 10+health,10,110,20
ink rgb(0,0,0),0
set cursor 35,8
print "Health"
`print stuff
ink rgb(255,255,255),0
set cursor 0,30
print " FPS: ",screen FPS()
print " X: ",x#
print " Z: ",z#
print " Ammo: ",Bullet
print " Bultimer: ",timer
`-------------COLLISION!COLLISION!COLLISION!------------------
if object collision(66,1) then camspeed#=0 else camspeed#=1.5
`drvece
if object collision(201,1) then camspeed#=0 else camspeed#=1.5
if object collision(202,1) then camspeed#=0 else camspeed#=1.5
if object collision(203,1) then camspeed#=0 else camspeed#=1.5
if object collision(204,1) then camspeed#=0 else camspeed#=1.5
if object collision(205,1) then camspeed#=0 else camspeed#=1.5
`monster and bullet , bullet first "200" , monster secound , 70
if object collision(200,70) then end
`----------------------------------------------------------------
`end loop
sync
loop
`get the heightmap
function getheightbmp(file$)
`open file
open to read 1,file$
`--------------------
`decode
read byte 1,notusefull
read byte 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
`--------------------
`Get Bitmap Width
read long 1,BmpWidth
`Get Bitmap Height
read long 1,BmpHeight
`--------------------
read word 1,notusefull
`--------------------
`Get BitDepth
read word 1,BitDepth
`--------------------
`The info contained here is not usefull.
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
`--------------------
`error check only if bitdepth=24
if BitDepth=24
ypos=BmpHeight
`Calculate If bmp required Padding
bmpwidth#=bmpwidth
evenwidth1#=(BmpWidth#*3)/4
evenwidth2=(BmpWidth*3)/4
padlen=0
if evenwidth1#<>evenwidth2
evenwidth1#=evenwidth1#-evenwidth2
padlen=4-(evenwidth1#*4)
endif
`-------------------------------------------
`create the hmap array
dim hmap(bmpwidth,bmpheight)
`-------------------------------------------
`Get color info
For Ylp=1 to BmpHeight
for Xlp=1 to Bmpwidth
`Read color values
read byte 1,blue
read byte 1,Green
read byte 1,red
`enter color info into height array
hmap(xlp,ypos)=(blue+green+red)/3
next Xlp
dec Ypos
`Padding
if padlen<>0
for padlp=1 to padlen
read byte 1,padbyte
next padlp
endif
next Ylp
endif
`close the file
close file 1
`end current function
endfunction
http://dodica.proboards75.com/index.cgi
first 20 are mods. i have 9 sofar.