A simple Find The Ball game... really hard. search around with the arrow keys and try to find a little ball moving around. If you find ten of them you win.
nextmove = 20
score = 0
RANDOMIZE TIMER()
SYNC ON
SYNC RATE 80
BACKDROP ON
SET CAMERA RANGE 1,5000
FOG ON
FOG DISTANCE 10000
FOG COLOR RGB(128,128,128)
COLOR BACKDROP RGB(100,75,150)
MAKE MATRIX 1, 10000, 10000, 10, 10
LOAD IMAGE "grass03.bmp",1
PREPARE MATRIX TEXTURE 1, 1, 1, 1
FILL MATRIX 1,0,1
UPDATE MATRIX 1
LOAD IMAGE "ch01.bmp",2
MAKE OBJECT SPHERE 10,25
TEXTURE OBJECT 10,2
POSITION OBJECT 10,100,0,100
SET OBJECT COLLISION TO SPHERES 10
LOAD IMAGE "c01.bmp",3
q = 1
MAKE OBJECT SPHERE 1,13
TEXTURE OBJECT 1,3
X1# = rnd(10000)
Z1# = rnd(10000)
Y1# = Get Ground Height(1,X1#,Z1#)
POSITION OBJECT 1,X1#,Y1#+12.5,Z1#
SET OBJECT COLLISION TO SPHERES 1
POSITION CAMERA 0, 200, -400
RANDOMIZE MATRIX 1,275
UPDATE MATRIX 1
DO
AngleY# = object angle Y(10)
If Upkey()=1
XTest# = Newxvalue(X#,AngleY#,20)
ZTest# = Newzvalue(Z#,AngleY#,20)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
Move object 10,10
Endif
Endif
If Leftkey()=1 then Yrotate object 10,Wrapvalue(AngleY#-5)
If Rightkey()=1 then Yrotate object 10,Wrapvalue(AngleY#+5)
X# = Object position x(10)
Z# = Object position z(10)
Y# = Get Ground Height(1,X#,Z#)
Position object 10,X#,Y#+12.5,Z#
CameraZ# = Newzvalue(Z#,AngleY#-180,100)
CameraX# = Newxvalue(X#,AngleY#-180,100)
CameraY# = Get Ground Height(1,CameraX#,CameraZ#)
Position camera CameraX#,CameraY#+50,CameraZ#
Point camera X#,Y#+25,Z#
IF nextmove = 30
rndmove = rnd(4)
nextmove = 1
ENDIF
if rndmove = 1
X1# = X1# + 5
ENDIF
if rndmove = 2
X1# = X1# - 5
ENDIF
if rndmove = 3
Z1# = Z1# + 5
ENDIF
if rndmove = 4
Z1# = Z1# - 5
ENDIF
IF OBJECT COLLISION(10,0)>0
score = score + 1
X1# = rnd(10000)
Z1# = rnd(10000)
Y1# = Get Ground Height(1,X1#,Z1#)
POSITION OBJECT 1,X1#,Y1#+12.5,Z1#
ENDIF
Y1# = Get Ground Height(1,X1#,Z1#)
XTest1# = Newxvalue(X1#,AngleY1#,20)
ZTest1# = Newzvalue(Z1#,AngleY1#,20)
If XTest1#>0 and XTest1#<10000 and ZTest1#>0 and ZTest1#<10000
POSITION OBJECT 1,X1#,Y1#+12.5,Z1#
Endif
if score = 10 then goto end
nextmove = nextmove + 1
SYNC
LOOP
end:
set text font "arial"
INK RGB(255,0,150),0
text 1,1,"YOU WIN!!!"
wait 3000
end
and... the images
I updated it. Now You can Choose The Difficulty!
"If the shoe fits, It must be your size"
"Never name a pig you are going to eat"
"It is easier to hide intelligance than it is to hide Stupidity"