EDIT* Apologies, this code is for db pro
Hi all
I thought I would post this code snippet up showing how to do shadow volumes, it is really simple at the end of the day, but cool none the less, I posted in the newcomers corner regarding this as I needed help on it. Nobody could help in the time-frame that I got it working myself.
So I decided to post it here for everyone to benefit from.
Arrow keys move the point light position, space bar rotates the cube.
There is a example page in the db pro help too, the only difference is I slaved to get this working without consulting it

Anyway
You live you learn.
sync on
autocam off
rem Floor
make object cube 100,10
color object 100,rgb(255,255,255)
position object 100,0,-3,5
scale object 100,300,50,300
set ambient light 10
set point light 0,0,20,0
rem Shadow Caster
make object cube 101,5
position object 101,0,5,5
rem Light object
make object cube 102,1
position object 102,0,20,5
set normalization on
set shadow shading on 101
set object light 102, 1
rem Position Variables
xpos#=0
zpos#=0
rotx#=0
rem Camera
make camera 1000
position camera 1000,0,30,30
point camera 1000,0,0,0
do
if leftkey()=1 then xpos# = xpos# + .1
if rightkey()=1 then xpos# = xpos# - .1
if upkey()=1 then zpos# = zpos# - .1
if downkey()=1 then zpos# = zpos# + .1
if spacekey()=1 then rotx# = rotx#+1
position object 102,xpos#,20,zpos#
position light 0,xpos#,20,zpos#
rotate object 101,0,rotx#,0
sync
loop