I made this tutorial code thing. Maybe it will help you to understand the 3D engine a little more? The backdrop has nothing to do with it.
The red bar is the X axis, the green the Y, and the blue the Z. Just copy and paste the code in the editor, and hit F5
rem Setup
Sync On
Sync Rate 60
Set Text Font "Arial"
Set Text Size 12
MaxT=11
DIM Text$(MaxT+1)
Text$(1)="Hello, and welcome to me explaining Dark Basic's 3D system. Press Enter to continue."
Text$(2)="You can easily control where you want objects to be."
Text$(3)="For example, we can easily move this cube along the X axis. If you were looking at all 3 axis straight on, the X axis would be left and right."
Text$(4)="Okay, now time for the Y axis. Looking straight on, it would be up and down."
Text$(5)="And now the Z axis. Looking at it straight on, it would be forwards and backwards."
Text$(6)="And that's really all you need to know."
Text$(7)="One can position objects via the POSITION OBJECT command. It is then when you tell the object how far on the X, Y, and Z axis you want it."
Text$(8)="Say cube's object number is 5. Here's what would happen if I wrote "+chr$(34)+"Position Object 5,100,0,100"+chr$(34)+"."
Text$(9)="And here's what would happen if I wrote "+chr$(34)+"Position Object 5,45,36,100"+chr$(34)+"."
Text$(10)="And... here's what would happen if I wrote "+chr$(34)+"Position Object 5,-45,-36,100"+chr$(34)+"."
Text$(11)="Well, that's pretty much it. The backdrop (the blue in the background) has nothing to do with it. Good luck!"
Make Matrix 1,1000,1000,10,10
Position Matrix 1,-500,0,-500
Make Object Cylinder 1,10
Scale object 1,100,100000,100
Clone Object 2,1
Clone Object 3,1
xrotate object 1,90
yrotate object 1,90
fix object pivot 1
xrotate object 3,90
color object 1,rgb(255,0,0)
color object 2,rgb(0,255,0)
color object 3,rgb(0,0,255)
Make OBject cube 5,20
t=1
repeat
Set Camera To Follow 0,0,0,CamAng#,Dist#,Height#,10,0
if t=1
Dist#=100
Height#=Object Position Y(5)+100
CamAng#=wrapvalue(CamAng#+1)
point camera 0,0,0
endif
if t=2
Dist#=100
Height#=Object Position Y(5)+100
CamAng#=wrapvalue(CamAng#+1)
point camera 0,0,0
endif
if t=3
Dist#=100
Height#=Object Position Y(5)+100
CamAng#=0
Ang#=wrapvalue(Ang#+1)
Position Object 5,300*COS(Ang#),0,0
point camera Object Position X(5),Object Position Y(5),Object Position Z(5)
Note$="Object Position X: "+str$(Object Position X(5),1)
endif
if t=4
Dist#=100
Height#=100
CamAng#=0
Ang#=wrapvalue(Ang#+1)
Position Object 5,0,300*COS(Ang#),0
point camera Object Position X(5),Object Position Y(5),Object Position Z(5)
Note$="Object Position Y: "+str$(Object Position Y(5),1)
endif
if t=5
Dist#=100
Height#=Object Position Y(5)+100
CamAng#=0
Ang#=wrapvalue(Ang#+1)
Position Object 5,0,0,300*COS(Ang#)
point camera Object Position X(5),Object Position Y(5),Object Position Z(5)
Note$="Object Position Z: "+str$(Object Position Z(5),1)
endif
if t=6
Dist#=100
Height#=Object Position Y(5)+100
CamAng#=wrapvalue(CamAng#+1)
point camera 0,0,0
Note$=""
endif
if t=7
Dist#=100
Height#=Object Position Y(5)+100
CamAng#=wrapvalue(CamAng#+1)
point camera 0,0,0
endif
if t=8
Dist#=100
Height#=Object Position Y(5)+100
CamAng#=0
Position Object 5,100,0,100
point camera Object Position X(5),Object Position Y(5),Object Position Z(5)
Note$="Object X,Y,Z Position: "+str$(Object Position X(5))+" , "+str$(Object Position Y(5))+" , "+str$(Object Position Z(5))
endif
if t=9
Dist#=100
Height#=Object Position Y(5)+100
CamAng#=0
Position Object 5,45,36,100
point camera Object Position X(5),Object Position Y(5),Object Position Z(5)
Note$="Object X,Y,Z Position: "+str$(Object Position X(5))+" , "+str$(Object Position Y(5))+" , "+str$(Object Position Z(5))
endif
if t=10
Dist#=100
Height#=Object Position Y(5)+100
CamAng#=0
Position Object 5,-45,-36,100
point camera Object Position X(5),Object Position Y(5),Object Position Z(5)
Note$="Object X,Y,Z Position: "+str$(Object Position X(5))+" , "+str$(Object Position Y(5))+" , "+str$(Object Position Z(5))
endif
ink rgb(155,0,0),0
Box 0,Screen Height()-40,Screen Width(),Screen Height()
ink rgb(255,255,255),0
Center Text Screen Width()/2,Screen Height()-40,Text$(t)
Center Text Screen Width()/2,40,Note$
if returnkey()
inc t,1
while returnkey() : endwhile
endif
Sync
until t=Maxt+1
And here's something for you to toy around with after you've watched the above tutorial thingy. Try changing the XYZ values in the POSITION OBJECT command. Again, just copy and paste this code into the editor and hit F5
rem Setup
Sync On
Sync Rate 60
rem Make a grid.
Make Matrix 1,1000,1000,10,10
Position Matrix 1,-500,0,-500
rem Make the 3 axis.
Make Object Cylinder 1,10
Scale object 1,100,100000,100
Clone Object 2,1
Clone Object 3,1
xrotate object 1,90
yrotate object 1,90
fix object pivot 1
xrotate object 3,90
color object 1,rgb(255,0,0)
color object 2,rgb(0,255,0)
color object 3,rgb(0,0,255)
REM OKAY THIS IS THE PART YOU CHANGE. THE CHANGING THE NUMBERS IN THE "POSITION OBJECT" COMMAND AND SEE WHAT HAPPENS!
rem You could easily replace this cube with your own custom object if you wanted to.
Make OBject cube 4,20
Position Object 4,100,0,100
Position Camera -100,100,-100
point camera 0,0,0
do
text 0,0,"Use the arrow keys and the mouse to move. Have a look, see where your cube ended up :)"
if upkey() then move camera 4
if downkey() then move camera -4
rotate camera camera angle x()+mousemovey()/8,camera angle y()+mousemovex()/8,0
sync
loop