Create account / Log in

Module Map Repaint Very Slow

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Module Map Repaint Very Slow

Postby mroyer » March 18th, 2011, 12:19 am

As a noob on my first module attempt I've run into an issue.

When I load up the module to play and put a bunch of counters on the map, the computer bogs down and takes a very long time to repaint the map as move it around. At first I thought it was the map size (an 8 MB jpg) so I did some cleaning of the scan and got the map down to about 3 MB and still the same problem, although not quite as bad.

So, I went extreme and created a one-color "map" image the same pixel size of the original map. The pseudo-map is only a 42 KB jpg image. I loaded it and it also exhibits the issue. So, perhaps it's counters? Each counter is about a 4 KB jpg image. I have perhaps 150 on the map which doesn't seem like an excessive amount to me.

Besides counters and map, could anything else be driving this issue? (My computer is a new Dell precision M4500 laptop.)

Thanks in advance for any help and suggestions.

-Mark R.
mroyer
 
Posts: 166
Joined: March 4th, 2011, 5:06 pm
Location: Massachusetts

Re: Module Map Repaint Very Slow

Postby DrNostromo » March 18th, 2011, 2:31 am

Try converting your JPG graphics to PNG. I've found that JPG's don't work nearly as well in Vassal.
User avatar
DrNostromo
 
Posts: 1043
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: [messages] [Module Design] Module Map Repaint Very Slow

Postby uckelman » March 18th, 2011, 9:25 am

Thus spake mroyer:
> As a noob on my first module attempt I've run into an issue.
>
> When I load up the module to play and put a bunch of counters on the
> map, the computer bogs down and takes a very long time to repaint the
> map as move it around. At first I thought it was the map size (an 8 MB
> jpg) so I did some cleaning of the scan and got the map down to about 3
> MB and still the same problem, although not quite as bad.
>
> So, I went extreme and created a one-color "map" image the same pixel
> size of the original map. The pseudo-map is only a 42 KB jpg image. I
> loaded it and it also exhibits the issue. So, perhaps it's counters?
> Each counter is about a 4 KB jpg image. I have perhaps 150 on the map
> which doesn't seem like an excessive amount to me.

Image file size is completely irrelevant for image rendering. What is
relevant is image dimensions. How wide and high is your image?

What module is it that you're using?

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: [messages] [Module Design] Re: Module Map Repaint Very S

Postby uckelman » March 18th, 2011, 9:27 am

Thus spake DrNostromo:
> Try converting your JPG graphics to PNG. I've found that JPG's don't
> work nearly as well in Vassal.
>

I'd like to see the evidence you have for that. Every image, once it's
loaded, is supposed to be put into the same format in memory. Can you
show me some JPEGs which don't work well?

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: [messages] [Module Design] Module Map Repaint Very Slow

Postby mroyer » March 18th, 2011, 10:45 am

uckelman wrote:Image file size is completely irrelevant for image rendering. What is
relevant is image dimensions. How wide and high is your image?

2884x2511

uckelman wrote:What module is it that you're using?

--
J.


One of my own still being created.

-Mark R.
mroyer
 
Posts: 166
Joined: March 4th, 2011, 5:06 pm
Location: Massachusetts

Re: [messages] [Module Design] Re: [Module Design] Module Ma

Postby uckelman » March 18th, 2011, 10:50 am

Thus spake mroyer:
>
> "uckelman" wrote:
> >
> > Image file size is completely irrelevant for image rendering. What is
> > relevant is image dimensions. How wide and high is your image?
>
> 2884x2511
>

That's not especially large.

> > What module is it that you're using?
> >
>
> One of my own still being created.
>

It would help for troubleshooting if you could put your module somewhere
that we could download it.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: [messages] [Module Design] Re: Module Map Repaint Very S

Postby Tim M » March 18th, 2011, 12:52 pm

uckelman wrote:Thus spake DrNostromo:
> Try converting your JPG graphics to PNG. I've found that JPG's don't
> work nearly as well in Vassal.
>

I'd like to see the evidence you have for that. Every image, once it's
loaded, is supposed to be put into the same format in memory. Can you
show me some JPEGs which don't work well?

--
J.


Sure :)

In the attached zip is a module with 3 images a gif,jpg and png. The png is easy to spot but which image is the gif and jpg is more difficult. The gif is the better of the two though because it doesn't butcher the alpha as bad as the jpg format .

Its easy to blame vassal for their appearance but it's really not vassal that is the issue but the image format itself - but we've always known that and the reason this probably happens is (the blame vassal bit), when someone is using a utility such as photoshop or paintshop pro, these programs show your image how it's supposed to look while manipulating in them but they will let you save as another format without previewing (if you want to like any good graphics program) so you dont see your real end result until after you've put the image into vassal and you could end up with something like this example mod shows. :shock:

One should always use the export/preview options the graphics software one uses provides as a result to know what your going to get. :)
Attachments
images.zip
image comparison
(108.46 KiB) Downloaded 70 times
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1778
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: [messages] [Module Design] Re: [Module Design] Module Ma

Postby mroyer » March 18th, 2011, 1:12 pm

uckelman wrote:It would help for troubleshooting if you could put your module somewhere
that we could download it.


That would be great. Thanks for any help!

