when u create a box it creates it at 0,0,0 (X,Y,Z) in 3D space (which is also where the camera starts. you can then position the box somewhere in 3d space, which you will want to be infront of the camera.
maybe this will help:
sync on
autocam off
` create an array to store red, green and blue values for each box
dim boxrgb(4, 3)
for boxnumber = 1 to 4 : `for each box
for counter = 1 to 3 : `for each RGB
boxrgb(boxnumber, counter) = rnd(255)
next counter
next boxnumber
` this is just to make the code easier to read :)
objectnumber = 1
xsize = 1
ysize = 1
zsize = 1
`make a box
make object box objectnumber, xsize, ysize, zsize
`colour the object using red green and blue values from the array.
color object objectnumber, rgb(boxrgb(objectnumber, 1), boxrgb(objectnumber, 2), boxrgb(objectnumber, 3))
`position object X, Y, Z (distance into screen)
position object objectnumber, -1, -1, 10
inc objectnumber : `next object number
`make a box
make object box objectnumber, xsize, ysize, zsize
`colour the object using red green and blue values from the array.
color object objectnumber, rgb(boxrgb(objectnumber, 1), boxrgb(objectnumber, 2), boxrgb(objectnumber, 3))
`position object X, Y, Z (distance into screen)
position object objectnumber, 1, -1, 10
inc objectnumber : `next object number
`make a box
make object box objectnumber, xsize, ysize, zsize
`colour the object using red green and blue values from the array.
color object objectnumber, rgb(boxrgb(objectnumber, 1), boxrgb(objectnumber, 2), boxrgb(objectnumber, 3))
`position object X, Y, Z (distance into screen)
position object objectnumber, -1, 1, 10
inc objectnumber : `next object number
`make a box
make object box objectnumber, xsize, ysize, zsize
`colour the object using red green and blue values from the array.
color object objectnumber, rgb(boxrgb(objectnumber, 1), boxrgb(objectnumber, 2), boxrgb(objectnumber, 3))
`position object X, Y, Z (distance into screen)
position object objectnumber, 1, 1, 10
do
for objectnumber = 1 to 4 : `for each box
for counter = 1 to 3 : `for each RGB
boxrgb(objectnumber, counter) = rnd(255)
next counter
color object objectnumber, rgb(boxrgb(objectnumber, 1), boxrgb(objectnumber, 2), boxrgb(objectnumber, 3))
next objectnumber
sync
loop
it makes 4 boxes and positions them, then colours them using random rgb values. i can simplify it a bit if u don't understand the programming concepts i've used
EDIT: oops i just realised you're trying to work in 2D

.
I've heard darkbasic is very slow in 2D, and you would be better off using 3D 'planes' and positioning them right infront of the camera