ok, when I try to complie this code, I get a windows error,, you know the one XP gives when a program has a problem ( or more likely XP has a problem :p )
ok heres the code :
Rem Project: 3 by 3D atoms
Rem Created: 31/08/2003 16:44:27
Rem ***** Main Source File *****
autocam off
`background color
draw to front
set display mode 1280,960,16
sync rate 1000
sync on
set image colorkey 100,100,100
load image "on.bmp",1
load image "off.bmp",2
make matrix 1,200,200,20,20
position matrix 1,-100,-200,-100
rem make the 3d grid
x=4 : y=4 : z=4
size=20
cam_r=175
campoint=(size*6)/2
point camera campoint,campoint,campoint
dim grid(x,y,z,10)
dim sel(3,x,16)
dim cur_sel(16)
a=1
for b=1 to 16
sel(1,1,b)=a+20000
sel(1,2,b)=a+16+20000
sel(1,3,b)=a+32+20000
sel(1,4,b)=a+48+20000
inc a
next a
a=1
for b=1 to 16
sel(2,1,b)=a+20000
sel(2,2,b)=a+1+20000
sel(2,3,b)=a+2+20000
sel(2,4,b)=a+3+20000
inc a,4
next b
a=1
for b=1 to 16
sel(3,1,b)=a+20000
sel(3,2,b)=a+4+20000
sel(3,3,b)=a+8+20000
sel(3,4,b)=a+12+20000
if b=4 or b=8 or b=12
inc a,13
else
inc a,1
endif
next b
q=10000
for a=1 to z+1
for b=1 to y+1
for c=1 to x+1
inc q
make object cube q,3
position object q,c*size,b*size,a*size
hide object q
next c
next b
next a
w=20000
for a=1 to z
for b=1 to y
for c=1 to x
inc w
make object cube w,size-2
texture object w,2
position object w,(c*size)+10,(b*size)+10,(a*size)+10
set object w,1,1,0,1,1
next c
next b
next a
numb=0 : depth=1
side=1
depth=1
do
if spacekey()=1 then inc depth,1
if mouseclick()=1 then inc side,1
if old_side<>side or old_depth<>depth then gosub reset_grid
last_depth=depth-1
if depth=5 then depth=1
if last_depth=0 then last_depth=4
if side=4 then side=1
if spacekey()=1 then repeat : wait 1 : until spacekey()=0
if mouseclick()=1 then repeat : wait 1 : until mouseclick()=0
for a=1 to x
for b=1 to y
inc numb
texture object sel(side,depth,numb),1
ghost object on sel(side,depth,numb),0
set object sel(side,depth,numb),1,1,0,1,1
dim cur_sel(numb)=sel(side,depth,numb)
next b
next a
numb=0
old_side=side
old_depth=depth
rem draw lines
ink RGB(25,37,50),0
for a=10001 to 10025
b=a+100
line object screen x(a),object screen y(a),object screen x(b),object screen y(b)
next a
for a=10001 to 10105
if a=10006 then a=10026
if a=10031 then a=10051
if a=10056 then a=10076
if a=10081 then a=10101
b=a+20
line object screen x(a),object screen y(a),object screen x(b),object screen y(b)
next a
for a=10001 to 10121 step 5
b=a+4
line object screen x(a),object screen y(a),object screen x(b),object screen y(b)
next b
s#=mousemovex()
n#=mousemovey()
if mouseclick()=2 then a#=(a#+s#)
if mouseclick()=2 then b#=(b#+n#)
position camera campoint+(sin(a#/4)*cos(b#/4)*cam_r),campoint+(sin(b#/4)*cam_r),campoint+(cos(a#/4)*cos(b#/4)*cam_r)
point camera campoint,campoint,campoint
sync
loop
reset_grid:
for z=20001 to 20064
texture object z,2
ghost object on z,0
set object z,1,1,0,0,1,0,1
next z
return
I think you may need to adjust the code a little, ie loading images.
If anyone could tell me if you get a problem too ?
and if so, maybe whats wrong with the code ? (i`m sure its ok tho ! )
if you can compile it, then I think its time to re-install DBpro ?
ok, my system, just in case it helps : ( please dont laugh! )
p3 450, 512 mb
40+30 gig Hdd
geforce 256 pro
XP os
currently running DBpro, patch 5.1
TIA, Simon