I thought of this idea when i was just fiddling around with some things.
Lets see what kind of physics effects people can make in dbc.
It can be as easy as just making something jump by simulating gravity like this-
sync on : sync rate 200
cls rgb(0,100,0)
get image 1,1,1,2,2
make matrix 1,1000,1000,40,40
prepare matrix texture 1,1,1,1
make object cube 1,10
color object 1,rgb(255,0,0)
position object 1,0,5,0
do
position camera object position x(1),object position y(1)+100,object position z(1)-100
point camera object position x(1),object position y(1),object position z(1)
if upkey()=1 then position object 1,object position x(1),object position y(1),object position z(1)+1
if downkey()=1 then position object 1,object position x(1),object position y(1),object position z(1)-1
if rightkey()=1 then position object 1,object position x(1)+1,object position y(1),object position z(1)
if leftkey()=1 then position object 1,object position x(1)-1,object position y(1),object position z(1)
if air=0
if spacekey()=1 then air=1
endif
if air=1 then jumptime=jumptime+1
if jumptime=25
air=2
jumptime=0
endif
if air=1 then position object 1,object position x(1),object position y(1)+1,object position z(1)
if air=2
if get ground height(1,object position x(1),object position z(1))>object position y(1)-10
air=0
else
position object 1,object position x(1),object position y(1)-1,object position z(1)
endif
endif
sync
loop
or something as complicated or even more complicated then simulating water effects like this-
sync on : sync rate 200 : autocam off
Water:
hide mouse
cls rgb(0,0,100) : for t=0 to 100 : for o=0 to 100 : ink rgb(0,0,rnd(255)),0 : dot o,t : next o : next t : get image 1,1,1,2,2
cls : for t=0 to 100 : for o=0 to 100 : ink rgb(rnd(100)+100,rnd(100)+100,rnd(100)+100),0 : dot o,t : next o : next t : get image 2,0,0,100,100
dim grid1(40,40):dim grid2(40,40):dim tempgrid(40,40):dim velocity(40,40):dim smoothed(40,40)
color backdrop 0
set point light 0,0,0,0 : color light 0,rgb(255,255,0)
rem Make normal light
set ambient light 50
color backdrop rgb(0,0,32)
set point light 0,250,100,250
rem Make shadow light
make light 1
if light exist(1)=1
set spot light 1,0,90
position light 1,250,100,250
point light 1,250,0,250
color light 1,-255,-255,-255
endif
set light range 1,100000
position light 1,0,0,0
make matrix 1,1000,1000,40,40
position matrix 1,0,0,0
make matrix 2,3000,3000,30,30
position matrix 2,-1000,5,-1000
prepare matrix texture 1,1,1,1
prepare matrix texture 2,2,1,1
randomize matrix 2,10
fog on:fog distance 2000
for x=11 to 19
for z=11 to 19
set matrix height 2,x,z,-200
next z
next x
for x=0 to 30
for z=0 to 10
set matrix height 2,x,z,rnd(200)
next z
next x
for x=0 to 10
for z=0 to 30
set matrix height 2,x,z,rnd(200)
next z
next x
for x=0 to 30
for z=20 to 30
set matrix height 2,x,z,rnd(200)
next z
next x
for x=20 to 30
for z=0 to 30
set matrix height 2,x,z,rnd(200)
next z
next x
for x=0 to 40
for z=0 to 40
set matrix normal 1,x,z,0,0.9-(rnd(5)/10.0),0
next z
next x
for x=0 to 30
for z=0 to 30
set matrix normal 2,x,z,0,0.9-(rnd(5)/10.0),0
next z
next x
ghost matrix on 1
position camera 500,500,-300
point camera 500,0,500
do
for x=0 to 40
for z=0 to 40
grid1(x,z)=rnd(5)
set matrix height 1,x,z,grid1(x,z)
next z
next x
for t=1 to 2 : update matrix t : next t
position mouse 320,240
rem Use MOUSEMOVE to alter camera angles
cx#=wrapvalue(cx#+mousemovey())
cy#=wrapvalue(cy#+mousemovex())
rotate camera cx#,cy#,0
rem Simple movement
if upkey()=1 then move camera 25
if downkey()=1 then move camera -25
if spacekey()=1
repeat
until spacekey()=0
onum=onum+1
wata(onum,20,(rnd(34)+3)*25,1000,(rnd(34)+3)*25)
endif
color backdrop rgb(0,0,32)
sync
loop
function wata(onum,size,ox,oy,oz)
movement=1
ch=0
speed=10
make object sphere onum,size
color object onum,rgb(rnd(100)+100,rnd(100)+100,rnd(100)+100)
position object onum,ox,oy,oz
repeat
point light 1,object position x(onum),object position y(onum),object position z(onum)
position light 1,0,100,0
if object position y(onum)-10<=0
if speed=1
else
speed=speed-1
endif
if speed=4
for x=0 to 40
for z=0 to 40
grid1(x,z)=0
set matrix height 1,x,z,grid1(x,z)
next z
next x
grid1(object position x(onum)/25,object position z(onum)/25)=-400
endif
if object position y(onum)-10<=-200
movement=0
else
position object onum,object position x(onum),object position y(onum)-speed,object position z(onum)
endif
else
position object onum,object position x(onum),object position y(onum)-speed,object position z(onum)
endif
for x = 1 to 39
for y = 1 to 39
velocity(x,y) = grid2(x, y) - ((grid2(X, Y))*2)
smoothed(x,y) = (grid1(X - 1, Y) + grid1(X + 1, Y) + grid1(X, Y - 1) + grid1(x, y + 1) + grid1(X + 1, Y - 1) + grid1(X - 1, Y + 1) + grid1(X + 1, Y + 1) + grid1(X - 1, Y - 1))/8
grid2(x, y) = smoothed(x,y) * 2 + velocity(x,y)
grid2(x, y) = grid2(x, y) * 0.95
if grid1(x,y)=0 then grid1(x,y)=rnd(5)
set matrix height 1,x,y,grid1(x,y)
next y
next x
for x = 1 to 39
for y = 1 to 39
tempgrid(x,y)=grid2(x,y)
grid2(x,y)=grid1(x,y)
grid1(x,y)=tempgrid(x,y)
next y
next x
update matrix 1
position mouse 320,240
rem Use MOUSEMOVE to alter camera angles
cx#=wrapvalue(cx#+mousemovey())
cy#=wrapvalue(cy#+mousemovex())
rotate camera cx#,cy#,0
rem Simple movement
if upkey()=1 then move camera 25
if downkey()=1 then move camera -25
sync
until movement=0
endfunction
There's only one rule though, no outside media.