WARNING! CREATES .PNGS AT ABOUT A MB EVERY 100 FRAMES!
Rem Project: cityscape
Rem Created: 02/04/2006 18:39:23
Rem ***** Main Source File *****
sync rate 60 : sync on
NDB_NewtonCreate
NDB_SetVector 0.0, -50.0, 0.0
NDB_SetStandardGravity
col = NDB_NewtonCreateBox( 128, 1.0, 128 )
Floored = NDB_NewtonCreateBody( col )
NDB_BuildMatrix 0.0, 0.0, 0.0, 0, -1, 0
NDB_NewtonBodySetMAtrix Floored
make object box 1,128,1,128
position object 1, 0, -1.0, 0
scale object texture 1, 10.0, 10.0
texture object 1, 1
NDB_NewtonBodySetDestructorCallback Floored
NDB_BodySetDBProData Floored, 1
FloorObj = 1
col = NDB_NewtonCreateBox( 128, 1.0, 128 )
Floored = NDB_NewtonCreateBody( col )
NDB_BuildMatrix 45.0, 0.0, 0.0, 0, -1, -64
NDB_NewtonBodySetMAtrix Floored
make object box 2,128,1,128
position object 2, 0, -1.0, -64
rotate object 2,45,0,0
NDB_NewtonBodySetDestructorCallback Floored
NDB_BodySetDBProData Floored, 2
col = NDB_NewtonCreatesphere( 16, 16, 16 )
Floored = NDB_NewtonCreateBody( col )
NDB_BuildMatrix 0.0, 0.0, 0.0, 0, 17, -48
NDB_NewtonBodySetMAtrix Floored
NDB_CalculateMIsphereSolid 275, 16
NDB_NewtonBodySetMassMatrix floored, 275
NDB_NewtonReleaseCollision Col
make object sphere 3,32
position object 3, 0, 17, -48
NDB_NewtonBodySetDestructorCallback Floored
NDB_BodySetDBProData Floored, 3
NDB_BodySetGravity floored, 1
NDB_SetVector 0, 0,1000
NDB_NewtonBodySetVelocity floored
autocam off
b=3
for fl = 0 to 3
make object box b+1,30,1,2 : position object b+1,0,fl*8,20 : newtonbox(b+1,0,fl*8,20,30,1,2,25)
make object box b+2,30,1,2 : position object b+2,0,fl*8,-20 : newtonbox(b+2,0,fl*8,-20,30,1,2,25)
make object box b+3,2,1,30 : position object b+3,20,fl*8,0 : newtonbox(b+3,20,fl*8,0,2,1,30,25)
make object box b+4,2,1,30 : position object b+4,-20,fl*8,0 : newtonbox(b+4,-20,fl*8,0,2,1,30,25)
make object box b+5,5,7,5 : position object b+5,18,(fl+0.5)*8,18 : newtonbox(b+5,18,(fl+0.5)*8,18,5,7,5,25)
make object box b+6,5,7,5 : position object b+6,18,(fl+0.5)*8,-18 : newtonbox(b+6,18,(fl+0.5)*8,-18,5,7,5,25)
make object box b+7,5,7,5 : position object b+7,-18,(fl+0.5)*8,18 : newtonbox(b+7,-18,(fl+0.5)*8,18,5,7,5,25)
make object box b+8,5,7,5 : position object b+8,-18,(fl+0.5)*8,-18 : newtonbox(b+8,-18,(fl+0.5)*8,-18,5,7,5,25)
make object box b+9,6,1,6 : position object b+9,18,(fl)*8,18 : newtonbox(b+9,18,(fl)*8,18,6,1,6,25)
make object box b+10,6,1,6 : position object b+10,18,(fl)*8,-18 : newtonbox(b+10,18,(fl)*8,-18,6,1,6,25)
make object box b+11,6,1,6 : position object b+11,-18,(fl)*8,18 : newtonbox(b+11,-18,(fl)*8,18,6,1,6,25)
make object box b+12,6,1,6 : position object b+12,-18,(fl)*8,-18 : newtonbox(b+12,-18,(fl)*8,-18,6,1,6,25)
make object box b+13,4,7,4 : position object b+13,9,(fl+0.5)*8,9 : newtonbox(b+13,9,(fl+0.5)*8,9,4,7,4,25)
make object box b+14,4,7,4 : position object b+14,9,(fl+0.5)*8,-9 : newtonbox(b+14,9,(fl+0.5)*8,-9,4,7,4,25)
make object box b+15,4,7,4 : position object b+15,-9,(fl+0.5)*8,9 : newtonbox(b+15,-9,(fl+0.5)*8,9,4,7,4,25)
make object box b+16,4,7,4 : position object b+16,-9,(fl+0.5)*8,-9 : newtonbox(b+16,-9,(fl+0.5)*8,-9,4,7,4,25)
make object box b+17,30,1,30 : position object b+17,0,(fl)*8,0 : newtonbox(b+17,0,(fl)*8,0,40,1,30,10)
inc b,20
for a=-16 to 12 step 4
if a>-16
make object box b,1,7,1 : position object b,a,(fl+0.5)*8,20 : newtonbox(b,a,(fl+0.5)*8,20,1,7,1,15)
make object box b+1,1,7,1 : position object b+1,a,(fl+0.5)*8,-20 : newtonbox(b+1,a,(fl+0.5)*8,-20,1,7,1,15)
make object box b+2,1,7,1 : position object b+2,20,(fl+0.5)*8,a : newtonbox(b+2,20,(fl+0.5)*8,a,1,7,1,15)
make object box b+3,1,7,1 : position object b+3,-20,(fl+0.5)*8,a : newtonbox(b+3,-20,(fl+0.5)*8,a,1,7,1,15)
endif
make object box b+4,3,7,0.25 : position object b+4,a+2,(fl+0.5)*8,20 : ghost object on b+4 : newtonbox(b+4,a+2,(fl+0.5)*8,20,3,7,0.25,5)
make object box b+5,3,7,0.25 : position object b+5,a+2,(fl+0.5)*8,-20 : ghost object on b+5 : newtonbox(b+5,a+2,(fl+0.5)*8,-20,3,7,0.25,5)
make object box b+6,0.25,7,3 : position object b+6,20,(fl+0.5)*8,a+2 : ghost object on b+6 : newtonbox(b+6,20,(fl+0.5)*8,a+2,3,7,0.25,5)
make object box b+7,0.25,7,3 : position object b+7,-20,(fl+0.5)*8,a+2 : ghost object on b+7 : newtonbox(b+7,-20,(fl+0.5)*8,a+2,3,7,0.25,5)
inc b,8
next a
next fl
time# = NDB_GetElapsedTimeInSec()
time# = NDB_GetElapsedTimeInSec()
do
time# = NDB_GetElapsedTimeInSec()
NDB_NewtonUpdate time#
position camera 64,8,-16
point camera object position x(3),8,object position z(3)
get image 50,0,0,320,240,1
save image str$(frames)+".PNG",50
inc frames
set cursor 1,1
print frames
sync
loop
function newtonbox(obj,posx#,posy#,posz#,sizex#,sizey#,sizez#,mass#)
Col = NDB_NewtonCreateBox(sizex#, sizey#, sizez#)
Body = NDB_NewtonCreateBody(Col)
NDB_BuildMatrix 0, 0, 0, posx#, posy#, posz#
NDB_NewtonBodySetMatrix Body
NDB_CalculateMIBoxSolid mass#, sizeX#, sizey#, sizez#
NDB_NewtonBodySetMassMatrix Body, mass#
NDB_NewtonReleaseCollision Col
NDB_BodySetDBProData Body, obj
NDB_NewtonBodySetDestructorCallback Body
NDB_BodySetGravity Body, 1
endfunction
Requires Newton Wrapper.
To watch saved video, sort the images by modified date, use the XP image previewer, and hold right.
Creates a building and destroys it with a cannonball. No media.
At least farting ferrets are better than stinky stoats.