Ok. Probably should have seen this one LONG before now..
If you don't specifically tell DBPro that light 0 is a POINT LIGHT then it seems to sit at 0,0,0 and act as a sort of directional ambient light. Other light numbers don't do this, and start out as a point light as soon as you make it, but not light 0.
Here's a demo showing how I found this out.
It starts out just using light 0 with no modification. You can see as the "Sun" comes up the lighting doesn't change.
Then uncomment line 35 and run it again.
set display mode desktop width(), desktop height(), 32, 0
set window off
sync on : sync rate 0
set normalization on
global factor# as float
global last# as float
make object cube 1, 1
set object normals 1
set object light 1, 1
position object 1, 0, 0, 5000
make object sphere 2, 1
set object light 2, 0
make object plane 3, 50, 50
set object normals 3
set object light 3, 1
xrotate object 3, 90
position object 3, 0, -1, 5000
position camera 0, -15, 0, 4990
point camera 0, 0, 0, 5000
Light = 0
if light exist(Light) = 0
make light Light
endif
// Comment this line to see that light 0 is an immovable light
// that resides at 0,0,0 and acts as an Ambient light source.
`set point light Light, 0, 0, 5000
while not escapekey()
tbm_Update()
text 10, 10, "Use arrow keys to move camera"
text 10, 30, "Time : "+str$(wt#,2)
wt# = wt# + 0.5 * factor#
if wt# > 23.99 then wt# = 0.0
lx# = wrapvalue((wt# * 15.0))
ly# = wrapvalue((wt# * 15.0) - 180.0)
position light Light, sin(lx#) * 10.0, cos(ly#) * 10.0, 5000.0
position object 2, light position x(Light), light position y(Light), light position z(Light)
control camera using arrowkeys 0, 3 * factor#, 10 * factor#
sync
endwhile
end
function tbm_Update()
Diff# = timer() - last#
last# = timer()
factor# = Diff# / 1000.0
endfunction
