Hi. I’ve been trying to develop a 2D game. But I’m having trouble deciding how I should store data like maps and sprites. When I save a map 3x128x128 (foreground, background, and roof) to disk as xml using a xml encoder it
saves a map that’s 8 megabytes large! when I save using object serialization it’s 500 kilobytes, so I’m trying to make a decision between flexibility and space. For example, if I were to use object serialization, what if I add more information to the map, such as triggers and npcs, etc… as I add these things won’t previous class files become outdated and cause me to lose maps I’ve made?
I wonder if it’s how I store the layers, they look like this
class TileLayer {
LinkedList[][] layer;
}
I used a linked list thinking I could conserve space, is this incorrect?
One last question about game development is how should I deal with guis in fullscreen exclusive mode using java 2D?
Any help would be greatly apprechiated as always.

