large map file format

I am creating a game that will have a large map file that is traversed like a side scroller. Unfortunately saving the file as a png is putting it at approx 30-40mb for the picture, which is too big for eclipse to handle. I need to have the picture in the correct proportions while still being able to load it. Is there a way to compress the size of a png image without losing the proportions? I may be explaining this badly, but I have been pushing it around all day with no luck and running out of time. The map is 5600 x 4200 pixels in order to look correct.

Also, this map was created with Tiled. If there is a better way than saving it as an image, I’d love to do something that makes more sense.

Any suggestions?

Instead of using one big file, why not split it up into sections? That way you can just load junks of the map when needed, instead of trying to load a 40mb file. :slight_smile:

I suppose spritesheets are out of the question? You can’t just keep a txt telling you where to draw each tile?
Or as Regenuluz said, split it into smaller images…

This is the first time I’ve ever made something with a map larger than the screen, so I’m not really sure what is the best way to go about it. I made the map in Tiled, so I don’t know how I’d go about drawing one tile at a time. I’m not sure how I could use a sprite sheet for this, without a ton of coding telling it where to draw each tile. Splitting it up into sections might be what I have to do if I can’t figure anything else out. I was hoping to be able to see portions of the floors above and below the one the player is on, and splitting each into it’s own image might inhibit that.

If your map is grid based, I would recommend spritesheets and a txt telling the game what tile is in what place. It saves so much disk space compared to really big images, and makes the levels easier to edit.
No idea bout Tiled, but it might be able to export as a .txt? Maybe?
And then just one class to read the text files and youre away!

One question if I may, does each pixel in your image correspond to a single tile when rendered in the game? If so, how large are you rendering the tiles?

No I simply have a jpeg image of the background that I intended to move around but it ended up being too large. I either need to figure out how to use a Tiled map format in my game, or break it up into 10 blocks and use those.