Here is a very basic example:
sync on : sync rate 60
autocam off
make matrix 1,1000,1000,20,20
make object sphere 1,40,16,8 : position object 1,500,20,500
rem --- create our lock object, it doesn't have to be big
make object cube 2,1
rem --- position object within the field view of the camera and lock
position object 2,-1.25,-0.875,3
lock object on 2
rem --- now we position the camera
position camera 250,30,250 : point camera 500,30,500
repeat
if leftkey() then turn camera left 1
if rightkey() then turn camera right 1
if upkey() then move camera 1
if downkey() then move camera -1
sync
until spacekey()
end
"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)