FOV demo, find the five dots on the object using the arrowkeys or the mouse, to look closer use the mouse wheeel to zoom in or out.
Rem Project: fovdemo
Rem Created: 29/03/2008 05:53:54
Rem ***** Main Source File *****
sync on
sync rate 60
autocam off
position camera 0,0,0,-170
rem set camera positions
camera_x = 0
camera_y= 0
camera_z= -170
rem make an image to find 5 dots
box 0,0,screen width(),screen height(),RGB(0,255,255),RGB(0,255,255),RGB(0,255,255),RGB(0,255,255)
for i= 1 to 4
dot rnd(screen width()),rnd(screen height()),rgb(rnd(255),rnd(255),rnd(255))
next i
dot screen width()/2,screen height()/2,rgb(0,0,0)
get image 1,0,0,screen width(),screen height(),1
rem make object and put image on it
make object plain 1,200,200,1
texture object 1,1
rem set fov and put mouse in center of screen
cz=90
position mouse screen width()/2,screen height()/2
do
rem load mouse
mx=mousex()
my=mousey()
mz=mousez()
if leftkey() = 1 or mx< 304
if camera_x =>-125
camera_x = camera_x - 1 : rem move amount
endif
endif
if rightkey() = 1 or mx> 336
if camera_x =<125
camera_x = camera_x + 1
endif
endif
if upkey() = 1 or my<225
if camera_y =< 90
camera_y = camera_y + 1 : rem move amount
endif
endif
if downkey() = 1 or my>250
if camera_y => -90
camera_y = camera_y - 1
endif
endif
rem move camera
position camera 0, camera_x, camera_y, camera_z
rem change fov with the mouse wheel value
set camera fov cz-(mz/64)
rem stop mouse wheel zooming in and out to far
if cz-(mz/64)<10 then oldmz=5160/64:set camera fov cz-oldmz
if cz-(mz/64)>90 then oldz=-0 : set camera fov cz-oldz
rem mouse in side the circle on movement
circle screen width()/2,screen height()/2,15
center text screen width()/2,0,"find the five dots."
center text screen width()/2,10,"Zoom in/out with mouse wheel."
center text screen width()/2,20,"use arrow keys or mouse to move box."
sync
loop
Dark Physics makes any hot drink go cold.