VGMaps

General Boards => Mapping Tips/Guides => Topic started by: Maxim on July 22, 2007, 08:07:54 AM

Title: Unofficial tile slicer mod
Post by: Maxim on July 22, 2007, 08:07:54 AM
I made a quick and dirty change to Revned's Tile Slicer:



- commandline parameters for tile width/height

- outputs HTML as well as TXT



I apologise to Revned for doing it without asking first. Here's a demo of the HTML output. It turns out the HTML+small images often turns out bigger than the original PNG for real-life maps, so it's of limited use - but might help certain very large to display in browsers.



Here's the download. It seems to need Java 1.6, so you might need to update, sorry about that.



Tile Slicer mod
Title: RE: Unofficial tile slicer mod
Post by: DarkWolf on July 22, 2007, 10:29:24 AM
The HTML map is handy when the dimensions get past a certain point.  If I ever do a 1:1 version of the Faery Tale Adventure world map, it would be done in HTML with tiles.  ALso I've seen a Sword of Vermilion world map done in HTML, which works out okay, especially since there are blank spaces throughout the map.
Title: RE: Unofficial tile slicer mod
Post by: TerraEsperZ on July 22, 2007, 11:31:47 AM
I wonder what kind of limitations a map done in HTML might have in terms of display performance. When scrolling for example, is there a speed difference if the map in a huge picture instead of hundreds/thousands of little ones? In terms of memory usage, tiles would definitely be lighter but I don't really know about these things.



Anyway, nice work on this.



---

"With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." [...] The first time any man's freedom is trodden on, we're all damaged. - Captain Jean-Luc Picard



B*tch, meet reality. Reality, meet b*tch. - Me
Title: RE: Unofficial tile slicer mod
Post by: Maxim on July 22, 2007, 12:41:56 PM
Tiles pictures are likely to work better in browsers because the data needed to display a new chunk while scrolling will be held in a bunch of smallish blocks of memory (one per image) rather than a load more tiny bits of memory (one per line of pixels), so memory access will be speedier and less complex. Also, to display any image the browser has to decompress it to memory and reducing the redundancy in that data (by letting duplicate tiles use the same memory, because they're the same image) will have a direct link to the browser's memory use, and it's a massive speed boost to avoid thrashing when RAM runs out.
Title: RE: Unofficial tile slicer mod
Post by: Maxim on August 19, 2007, 12:29:26 AM
Update: I implemented a preliminary hashing-based tile duplicate finding system so now it runs a great deal faster for larger images. On a test 100Mpx image it ran about 8 times faster. It also gives progress updates now.
Title: RE: Unofficial tile slicer mod
Post by: Revned on August 19, 2007, 01:20:37 AM
Great work! You know, you should have asked me for the source code, I'd happily have handed it over. I've been meaning to clean it up and enable the command line options I commented out, but I've been sidetracked. I wrote it before I took a class on data structures, so it was very inefficient.  The HTML output is a great idea, I'm glad you thought of it. I
Title: RE: Unofficial tile slicer mod
Post by: Maxim on August 19, 2007, 07:21:07 AM
Jad gave me all the source really, and timezone differences would have cost me the immediacy I craved. The splicer source might be handy, although I can't imagine there's much work to do on it.
Title: RE: Unofficial tile slicer mod
Post by: Revned on April 05, 2008, 07:32:27 PM
I rewrote Tile Slicer from scratch. I implemented a good hashing function and now it goes much faster. I was about ready to release my command-line version last night, but then I decided I'd give it a GUI. It's working well, I just need to add a few little things before I can release it. I'll probably redo Tile Splicer, too.