SET SHADOW SHADING ON and
SET SHADOW LIGHT can help with shadow shading:
Sync On
Sync Rate 60
Autocam Off
rem Make a red image for the ground.
Create bitmap 1,16,16
ink rgb(255,0,0),0
box 0,0,16,16
get image 1,0,0,16,16,1
delete bitmap 1
rem Set light variables
LightNum=0
XPos#=100
YPos#=100
ZPos#=100
Range#=1000
rem Set the shadow light to where light 0 will be.
Set Shadow Light Lightnum,XPos#,YPos#,ZPos#,Range#
rem Position light 0 where the shadow light is.
Position light 0,XPos#,YPos#,ZPos#
rem Set light 0's range to the shadow light's range.
Set Light Range 0,Range#
rem Make a test cube.
Make object cube 1,5
rem Turn the cube's shadows on. Mesh=default mesh (-1). Shadow range = 200 (the shadow will be cast from up to 200 units away). We will use the shader (1)
Set Shadow Shading On 1,-1,200,1
rem Position the cube.
Position object 1,0,5,0
rem Make a test ground + texture it.
Make object box 2,100,1,100
texture object 2,1
rem Position the camera.
Position Camera 20,20,20
rem Loop
Do
rem Make the cube turn and stuff
ang#=wrapvalue(ang#+1)
yrotate object 1,ang#
ypos#=5+10*abs(COS(ang#))
Position object 1,0,ypos#,0
rem Control the camera (make it turn around the cube)
CamSpeed#=0.25
point camera 0,0,0
Position camera NewXValue(camera position X(),camera angle y()+90,CamSpeed#),20,NewZValue(camera position Z(),camera angle y()+90,CamSpeed#)
Sync
Loop
Here's a thread about it:
One of Many Shadow Shading Threads
There are other ways, but I like this one (just don't make your objects too big or the shadows will get all flashy from far away).