Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to implement a grid table include row, column like this:

GridTable = {
  [row] = { 
[column] = { location = {x,y} }}
}

Set the row = 200, column = 200, to initlize the talbe in the for loop

for i=0, row do
    GridTable[i] = {}
    for j=0, column do
      GridTable[i][j] = { location = {x,y} }
    end
end

This initlization take a lot of time.. Do you guys got any new way to get the 2D Array done?

share|improve this question
    
"Takes a long time" in comparison to what? Have you profiled it? –  Anko Sep 6 '13 at 8:07
    
Programming questions not specific to game development should be asked on Stackoverflow.com. –  Byte56 Sep 6 '13 at 13:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.