I was trying to have massive arrays for a semi-DF clone game, but I always have problems when I go over certain sizes...

for example:

//this works
var localmap[8192][8192][2];

//this just never starts till I get a crash when engine is trying to open
var localmap[16384][16384][2];


If I change variable type I can get bigger sizes but still have problems:

//this works:
char localmap[16384][16384][2];

//this just crashes:
char localmap[32768][32768][2];


I have tried setting nexsus from 30 to 80 and 200, but no option seem to have any effect on what size arrays I can have!

Mabe I am doing it wrong?


I have thought of trying other wierd stuff to be able to load all the data I need, like for example using an image instead and treat every pixel as an x/y of the array and rgb as three char variables for each.
Essentially an image would be the same as an array like this one:
char localmap[x][y][3]
But it would have to be a gigantic image and I imagine there is also a limit to loading that?

But I would prefer to avoid this approach as ideally I would like to have a little more info and RGB+A is much more limited than something like this:

typedef struct TILE
{
char type;
short info;
}TILE;

TILE localmap[localsize][localsize][2];

Anyone's thoughts on this? has anyone ever tried to use arrays this big? How did you get around this?


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1