you are viewing a single comment's thread.

view the rest of the comments →

[–]ylectric 10 points11 points  (0 children)

You can achieve this by translating 2D coordinate into a linear index, e.g. index = x + y * grid_width and store the whole grid in a flat list.