Being able to integrate terrain into Dark Physics is made very simple and only takes a few command calls. Here's a screenshot and code that demonstrate a collection of spheres being dropped onto a terrain:
` set up display and camera
sync on
backdrop on
autocam off
set camera range 0.5, 30000
phy start
` set the directory to media
set dir "media"
load image "final.bmp", 1
load image "detail.tga", 2
make object terrain 1
set terrain heightmap 1, "map.bmp"
set terrain scale 1, 3, 0.6, 3
set terrain split 1, 16
set terrain tiling 1, 4
set terrain light 1, 1, -0.25, 0, 1, 1, 0.78, 0.5
set terrain texture 1, 1, 2
build terrain 1
phy make rigid body static terrain 1
` load our skybox
load object "skybox2.x", 200
set object light 200, 0
set object texture 200, 3, 1
position object 200, 1000, 2000, 4000
scale object 200, 30000, 30000, 30000
` reset the directory
set dir ".."
position camera 57.5, 621.4, -82.79
rotate camera 55.59, 35.2, 0
` make the spheres
x = 440
y = 500
z = 340
for a = 300 to 500
make object sphere a, 20
position object a, x, y, z
color object a, rgb( rnd( 255 ), rnd( 255 ), rnd( 255 ) )
set object specular a, rgb ( rnd ( 255 ), rnd ( 255 ), rnd ( 255 ) )
set object specular power a, 255
set object ambient a,0
phy make rigid body dynamic sphere a
y = y + 30
next a
load image "logo.png", 100000
sprite 1, 0, 600 - 60, 100000
do
phy update
sync
loop