Why do even simple movers lag when playing online?

Discussions about Coding and Scripting
User avatar
Dizzy
Experienced
Posts: 109
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Oaf

Re: Why do even simple movers lag when playing online?

Post by Dizzy » Tue Oct 16, 2018 12:52 am

@sektor I tested this on my server (laggy mover maps: CTF-BT-SeGear and CTF-BT-Donnie-v1) and it works beautifully. Really excellent. Thank you very much to you and Higor for your help.

If you have no objections I will post this on Github with you and Higor as the authors.

If you think of any improvements to the code, please post them here and I will update mine also.

:gj:
Join the BunnyTrack.net Discord chat server: https://www.bunnytrack.net/discord

User avatar
sektor2111
Godlike
Posts: 5873
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Why do even simple movers lag when playing online?

Post by sektor2111 » Tue Oct 16, 2018 6:15 am

I hope you will remove RotatingMover from deal like I said...

Main credit goes at Higor, he figured what has to be changed at movers and was writing formula, I just followed advice and I wrote a few lines, first time I was over-thinking problem but in fact was doable more simple. As for GitHub - let's say not every admin can compile or has clue about coding, probably this Server-Actor should be compiled and posted somewhere visible for admins which are not running XC Servers because a double-fix I don't know if it's recommended, probably will slow-down movers based on a double patch...

On the other side, (@Higor) the other tweak to TriggerControl mover was still leaving a door open in some map because in that server I did not install the mutator with tweaker assistant which I wrote for these stupid movers where instigator can be killed in trigger radius and NOTHING is calling UnTrigger when pawn dies - perhaps I have to screw "Killed" or "Destroyed" from Actor definitely forcing some UnTouch at nearby actors which have this pawn in Touching[4] list.
The problem perhaps will need a small package to be sent in player because of new content of execution. New stuff added cannot be conformed properly so client will need to know what's new because here will be needed some variables added - I'll try to figure if exist another simple solution - probably game-controller is an answer.

Buggie
Godlike
Posts: 1489
Joined: Sat Mar 21, 2020 5:32 am

Re: Why do even simple movers lag when playing online?

Post by Buggie » Sat Jan 15, 2022 4:18 pm

Code: Select all

static final function float GetNMT( float f )
{
    f = int(100.f * FMax(0.01, (1.0 / FMax(f, 0.005))) + 0.5f);
    f/=100.f;
    Return (1.f/f);
}
Proper implementation must include "+ 0.5f" part.

For example:
14.3 -> not proper = 16.66667, but proper = 14.28714
6 -> not proper 6.25 , proper = 5.882353.

1337GameDev
Skilled
Posts: 196
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Why do even simple movers lag when playing online?

Post by 1337GameDev » Tue Jan 18, 2022 6:58 am

Buggie wrote:
Sat Jan 15, 2022 4:18 pm

Code: Select all

static final function float GetNMT( float f )
{
    f = int(100.f * FMax(0.01, (1.0 / FMax(f, 0.005))) + 0.5f);
    f/=100.f;
    Return (1.f/f);
}
Proper implementation must include "+ 0.5f" part.

For example:
14.3 -> not proper = 16.66667, but proper = 14.28714
6 -> not proper 6.25 , proper = 5.882353.
What does NMT mean?

Buggie
Godlike
Posts: 1489
Joined: Sat Mar 21, 2020 5:32 am

Re: Why do even simple movers lag when playing online?

Post by Buggie » Tue Jan 18, 2022 10:23 am

Not sure, but think NetworkMoveTime. Safe MoveTime for Movers which allow replicate it over network via existing way without loose precision and get same value on replication side.

So Mover on network stop lag. flicker and all actors on it (players usually), stop act strange.

User avatar
Barbie
Godlike
Posts: 2394
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Why do even simple movers lag when playing online?

Post by Barbie » Tue Jan 18, 2022 10:39 am

Buggie wrote:
Tue Jan 18, 2022 10:23 am
So Mover on network stop lag. flicker and all actors on it (players usually), stop act strange.
Recently I noticed fast and small vertical shaking of my view while I was standing on a resting vertical mover; the view trembled with about 5 Hz. Happened on server "BarbiesWorld"(v469c) in map "MH-3072-FloorWays+SBMod". It was only visible for me, not for other players. Also not visible when I team-viewed myself through them.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Godlike
Posts: 1489
Joined: Sat Mar 21, 2020 5:32 am

Re: Why do even simple movers lag when playing online?

Post by Buggie » Tue Jan 18, 2022 11:19 am

Barbie wrote:
Tue Jan 18, 2022 10:39 am
Recently I noticed fast and small vertical shaking of my view while I was standing on a resting vertical mover; the view trembled with about 5 Hz. Happened on server "BarbiesWorld"(v469c) in map "MH-3072-FloorWays+SBMod". It was only visible for me, not for other players. Also not visible when I team-viewed myself through them.
https://github.com/OldUnreal/UnrealTour ... issues/720

User avatar
sektor2111
Godlike
Posts: 5873
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Why do even simple movers lag when playing online?

Post by sektor2111 » Tue Jan 18, 2022 4:36 pm

Then it's time to setup a revision for old code concerning mover timers... perhaps at end of week or some day in closer future.

User avatar
sektor2111
Godlike
Posts: 5873
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Why do even simple movers lag when playing online?

Post by sektor2111 » Fri Jan 28, 2022 12:06 am

New formula for calculating movement timer of a Mover it's implemented here (I'll do some testing another time...) but this ServerActor can be configured for using old method if newer one recommended by Buggie will not be suitable for everyone. All INI variables are explained in the document from archive and source-code is there as well...
MovSync.7z
If this ServerActor is not helpful, get rid of it. Once again, this is an Actor usable as ServerActor in Dedicated Servers. Stand Alone games don't need any mover related tweak.
You do not have the required permissions to view the files attached to this post.