I need a data structure for map in rogue like game
Each cell should contain array of objects. Map will have big dimensions, but contents of cell with specified coordinates should be accessible very fast. Map should be partially serializable (2kx4k map, I want to read only tiles from (3,4) to (40,20)).
Best option I have now is NSMutableDictionary with coords as keys and NSMutableSets as filler of non-empty cells. But I'm not sure about speed of very frequent operation: reading from this map portion of cells for drawing to screen. May be I should store pointers for neighborhood cells in each cell?
Target platform - Objective-C/iOS/Cocos2d
Is there any solutions on Objective-C (or may be even libraries for Cocos2d framework) about that?