Try this simple demo.
` simple spotlight demo by Green Gandalf
` this demo shows how to use a simple spotlight, but also shows that such lights don't work well
` with low poly objects
` set up the display
set display mode desktop width(), desktop height(), 32
sync on : sync rate 60 : sync
` take control of the default camera
autocam off
` create objects to be lit
make object sphere 1, 500
position object 1, 0, 0, 0
color object 1, rgb(0,255,0)
make object cube 2, 500
position object 2, 0, 0, 0
color object 2, rgb(0,255,0)
hide object 2
make object sphere 3, 500, 64, 64
position object 3, 0, 0, 0
color object 3, rgb(0,255,0)
hide object 3
` set up the default light as a spotlight
set spot light 0, 10, 25 ` increase the outer angle to, say, 60 and the cube will be lit
position light 0, -300, 300, -600
set light range 0, 2000
` turn off ambient light
set ambient light 0
` use the camera to set the light rotation
position camera light position x(0), light position y(0), light position z(0)
point camera 0, 0, 0
rotate light 0, camera angle x(), camera angle y(), camera angle z()
` put the camera back where we want it
position camera 0, 0, -750
point camera 0, 0, 0
repeat
text 40, 40, "Press 1, 2 or 3 to show sphere (1) or cube (2) or high poly sphere (3)"
select inkey$()
case "1"
show object 1
hide object 2
hide object 3
endcase
case "2"
show object 2
hide object 1
hide object 3
endcase
case "3"
show object 3
hide object 1
hide object 2
endcase
endselect
sync
until spacekey()
end
DBPro's built-in point lights and spot lights don't work very well with low poly objects. In the demo the lighting only looks OK for the high poly sphere. The reason is that the default positional lights use vertex lighting. In other words the light intensity is calculated at the vertices and then interpolation (a form of weighted averaging) is used to get the lighting intensity of points between the vertices. For the cube in the demo, each vertex is outside (or nearly outside) the spotlight's cone so the whole cube is badly lit.
Hope this helps.