Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (429)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (468)
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 496 times)
0 Members and 1 Guest are viewing this topic.
Offline herah

Senior Newbie





« Posted 2013-03-24 00: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-24 00: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-24 00: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-24 00: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-24 00: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 01: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 18: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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

theagentd (6 views)
2014-04-24 23:00:44

xsi3rr4x (83 views)
2014-04-15 18:08:23

BurntPizza (75 views)
2014-04-15 03:46:01

UprightPath (86 views)
2014-04-14 17:39:50

UprightPath (69 views)
2014-04-14 17:35:47

Porlus (86 views)
2014-04-14 15:48:38

tom_mai78101 (109 views)
2014-04-10 04:04:31

BurntPizza (169 views)
2014-04-08 23:06:04

tom_mai78101 (265 views)
2014-04-05 13:34:39

trollwarrior1 (216 views)
2014-04-04 12:06:45
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org 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‑gaming.org
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!