Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (602)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  large map file format  (Read 655 times)
0 Members and 1 Guest are viewing this topic.
Offline herah

Senior Newbie

« Posted 2013-03-23 23:24:00 »

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?
Offline Regenuluz
« Reply #1 - Posted 2013-03-23 23:33:17 »

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. Smiley
Offline iandioch

Senior Newbie

Medals: 1

Make bad games. Don't take life seriously. Turtles

« Reply #2 - Posted 2013-03-23 23:37:15 »

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...

You approach the entrance to THE WILDS. A man wearing nothing but a hat greets you with an enthusiastic handshake.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline herah

Senior Newbie

« Reply #3 - Posted 2013-03-23 23:39:58 »

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.
Offline iandioch

Senior Newbie

Medals: 1

Make bad games. Don't take life seriously. Turtles

« Reply #4 - Posted 2013-03-23 23:48:37 »

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!

You approach the entrance to THE WILDS. A man wearing nothing but a hat greets you with an enthusiastic handshake.
Offline tyeeeee1
« Reply #5 - Posted 2013-03-24 00:12:44 »

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?
Offline herah

Senior Newbie

« Reply #6 - Posted 2013-03-24 17:15:33 »

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.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Jesse (15 views)
2015-07-29 04:35:27

Riven (37 views)
2015-07-27 16:38:00

Riven (18 views)
2015-07-27 15:35:20

Riven (21 views)
2015-07-27 12:26:13

Riven (12 views)
2015-07-27 12:23:39

BurntPizza (30 views)
2015-07-25 00:14:37

BurntPizza (41 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (31 views)
2015-07-22 22:16:53

NoxInc (18 views)
2015-07-22 22:13:39
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!