(changed the subject) Right now each hex only contains one byte (terrain, resource and control), and one pointer to a unit (null if there's no unit in the hex). I'll probably need a few more bytes for rivers, roads and railroads.
There will surely be more action in specific parts of the map (the game is a simple online multiplayer simulation of operation Barbarossa), so splitting the map into smaller parts is something I have been thinking about. And I don't want to send the complete map to every client either. I had hopes that I could rely on windows doing the swapping for me here. Or should I do it myself? What's a sparse array? I need to do some kind of sampling to show an overview map (the map is a simple civ-like 2d map). Is mipmapping good for this? Peter From: "Chris Anderson" <[EMAIL PROTECTED]> > But do you need all of them at the same time, and are all the elements > populated? > > There are many more data structures you can use that will streamline this, > and allow yourself to have even bigger maps > > Sparse arrays can be massive as long as they contain information about only > a relatively few elements > > Breaking the map into pages will allow you to only load the areas being used > > A form of MipMapping will allow you to pan out and see the entire map by > selectively "losing" data that is irrelevant when viewed at the higher scale > (eg precise tree placements will be irrelevant when viewing a map of the > Earth..tree placements can be "promoted" to blocks or even pages with more > than 1000 trees (so you know to paint these green as they are forest areas)) > > Merak You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.