hello
i work on an adventure game and i am now on an
complicate point. i got my map in clusters int (20x20x3(height,ground,special )
5x5 clusters are in memory (100x100)
my first (very bad idea) was to save each cluster as seperate file
(i produce 40000 files, very bad idea)
my idea was, when the char/camera leaves the inner space the next 5 clusters
are reloaded (north,south,east,west), the files are working…but 40000 files is tooo much.
did anybody got an idea how i can fix this problem?
i think about one large file and adress direct the data (read/save) that i need
open the file…
for (int z=0;z<100;z++)
{
for (int x=0;x<100;x++)
{
file_position=((cluster_z+z)*20000)+cluster_x+x
read/write
}
}
is it possible, is it good or bad idea
and what is todo, i am not very experienced with file io stuff?
thanks for any answer 