perhaps this:
// Project: lightexample
// Created: 2016-06-16
// set window properties
SetWindowTitle( "lightexample" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
global player=2
init()
global CameraDistance#=1
do
setcameraposition(1,getobjectx(player),getobjecty(player)+1,getobjectz(player)+CameraDistance#*3)
setcameralookat(1,getobjectx(player),getobjecty(player),getobjectz(player),0)
setpointlightposition(1,getobjectx(player),getobjecty(player)+2,getobjectz(player))
Print( ScreenFPS() )
Sync()
loop
function init()
setclearcolor(0,0,0)
clearscreen()
SetAmbientColor( 20,20,20 )
SetSunActive(0)
CreatePointLight( 1, 0, 0, 0, 35, 255, 0,0 )
createobjectbox(1,10,1,10)
setobjectposition(1,0,0,0)
setobjectcolor(1,0,255,0,255)
createobjectsphere(player,1,32,32)
setobjectposition(player,0,1,0)
setobjectcolor(player,255,0,0,255)
endfunction
Hail to the king, baby!