I have hit a problem, and I am not sure the best way around the problem.

I have map files:-

Header of about 100 bytes, followed by up to 1000 x 1000 tiles. Each tile is 19 bytes in size.

I need to load at least 2 bytes of the map file into memory for each map, by my reckoning thats 2000000 bytes (2 Meg) of data. There could be up to 255 maps... Now this seems like an awful lot of data to be storing in memory!

The word will contain information relating to the tile, or a pointer to a player object stood there.

Can anyone think of a more practical solution to this? I don't fancy having to store all these in memory, an alternative is to read the relevant offset in each map file every time a player moves, and find another way of working out quickly where players are stood. File access will be too slow I think, especially when you might get 500 players running around one map!