http://www.stprocup.com/non-website/JP%20Third%20Reich
http://www.stprocup.com/non-website/AtStart1939B.vsav

Caveat: The .vsav file was saved when I had a larger map (3846x3348) and counters (70x70) so all the counters are offset from the current hex-grid. The current module has a map at 2884x2511 and 50x50 counters. Intuitively it doesn't seem like that should be relevant to my issue, but as I uploaded the files it occurred to me maybe it is a factor.

(Also, just for everyone's info, due to copyright issues the finished module will be for personal use only. I purchased the game because there exists a VASSAL module. However, I discovered after the fact the publisher won't allow the module to be distributed - therefore I'm making my own so my friend and I can play since we can't get together face-to-face regularly like we use to in the pre-kids days.)
mroyer
 
Posts: 166
Joined: March 4th, 2011, 5:06 pm
Location: Massachusetts

Re: [messages] [Module Design] Re: Module Map Repaint Very S

Postby mroyer » March 18th, 2011, 1:26 pm

Tim M wrote:Its easy to blame vassal for their appearance but it's really not vassal that is the issue but the image format itself - but we've always known that and the reason this probably happens is (the blame vassal bit), when someone is using a utility such as photoshop or paintshop pro, these programs show your image how it's supposed to look while manipulating in them but they will let you save as another format without previewing (if you want to like any good graphics program) so you dont see your real end result until after you've put the image into vassal and you could end up with something like this example mod shows. :shock:

One should always use the export/preview options the graphics software one uses provides as a result to know what your going to get. :)


This seems more like a graphics quality issue vs. the screen repaint speed issue I'm facing... true?

-Mark R.
mroyer
 
Posts: 166
Joined: March 4th, 2011, 5:06 pm
Location: Massachusetts

Re: Module Map Repaint Very Slow

Postby Tim M » March 18th, 2011, 1:34 pm

yes.
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1778
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Module Map Repaint Very Slow

Postby DrNostromo » March 18th, 2011, 2:37 pm

I'd like to see the evidence you have for that. Every image, once it's
loaded, is supposed to be put into the same format in memory. Can you
show me some JPEGs which don't work well?


My mistake. In the past (like 2 years ago) I had trouble using large JPG's. I just ran a test with a very large map in both PNG and JPG format. You obviously have made some improvements to how graphics are handled since 2 years ago as I found no difference between the two.
User avatar
DrNostromo
 
Posts: 1043
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: [messages] [Module Design] Re: Module Map Repaint Very S

Postby uckelman » March 18th, 2011, 2:41 pm

Thus spake DrNostromo:
>
> > I'd like to see the evidence you have for that. Every image, once it's
> > loaded, is supposed to be put into the same format in memory. Can you
> > show me some JPEGs which don't work well?
>
>
> My mistake. In the past (like 2 years ago) I had trouble using large
> JPG's. I just ran a test with a very large map in both PNG and JPG
> format. You obviously have made some improvements to how graphics are
> handled since 2 years ago as I found no difference between the two.
>

Yes, we did. There will be further improvements in 3.2, as well.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: [messages] [Module Design] Re: Module Map Repaint Very S

Postby tar » March 18th, 2011, 5:59 pm

On Mar 18, 2011, at 2:27 AM, Joel Uckelman wrote:

> Thus spake DrNostromo:
>> Try converting your JPG graphics to PNG. I've found that JPG's don't
>> work nearly as well in Vassal.
>>
>
> I'd like to see the evidence you have for that. Every image, once it's
> loaded, is supposed to be put into the same format in memory. Can you
> show me some JPEGs which don't work well?

I'm wondering if this is a quality of reproduction issue and not a performance issue. Certainly for line art and text, the image you get from a JPEG will generally be worse than from a PNG.
User avatar
tar
 
Posts: 772
Joined: January 2nd, 2008, 6:53 pm
Location: Los Angeles area

Re: [messages] [Module Design] Re: [Module Design] Re: [Modu

Postby uckelman » March 19th, 2011, 2:38 pm

Thus spake mroyer:
>
> "uckelman" wrote:
> >
> > It would help for troubleshooting if you could put your module
> > somewhere
> > that we could download it.
>
>
> That would be great. Thanks for any help!
>
> http://www.stprocup.com/non-website/JP[1] Third Reich
> http://www.stprocup.com/non-website/AtStart1939B.vsav[2]

I can't open your module file. It appears to be corrupt.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: [messages] [Module Design] Re: [Module Design] Re: [Modu

Postby mroyer » March 21st, 2011, 4:32 pm

uckelman wrote:I can't open your module file. It appears to be corrupt.

--
J.


Yup... I believe you are correct that the module may be corrupt.
I can open it, but with the slow-repaint issues noted in the opening post.

I completely re-built the module using the same exact image (.jpg and .png) files and my slow re-paint issues appear to have gone away. It now performs a snappy repaint of the map.

I can't imagine what I might have done first time through to screw up the module.

Thanks for looking into it for me.
-Mark R.
mroyer
 
Posts: 166
Joined: March 4th, 2011, 5:06 pm
Location: Massachusetts

Next

Return to Module Design

Who is online

Users browsing this forum: MSN [Bot] and 3 guests

cron