Page 2 of 3

Re: Onward to the New World (preparing for our next server m

PostPosted: Sat Feb 08, 2014 7:34 am
by imrielle
I might have to play again just to map. ;_;

Re: Onward to the New World (preparing for our next server m

PostPosted: Sat Feb 08, 2014 6:40 pm
by pistolshrimp
imrielle wrote:I might have to play again just to map. ;_;


It'd be awesome to have you on board.

Re: Onward to the New World (preparing for our next server m

PostPosted: Sat Feb 08, 2014 7:32 pm
by Cheena
pistolshrimp wrote:
imrielle wrote:I might have to play again just to map. ;_;


It'd be awesome o have you on board.


^THIS :mrgreen:

Re: Onward to the New World (preparing for our next server m

PostPosted: Sun Feb 09, 2014 1:27 pm
by imrielle
Speaking of mapping, anyone know how to recompile the .res files?

(Please forgive any typo's/weird english. I have a bad case of food poisoning and its hard to type/think, but I just can't sleep through any more of it.)

Here is why I am asking: Currently, any single map tile is (before an compression/batch processing), 10-23!kb's in size. Mines are even larger, but I don't give a **** about mines.
I still have all of the map tiles for Roanoke, Jamestown and Plymouth. Each of the non-compressed folders are huge. Or, huge for them just being a bunch of tiny 100x100 images.

Lets use one of my Jamestown backups here, back when it was tiny 2063 tile folder. Its 90.6 Megs in size. It's compressed sister folder (and yes, the maps I had online for people were all compressed, in multiple ways. My methods were to convert them to an indexed color .gif, removing all of the unneeded alpha ****, reconverting them to .png, then combining them into larger 400x400 images.) is still a rather large 30 MB folder.

I've extracted all of images used in the map tiles. There are 33 files that I am fairly certain are used for minimap tiles - gravel.res_0.png I am unsure of of (and the gravel image is 13KB's :!: in size). If these were all modified to be smaller, cleaner PNG/Res files, the maps would be hugely smaller and easier to work with. It wasn't the AMOUNT of tiles that took me hours to merge, compress and deploy, it was the huge file sizes. Importing in the Roanoke map back when it was only 20k tiles would take upwards of 30 minutes uncompressed. After compression, it was down to 5 minutes or so.

Here is an example tile, pre-editted:
Image
This is 13KB, for a single tile. This single tile also has 1646 colors in it. That single large chunk of lighter green on the bottom? It alone accounts for 281 colors.

Here we have the same tile, hand edited to show what I am trying to achieve:
Image
This is now 2.49KB in size, with 8 total colors, using the same PNG format options that the defaults use. It would be even smaller using indexed colors, with alpha disabled. Still recognizably the same area, but massively smaller in file size.

I'm not sure if many people realized it, but I was also editing out peoples bases from the maps on requests, or if I knew the base was active, this would also make doing that 1000% easier. Matching up the default "I puked on an image file and used it for the minimap" textures to hide bases and make it appear seamless wasn't always easy or fast. Even with a new world, we're not always going to get "virgin" tiles from people.

I've tried Boshaw's Layer util, and tried using the various **** found on Haven's forums, so far no luck. I've even tried different custom clients. It could be a case of "Imri is being retarded", so if someone wants to walk me through re-setting up the layer utility and getting the blasted thing to work, it would be hugely appreciated. I'd like to have these working and available for anyone who wants to use them in time for the wipe.


Edit: Also, one of the people I'll be playing again with mentioned that there might be more biomes added. Those will be pretty easy to modify and add in, too, once I figure this out.

Re: Onward to the New World (preparing for our next server m

PostPosted: Sun Feb 09, 2014 2:36 pm
by Chiprel
Imrielle hai! Something for you below ;)

Installing:
1. Download and install: http://www.sbcl.org/platform-table.html (using 1.1.12 for win myself)
2. Download quicklisp and save it on D:\ ( http://beta.quicklisp.org/quicklisp.lisp )
3. Run cmd. Go to D:\ and type sbcl. After that type: (load "quicklisp.lisp")
Image

3a. Now type: Image

3b. Now type: Image

4. Close the window and go to yourUSER/quicklisp/local-projects and unzip salem-layer-util in there so it looks like on pic. (https://github.com/boshaw/salem-layer-util/archive/master.zip)
Image


Decoding/coding:
1. Put res directory on D:\
2. Now run cmd on D: drive and type sbcl then type: (ql:quickload "salem-layer-util")
Image
3. Now to decode all files in 'res' folder type:
(slu:run :mode :da
:skip-old nil
:verbose nil
:args '("res" "dec"))
Image
Image
4. Now you have all decoded stuff in 'd:\dec'. Edit whatever you want and check point 5.
5. To encode it back to .res files type:
(slu:run :mode :ea
:args '("dec" "new-res"))
Image
Image
6. Put files back to custom_res and have fun.

Re: Onward to the New World (preparing for our next server m

PostPosted: Sun Feb 09, 2014 2:40 pm
by iamah
imrielle, that size reduction would be very useful for a javascript map using the GoogleMaps API or something equivalent... I hope OP uses that on the map tiles, it looks better than the original IMO, more clean...

Re: Onward to the New World (preparing for our next server m

PostPosted: Sun Feb 09, 2014 2:49 pm
by imrielle
Chiprel wrote:Super long post

Can I kiss you? I was just about to PM you <3

iamah wrote:imrielle, that size reduction would be very useful for a javascript map using the GoogleMaps API or something equivalent...


This is exactly why I want to make everything smallified.
I have no idea what the OP intends exactly, but I think we all know I'll end up having a map online. :p

Re: Onward to the New World (preparing for our next server m

PostPosted: Sun Feb 09, 2014 3:03 pm
by Chiprel
imrielle wrote:
Chiprel wrote:Super long post

Can I kiss you? I was just about to PM you <3

Only if not with your avatar face :p

Looks like I should add spoilers. Post came out much bigger than expected.

Re: Onward to the New World (preparing for our next server m

PostPosted: Sun Feb 09, 2014 5:58 pm
by imrielle
Successmode engaged, thanks to help from Chiprel. :)

Here are some example screenshots, merged into one image:
Image

Foldersize for topleft minimap (9x9 tiles) before: 160KB, after: 36KB

Download link: http://www.sendspace.com/file/mwjqhs
These go into (on win7): C:\Users\YourName\Salem\custom_res

Re: Onward to the New World (preparing for our next server m

PostPosted: Sun Feb 09, 2014 7:37 pm
by pistolshrimp
Great information here. I've actually been experimenting with a couple of different ways to create smaller map files, I was thinking one way would be to port large map tiles into adobe illustrator and turn the image into a vector copy of itself making a pretty high color threshold so that all colors not substantially different would be merged together. Then I'd export back out as a png. It'd would work for the size (I could even change the dimensions to be smaller or bigger if necessary without pixelization as vector files are lossy.) not sure if anyone has tried this before. My only concern is that some accuracy might be lost in this approach, not much I think tho. I will probably try a number of approaches. Chiprel's is particularly awesome.

As far as completely virgin tiles, I understand I can't get them all the time, my plans were to edit out alterations, I'd just rather do it one a couple of dozen tiles as opposed to a couple of hundred.