Page 1 of 1

Using A 3D Array To Store Maps

Posted: Sun Apr 25, 2010 11:36 am
by davidthefat
Is this an efficient way to do it?

int Maps[Map ID][X][Y];

So the first bracket stores the map ID, then the X and the Y stores the tile ID

Re: Using A 3D Array To Store Maps

Posted: Sun Apr 25, 2010 1:04 pm
by K-Bal
This is so much out of context :lol:

Re: Using A 3D Array To Store Maps

Posted: Sun Apr 25, 2010 1:28 pm
by GroundUpEngine
dude... the KISS principle :lol:

Code: Select all

// Instead of Map ID's just use Map objects e.g.
class Map() {
  public:
    int** Data;
    Map(int _width, int _height);
    virtual ~Map();
    Render();
}

Re: Using A 3D Array To Store Maps

Posted: Tue Apr 27, 2010 5:54 pm
by XianForce
GroundUpEngine wrote:dude... the KISS principle :lol:
Gotta love that KISS =D