Total beginner, grid and cubes

Blitz3D Forums/Blitz3D Beginners Area/Total beginner, grid and cubes

tdman(Posted 2008) [#1]
Hi, I am wanting to write a puzzle game. I have had some basic experience before, but nothing like this.

I am wanting to place 100 cubes of varying colours in a 10x10 grid.

How do I start? I've so far managed to get a cube on screen, but being able to place them in a grid, and then to keep track of them, well I jsut don't know where to begin.

Thanks for your help!


Whats My Face(Posted 2008) [#2]
Here

Graphics3D 800,600,16,2
AmbientLight 255,255,255
SeedRnd(MilliSecs())

Dim cube(10,10)

For x = 1 To 10
	For y = 1 To 10
		cube(x,y) = CreateCube()
		PositionEntity cube(x,y),(x-5)*4,(y-5)*4,50
		EntityColor cube(x,y),Rnd(0,255),Rnd(0,255),Rnd(0,255)
		EntityPickMode cube(x,y),2
	Next
Next

Local camera = CreateCamera()

While Not KeyHit(1)
	
	RenderWorld()
	
	pick = CameraPick(camera,MouseX(),MouseY())
	
	If pick > 0 Then
		Text 0,0,"Cube At: " + ((EntityX(pick)/4)+5) + "," + ((EntityY(pick)/4)+5)
	Else
		Text 0,0,"No Cube Selected"
	EndIf 
	
	Flip
Wend 



tdman(Posted 2008) [#3]
Awesome, thank you! So simple in the end :)