Page 1 of 1

[bug] latest manaplus got lags/stutter.

Posted: 29 May 2019, 06:49
by t3st3r
Latest ManaPlus version ( and also current git) has developed some really weird behavior, becoming prone to very specific kind of lag/stutter, at least on TMWA.

There should be plenty of monsters chasing player. I've got most pronounced effect with fallens vs mage setup.

To reproduce:
1) - Get chased by plenty of monsters. Often that would be enough.
- Alternatively, get hit by some monsters and receive some damage while walking away from monsters swarm.
2) Keep moving away from monsters.
3) Look what happens if you trying to keep moving away from monsters.

At some point player tends to get stuck, client jumps backward (position resync).
Player's attempt to to move away fails, yet another jump happens, etc.
Overall client tends to end up exposing very jumpy behavior, jumping to "correct" position up to several times per second, likely only limited by CPU power or network. This appears to be very taxing overall, at which point things get even worse and typical result is player being chewed by swarm of monsters, being unable to escape at all due to client jumping current position here and there, provoking even more lag.

N.B. grinding through git It seems it could be related to recent changes in player position fix/sync code. Unfortunately it caused quite some fallout on TMWA to extent players advice each other not to update to new version. TMWA had no desync issues for a while - so fix actually has caused regression.

Re: [bug] latest manaplus got lags/stutter.

Posted: 29 May 2019, 20:52
by 4144
Actually tmwa have desync issue always, but it accepting any wrong moves and fixes it server side almost silently for player. Player may have some delay on actual moves or short random mob attacks.

You sure you not configured in wrong way sync distance on legacy servers?
Default is 30 tiles. This is huge desync and probably very hard to get it.

Re: [bug] latest manaplus got lags/stutter.

Posted: 25 Jun 2019, 05:45
by t3st3r
1) When Manaplus had settings to "sync every X" (you chopped it in recent git, I see), it never worked reasonably for me if enabled. Whatever I entered caused eventual lags and stutter. So I always had this setting disabled on TMWA and (very rare) resyncs mostly worked for me. Now it no longer a case - and I die on half of occasions when I'm hit by monsters, because client aggressively resyncs like mad, falling into really weird stutter. I can't move reasonably and die under monster hits. I can record video showcasing this, if needed.

2) I've tried different values for sync every X... at least around 20-25 or so, and no matter what I enter, stutter eventually happens. It not seems to really depend on entered number, it rather important to move intensely and then get hit by monster. I'll retry with 30, but actually I prefer client to be way less aggressive on resyncs. It attempts to resync like crazy, every second or so (on every monster hit or my move?) this proves to be very taxing and causing very jumpy screen behavior, at which point as I told I can't even move reasonably - screen chaotically jumps here and there.

I guess I can bisect and revert it, however some other players also seems to have the problem. Dying on slightest lag spike and so on. It eventually came to fact TMW runners avoid using new manaplus, as far as I know. Because it tends to make even slightest monster hit absolutely fatal due to downspiraling to resync stutters at which point it really hard to escape.

3) There is funny fast-enter bug that I suspect can be related. On relatively high round trip connection one can get the following: enter e.g. TMW hurnscald from top teleport, aggressively pushing down and left or down and right (diagonal move). Player suddenly thrown ... at bottom of city, close to Celestia house with no good reason. It may or may not be related - client definitely gets wrong idea about wanted position. Another spot is on GY, that been spotted by player GnuLinux. Sometimes it rather causes sudden disconnect instead, not sure why (maybe keypresses are buffered while map loads and server packet rate limit gets exceeded?).

UPD: I've experimented as 4144 suggested. Seems it more about server sending stop packets and manaplus now honoring these. At which point overall sequence of events doesnt plays nicely, eventually provoking jumpy viewport attitude if monsters hit player. Though getting stuck on hit can be viewed as feature, making game mechanics more sane and challenging. But the problem here is that old clients get advantage in this regard and so overall it also looks like kind of regression. At which point I'm getting puzzled what is bug and what is feature.

Re: [bug] latest manaplus got lags/stutter.

Posted: 25 Jun 2019, 06:53
by Pawneeboy
I can attest to the stutter effect, the lag is there too but due to my fairly stable internet it's only momentary, and I do tend to DC on Hurnscald's north exit, most of the time it DCs if I'm off center of the exit.