|
|
|
|
 |

July 19th, 2008, 02:29 PM
|
 |
Colonel
|
|
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
|
|
Re: Creating a fake map image file
Try this llamabeast:
Create a cross-platform program that your users can download (or run from a browser) that will change every pixel to black except for the pure white province markers. Then have them upload the resulting image.
I have attached a "minimized" version of the silent seas map image. The file size goes from 2787 KB to 50 KB. If you are able to automate zip file decompression as well, have the user or your distributed application zip the resulting "minimized" image and it will squeeze down to 2 KB.
I have not tested the map image in game yet, but I see no reason why it should not work. I have attached it to this post for anyone who wants to try it out.
Hope this helps!
|

July 20th, 2008, 05:17 AM
|
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Creating a fake map image file
Ha, that is a very cool idea Ballbarian! I may very well end up using that.
|

July 20th, 2008, 04:29 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Creating a fake map image file
Hmmmm I was working on a command-line to the fantastic ImageMagick tools to do that. Or maybe a ghost-script to GIMP.
The purpose was actually to turn a map into one with just borders and pixels that could be used as an online view to have the national colors automatically filled into the provinces to show game progression. But I can see a use here also.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|

July 20th, 2008, 04:48 PM
|
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Creating a fake map image file
Oh wow Gandalf, if you could whip that up for me that would be really amazing. I was thinking about how to carry out Ballbarian's suggestion but had just about decided to give up because I couldn't face learning the necessary skills to modify the map.
|

July 21st, 2008, 01:58 PM
|
 |
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Creating a fake map image file
I'm really surprised to hear that putting random white pixels into a map image doesn't work. What exactly is going haywire with that approach? Anybody care to give me an example?
Quote:
Ballbarian said:
Try this llamabeast:
Create a cross-platform program that your users can download (or run from a browser) that will change every pixel to black except for the pure white province markers. Then have them upload the resulting image.
|
Another possibility would be to do this on the client side when they want to upload the image. Here are links to open source file upload applets in Java which you might be able to vandalize to add the desired functionality:
http://sourceforge.net/project/showf...group_id=59144
http://www.aasted.org/ (don't let the name "Coppermine java image uploader" scare you away, it's probably easier to get it working even without a Coppermine gallery installed than to implement an image uploading applet from scratch)
Quote:
Gandalf Parker said:
Hmmmm I was working on a command-line to the fantastic ImageMagick tools to do that. Or maybe a ghost-script to GIMP.
|
I certainly don't want to curb your enthusiasm, but while it's very powerful in terms of functions that it offers, I've found out that ImageMagick or at least its bindings through PythonMagick is an awful sluggish piece of *bleep*.
I could give you something in Python which does this in PIL, that would be about 5 lines of code. Somebody actually even asked exactly for this a couple of weeks ago on the image-sig mailing list. You could even chose to build binaries for any platforms you'd wish to support with that. But speaking from experience, if the process is too complicated, like this sounds, I'd say that people wouldn't bother to use it.
|

July 21st, 2008, 02:26 PM
|
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Creating a fake map image file
Quote:
I'm really surprised to hear that putting random white pixels into a map image doesn't work. What exactly is going haywire with that approach? Anybody care to give me an example?
|
I was surprised too. The server seems to include the province positions in the trn file, oddly. So all the provinces end up cluster together in one corner of the map once you look at the trn file at the client end.
Quote:
Another possibility would be to do this on the client side when they want to upload the image.
|
Okay, web stuff is very far from being my forte. What's the idea here? The computer at the client end runs the program contained within the web page to alter the map image before it's uploaded, so that the actual data uploaded is already altered and hence small? Or something different?
|

July 21st, 2008, 02:32 PM
|
 |
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Creating a fake map image file
Quote:
llamabeast said:
The server seems to include the province positions in the trn file, oddly. So all the provinces end up cluster together in one corner of the map once you look at the trn file at the client end.
|
Wow, that's really odd.
Quote:
llamabeast said:
Okay, web stuff is very far from being my forte. What's the idea here? The computer at the client end runs the program contained within the web page to alter the map image before it's uploaded, so that the actual data uploaded is already altered and hence small? Or something different?
|
Yes, exactly that. If you use a Java applet the idea would be to do the white-pixel-filtering on the client side. You could do it in ActiveX for MSIE, but Java is more portable. And while Java applets were bringing browsers to a grinding halt about 10 years ago, they're quite fast and usable now.
|

July 21st, 2008, 02:36 PM
|
 |
Colonel
|
|
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
|
|
Re: Creating a fake map image file
Quote:
The computer at the client end runs the program contained within the web page to alter the map image before it's uploaded, so that the actual data uploaded is already altered and hence small?
|
That is what I initially envisioned when I suggested something that could run from a browser. Not much point in running it on the server since the whole point is to keep a small bandwidth footprint.
Web development is not my forte either. I could slap together a VB program to generate the basic map, but that would only work for windows users and a few others who are set up to run it in a shell (or however they have been managing it). The conversion is pretty simple. I wish that I could just "record a macro" in Gimp. That would be the simplest, but if it is possible, I have no idea how. I only glanced at script-fu, but I just don't have time or energy to devote to figuring that out right now. 
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|