Lag, tokens and repository

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
Adurna
Cave Troll
Posts: 34
Joined: Thu Jul 07, 2016 7:45 am

Lag, tokens and repository

Post by Adurna »

Hello guys!

Usually, on our games, after a while (usually near the end of the session) the game starts to get laggy. Looking around, I read that every time a token is moved, the one hosting the server is sending the whole token bakc to the players.

Now, my connection is not the best out there, and even tho I asked the players to get smaller tokens (under 45-50kb) the problem seems to persist. Especially when they are moving much around like when exploring or such.

So I was thinking, I recently learned how to use repositories and thought: usually everyone is responsible for their tokens and gets to drop them when the session starts, but what if I put their tokens in the repository as well? Would they still get the file from my computer?
Or would they download it from the server lightening the strain on my connection?


Or is something else entirely producing lag? If so, or if you have other tips to help me I would greatly appreciate it.

Unfortunately I'm the only one in our group which has been able to host a server, for all their boasting I'm sadly the only one with a tiny bit of understanding of computers :|
For all I tried to help them we couldn't manage otherwise, so I'm trying to do everything I can to have our games run smoothly.


Thanks in advance for your help!

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Lag, tokens and repository

Post by Jagged »

It won't be the size of the token images, its the amount of information that is being transmitted with the token. In particular there can be a lot of information stored against the token about its vision area.

What parameters are you using to start the server?

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Lag, tokens and repository

Post by Full Bleed »

Adurna wrote:Looking around, I read that every time a token is moved, the one hosting the server is sending the whole token bakc to the players.

Now, my connection is not the best out there, and even tho I asked the players to get smaller tokens (under 45-50kb) the problem seems to persist. Especially when they are moving much around like when exploring or such.
You don't need to make the tokens smaller. Like Jagged said, it's really the info that's being stored on the token that's being sent every time the token is "updated".

I suspect 1 and/or 2 things:

1) Are you using individual FoW? If so, every move is storing additional FoW data on each token. This gets quite large after awhile.
2) Low memory settings. What memory settings are you using?
So I was thinking, I recently learned how to use repositories and thought: usually everyone is responsible for their tokens and gets to drop them when the session starts, but what if I put their tokens in the repository as well? Would they still get the file from my computer?
Or would they download it from the server lightening the strain on my connection?
Once they've downloaded the token once, their computers have cached the image. The repository only helps with that initial download. So, in short, it's not going to fix your problem.


Keep in mind that if the issue is pretty consistent, you could try saving and restarting the server every few hours. But using higher memory settings and turning off individual FoW could also buy you a lot of extra time.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Adurna
Cave Troll
Posts: 34
Joined: Thu Jul 07, 2016 7:45 am

Re: Lag, tokens and repository

Post by Adurna »

Mh, I'm attaching a screenshot of the server settings.

As for memory, I'm using this: set VERS=1.4.0.4
javaw -Xmx1024M -Xss512K -jar maptool-%VERS%.jar run

To be hones tho, I don't think it's about memory settings. That shouldn't change how much data my pc is sending, does it?
When this happens I can really see the connection spike in upload speed as it tries to compensate... And it usually happens when there is a higher than usual movement of tokens, that's whay I thought that could be the problem...
Attachments
Cattura.PNG
Cattura.PNG (8.03 KiB) Viewed 1063 times

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Lag, tokens and repository

Post by aliasmask »

There are several causes of lag. Too many macros on a token being moved, having the Select Window open (it redraws all the buttons each time), lighting, fow, vbl... they're all contributing factors.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Lag, tokens and repository

Post by Full Bleed »

Adurna wrote:javaw -Xmx1024M -Xss512K -jar maptool-%VERS%.jar run
Can't say this is the problem, but change your stack size to 4 megs. 512k is far too low.

So it should look like this:

Code: Select all

-Xss4M
And if you are using a 64bit OS with 64 bit Java, I'd increase your Max memory to something like 2048. If you're using a 64 bit OS and 32 bit Java, you should uninstall Java and install the 64 bit version.
To be hones tho, I don't think it's about memory settings.
It's almost certainly about memory since you said:
after a while (usually near the end of the session) the game starts to get laggy
That's a red flag for something consuming a diminishing finite resource and then getting bogged down "after awhile".
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Adurna
Cave Troll
Posts: 34
Joined: Thu Jul 07, 2016 7:45 am

Re: Lag, tokens and repository

Post by Adurna »

I'll try those then, thanks!

Post Reply

Return to “MapTool”