Anyone know the best way for storing a map of tiles, lets say a max of 100 by 100 tiles with 2 layers, where all the info for the tiles is in strings in a database?
as it is that would be 10,000 characters if each string were only 1 letter long. I'm afraid that this will make for too much wasted space, and also very rough to load the map.
The undermap which is just tiles could store them by their ID, so that map would be smaller, the upper map could store with ID too, but also needs to denote from what database to load from, NPC's, Doors, Chests, and other such things
something as simple as 1-101 would be fine, however, that is still 5 characters long and could be longer (or shorter) if the numbers get larger... if I end up with over 999 maps or NPCs or Items for example. Especially when you consider that all things that generate text are held as NPCs (pictures, points of interest)
If anyone has any bright ideas, that would be great. I'm not opposed to things that are creative or require more code to decifer.
I was thinking about holding them in a text field, but 10,000 items would mean I couldn't ever stray from 1-100@1-100@1-100 very much into 1-1000 or it will over load the 65,000 char limit pretty fast. being that 1-100@ = 6 characters which makes for 60,000 total and 1-1000@ = 7 and makes for 70,000 I could get away with it only by luck, if I had a more than 1000'th item heavy map, it would crash bad... I don't want to play with luck. and I'd like to not have to lower the map's size... although if you think dropping to 75 by 75 is the only solution, I will have to.
as it is that would be 10,000 characters if each string were only 1 letter long. I'm afraid that this will make for too much wasted space, and also very rough to load the map.
The undermap which is just tiles could store them by their ID, so that map would be smaller, the upper map could store with ID too, but also needs to denote from what database to load from, NPC's, Doors, Chests, and other such things
something as simple as 1-101 would be fine, however, that is still 5 characters long and could be longer (or shorter) if the numbers get larger... if I end up with over 999 maps or NPCs or Items for example. Especially when you consider that all things that generate text are held as NPCs (pictures, points of interest)
If anyone has any bright ideas, that would be great. I'm not opposed to things that are creative or require more code to decifer.
I was thinking about holding them in a text field, but 10,000 items would mean I couldn't ever stray from 1-100@1-100@1-100 very much into 1-1000 or it will over load the 65,000 char limit pretty fast. being that 1-100@ = 6 characters which makes for 60,000 total and 1-1000@ = 7 and makes for 70,000 I could get away with it only by luck, if I had a more than 1000'th item heavy map, it would crash bad... I don't want to play with luck. and I'd like to not have to lower the map's size... although if you think dropping to 75 by 75 is the only solution, I will have to.