grid movement

Blitz3D Forums/Blitz3D Beginners Area/grid movement

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Use and array of types ... a very basic example

Type Tile
 field ID
 field Otherstuff
 field etc
end type

const GridSize = 50
const Layers = 3

Dim Grid.Tile( GridSize-1, GridSize-1, Layers )

Restore GridData
for x = 0 to GridSize-1
  for y = 0 to GridSize - 1
       Grid( x, y,0 ) = new Tile
       Read Grid( x, y,0 )\ID 
       Read Grid( x, y,0 )\OtherStuff   
       Read Grid( x, y,0 )\etc
  next
next

.GridData
data .........



To be honest if you're stuck at this part I'd suggest something more simple.

Stevie