VGMaps
November 17, 2017, 04:06:36 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: PanoJS  (Read 3448 times)
0 Members and 1 Guest are viewing this topic.
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« on: December 02, 2011, 12:12:52 PM »

If you go here:

http://www.dimin.net/software/panojs/

...there's a Google Maps-esque zoomer script thing. Problem is, it's hard work finding the software to cut up the maps - the only Windowsy one on the list is Zoomify, which crashes on large maps. Has anyone else had any better results?
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #1 on: December 02, 2011, 12:55:19 PM »

With a little bit of work this could be made to work well with game maps.  It's a bit wasteful on maps with repeating tiles, and non-square maps, but that could easily be solved...  Would also be nice to have layer support.  There's also still the issue of not being able to save the map, but, I suppose you could always pass the viewer information to a server side script that would render the same view of the browser and send it back to the user.
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #2 on: December 02, 2011, 01:19:26 PM »

Aha, the "imgcnv" tool it mentions has a Windows version which seems to work, and doesn't square-ify the image. You need to edit the Javascript to make it use PNG files and then it works pretty well. I don't have a server handy to upload it to, but the 12752x8816 Castlevania: Aria of Sorrow map turns from one 11.8MB file to 2369 smaller files that add up to 14.7MB after a rather long PNGOUT session.

For the full image, it'd be easiest just to offer it as a separate download (at the cost of server space).

I think it'd be trivial to make it use JPG files for all the scaled down images and PNG for the end, which might make it use a little less space.
« Last Edit: December 02, 2011, 01:20:20 PM by Maxim » Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #3 on: December 02, 2011, 01:49:09 PM »

It was indeed trivial:

Code:
return "" + l + "_" + x + "_" + y + "." + (l==0 ? "png" : "jpg");

...and we're down to about 8.5MB for the images which isn't bad - the extra locality of tiles gets you more compression than the original PNG, even after you use some of that up for the JPGs. It'd still be nice to have it avoid duplicate tiles, though, but that might be tricky...
« Last Edit: December 02, 2011, 01:52:40 PM by Maxim » Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #4 on: December 02, 2011, 02:15:25 PM »

I was thinking hard or symbolic links, but that only half works since the request URI is going to technically be for a different file and the web server will probably serve it again.  So that leaves having to have some sort of tile map or index.

I'm considering looking at my map cruncher again.  It would mean having to write my own viewer or modding this one.  But I could also add in layer support, which would be cool for certain games.
« Last Edit: December 02, 2011, 02:41:33 PM by DarkWolf » Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #5 on: December 03, 2011, 03:05:46 PM »

For the duplicate tiles, you could use redirects which would avoid the need to resend the data but would need server-side support; or maybe a file that would remap the client-side requests for duplicate images to the same file (perhaps using colours in a PNG image for the matching, rather than something bloated like XML, but that'd require a newer browser). It's always nice if the result is just a bunch of files on a server.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!