Re: Large map arrays in Python?
I've been considering how to go about this, and here's what I came up with:
My map has a parser already built in. Since all my regions are going to be 100 x 100 x 100, I can potentially make a single list of such size and then store all the other entries in a dictionary with the region as the key, i.e, 0 for 0 to 100 on x y and z and 1 for 101 to 200, and a list of all the lines that qualify as the value of that key. Here is my issue: I still store textual information for the map in memory. Granted, it is significantly less than my earlier issue of 1.2 or so gigs of zeros, but still. I could, potentially, only store the index of where the lines are so I could just seek to them when parsing the given tiles, but if my files are encrypted, I am not sure as to how feasible it would be to open the file, unencrypt it, parse it, and then close it if a player is within, say, 5 tiles of a region boundary.
That brings me to the next question: Why would I want to load the next region while the player is still on the edge of another one? To put it in numbers, why would I choose to load the next region when the player is at 100 100 100 and not at 101 101 101?
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector