Incase you're interested, here's the code for my Newton physics (Includes Delta-Time Code):
nupdate=0.1
nspeed=40000
ngravity=-4000
NDB_NewtonCreate
NDB_NewtonSetMinimumFramerate 200
NDB_SetVector 0,ngravity,0
NDB_SetStandardGravity
BallCol=NDB_NewtonCreateSphere (16,16,16)
Ball=NDB_NewtonCreateBody(BallCol)
NDB_BuildMatrix 0,0,0,0,10,0
NDB_NewtonBodySetMatrix Ball
NDB_CalculateMISphereSolid 1,32
NDB_NewtonBodySetMassMatrix Ball,1,5,5,5
NDB_NewtonBodySetAutoFreeze Ball,0
NDB_NewtonReleaseCollision BallCol
NDB_BodySetDBProData Ball,1
NDB_BodySetGravity Ball,1
LvLCol = NDB_NewtonCreateTreeCollision(1000)
Level = NDB_NewtonCreateBody(LvLCol)
do
delta# = (timer() - start#)*0.4
start# = timer()
if delta#>50 then delta#=50
dsmooth# = dsmooth#+(delta#-dsmooth#)/1.5
if dsmooth#>50 then dsmooth#=50
for t=0 to dsmooth# step 1
NDB_NewtonUpdate nupdate
if keystate(32)=1
bmovex#=cos(0-camroty)*nspeed
bmovez#=sin(0-camroty)*nspeed
endif
if keystate(30)=1
bmovex#=cos(0-camroty-180)*nspeed
bmovez#=sin(0-camroty-180)*nspeed
endif
if keystate(31)=1 and keystate(30)=0 and keystate(32)=0
bmovex#=cos(0-camroty-90)*nspeed
bmovez#=sin(0-camroty-90)*nspeed
endif
if keystate(31)=1 and keystate(30)=1 and keystate(32)=0
bmovex#=cos(0-camroty-135)*nspeed
bmovez#=sin(0-camroty-135)*nspeed
endif
if keystate(31)=1 and keystate(30)=0 and keystate(32)=1
bmovex#=cos(0-camroty-45)*nspeed
bmovez#=sin(0-camroty-45)*nspeed
endif
if keystate(17)=1 and keystate(30)=0 and keystate(32)=0
bmovex#=cos(0-camroty+90)*nspeed
bmovez#=sin(0-camroty+90)*nspeed
endif
if keystate(17)=1 and keystate(30)=1 and keystate(32)=0
bmovex#=cos(0-camroty+135)*nspeed
bmovez#=sin(0-camroty+135)*nspeed
endif
if keystate(17)=1 and keystate(30)=0 and keystate(32)=1
bmovex#=cos(0-camroty+45)*nspeed
bmovez#=sin(0-camroty+45)*nspeed
endif
if keystate(17)=0 and keystate(31)=0 and keystate(30)=0 and keystate(32)=0
bmovex#=0
bmovez#=0
endif
NDB_SetVector bmovex#,bmovey#,bmovez#
NDB_BodyAddTorque Ball
next t
sync
loop
For me, implementing Newton physics was really simple, and I only had minor difficulties in doing so. You might as well download the wrapper yourself and try it. It's great.
UNVIDIA GeFartFX 5600 Crud Edition
Featuring an unbeatable 0-1 FPS in 3DMark05!
If Return to Proxycon were a game, I would die before I saw the door open!