Well, I've been busy this holiday season and I haven't had time to work on anything sprite or mapping related. Anyway, before I start on possibly doing some Phantasy Star II maps, I wanted to play around with an idea.
A lot of maps have a lot of empty space that has to be compressed into the file. Now compression works well with empty space, but I wanted to see if I could shave the file size down even more. My first test I did with Rick Bruns's Castlevania castle map. (Sorry, just needed something quick for a test).
Dracula's CastleMy version is HTML based and is approx. 48K smaller. However, the output image file is 4736x1664, opposed to the original 9920x2096. 38% of it's original canvas size. This should make it easier for lower-memory computers to display (I did some testing with the large Faery Tale Adventure map). This is somewhat promising.
What my method does is this:
It breaks the image down into square sections. It then loops through these sections to see if they contain 100% empty space (based on a user-supplied color). It then breaks the image down into "strips" and then attempts to put those strips into an output image. It records the "moves" the program makes and can then later generate an output based on the "crunched" image and XML data file. For the HTML output, I use absolutely positioned DIVs and background image offsets.
Pros:
* Smaller file size for images with large empty areas
* Adjustable section size
* Can be applied to existing images
* Eliminates hot-linking
* Could help with google indexing (especially for VGMaps)
Cons:
* So far, file size reduction is good, but not amazing
* User needs a web browser to view map
* Could break later with browser changes
* While HTML pages could be indexed by search engines, you would loose image search (i.e. Google images)
Things to test/do:
* Test more existing maps (could use some suggestions)
* Try making a map that's set on a grid, then running it through the script
* Test viewing the map on more devices and browsers