I've made a quick example for you to look over, I hope this is close to what you were trying to achieve.
It'll be quicker if you reduce the number of cubes. I really didn't know how big you were thinking of making the game.
I hope this code point you in the right direction
Feel free to ask questions...
//************************************************
// Blocky grid level example
// For:Dark Master Ev
// By: =PRoF=
//************************************************
//************************************************
// System Stuff
//************************************************
sync on
sync rate 60
//************************************************
// Variables
//************************************************
` Define types
type blocktype
x as integer:` block co'ords. If your game is over head view, then you
y as integer:` probly won't need a y co'ord so you can delete this bit
z as integer:` block co'ords.
kind as integer :`this would be the Type of block, 0=solid, 1=drillable, 2=blast only
amount as integer :` the yield remaining, or how many units left unitl its gone
endtype
` define arrays
dim blocks(10000) as blocktype
` assign values
count=1
for x=1 to 100
for z=1 to 100
blocks(count).x=x
blocks(count).z=z
` I just assign these randomly, you may not want to do this
blocks(count).kind=rnd(2)
blocks(count).amount=rnd(100)+1
inc count
next y
next x
//************************************************
// Load/Create some graphics
//************************************************
` Normal ground
make object cube 1,10
color object 1,rgb(0,128,0)
hide object 1
` ground type 1
make object cube 2,10
color object 2,rgb(128,128,128)
hide object 2
` Ground type 2
make object cube 3,10
color object 3,rgb(255,128,0)
hide object 3
//************************************************
// Draw the level
//************************************************
for a=1 to 10000
` clone the object as needed
if blocks(a).kind=0
clone object a+3,1
endif
if blocks(a).kind=1
clone object a+3,2
endif
if blocks(a).kind=2
clone object a+3,3
endif
` position the object
position object a+3,blocks(a).x*10,0,blocks(a).z*10
next a
` position & point the cam
position camera 500,250,600
point camera 500,0,600
//************************************************
// Main Loop
//************************************************
` just waits for a key to be pressed
repeat
` some debug info
text 0,0,"fps:"+str$(screen fps())
text 0,20,"poly count:"+str$(statistic(1))
` this just updates the screen
sync
until inkey$()<>""
Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@