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
Using A 3D Array To Store Maps
Moderator: Coders of Rage
- davidthefat
- Chaos Rift Maniac
- Posts: 529
- Joined: Mon Nov 10, 2008 3:51 pm
- Current Project: Fully Autonomous Robot
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: California
- Contact:
Re: Using A 3D Array To Store Maps
This is so much out of context
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: Using A 3D Array To Store Maps
dude... the KISS principle
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
Gotta love that KISS =DGroundUpEngine wrote:dude... the KISS principle