login
April 25, 2024, 02:50:41 pm

Author Topic: IMPORTANT - sync lag cause of every server  (Read 1652 times)

0 Members and 1 Guest are viewing this topic.

FuckTinG

  • Banned
  • Fanatic
  • *
  • Posts: 138
  • Country: ro
    • View Profile
IMPORTANT - sync lag cause of every server
« on: April 18, 2021, 02:00:49 am »
you might be familiar with this strange phenomenon, which occured, most evidently of all, in European City (known as EC), but also present in servers like The Demolition Wars (TDW), Rob The Vehicle and so on...

the cause of this is pretty simple, all i did was put things together like a puzzle,only to find out that the most evident cause of this is the abuse of GUI as in:
- too frequent use of it
- too big/too HD images of GUI
- size in server of GUI (as in dimensions of the text, how much area it covers, etc.)

i suggest all server owners to try to limit the resolution + size + use of the GUI as much as possible.. beyond that, VC:MP is created in 2002, what's the point of enhancing it with shitty addons.. in 0.3z not even 10% of 0.4 was possible, and VCMP players could handle things alright, without having game lags (unless they own a poverty PC of course)

so yes, you should test this out and tell me if this works, i am really curious...

and as well, if you could pass this message to my beloved EC administrators and let them know what happened to their sweet playercount?

again, this is the most likely cause which the sync in some servers feels almost impossible to handle.. out of all servers, i think EC uses the most GUIs, also the most detailed (which means high in resolution and size), leading to the WORST case, EC having worst sync in VC:MP one has ever played in.


why VU forum? it's clear - everybody is active here everyday, and it's most likely the best way to distribute a message all over community...


the GUIs need a pass, either that or extreme limitation, such as in LCS, in CTF, in BRL...
« Last Edit: April 18, 2021, 02:03:42 am by FuckTinG »
Agree Agree x 5 Informative Informative x 2 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


mairee

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • *
  • *
  • *
  • Posts: 1040
  • Country: pk
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #1 on: April 18, 2021, 07:46:01 am »
GUI itself is not supposed to have any kind of impact on your latency or your sync with the server. This is because it is all being done on your client, the client side files are downloaded on your PC and then they are executed without any relation to the server (except for streams that are sent to and from your client). Therefore, GUI itself as a whole does not have any impact on your sync. It can be other things, perhaps the latest VCMP version?
Informative Informative x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

FuckTinG

  • Banned
  • Fanatic
  • *
  • Posts: 138
  • Country: ro
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #2 on: April 18, 2021, 08:48:19 am »
latest vcmp version has nothing to do with it, EC had messed up ever since rel006_1

it's GUI most likely, i would believe it's not its fault only when someone actually removes GUI totally and i can test the server and tell if there's any difference, other players could do that too instead of me...

sync lag doesn't necessarily mean FPS drop, it actually means that shots get missed, or not received, and everything feels sloppy in general, affecting seriously competitive results..

i still believe the GUI fault variant, unless someone can prove me wrong... because based on my observations, servers that have very less GUI (plus that it's not ultra detailed) or don't have at all, actually do not have the very same problem as the ones that do use a lot of GUI, and with realistic detail..
Informative Informative x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


Hazard

  • Crazy Man
  • *****
  • Posts: 490
  • Country: pk
  • RELAX!
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #3 on: April 18, 2021, 09:04:02 am »
so pak vs balkan? Axxo make it happen
bro you are in wrong topic
Disagree Disagree x 1 Funny Funny x 4 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor



mairee

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • *
  • *
  • *
  • Posts: 1040
  • Country: pk
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #4 on: April 18, 2021, 10:25:16 am »
latest vcmp version has nothing to do with it, EC had messed up ever since rel006_1

it's GUI most likely, i would believe it's not its fault only when someone actually removes GUI totally and i can test the server and tell if there's any difference, other players could do that too instead of me...

sync lag doesn't necessarily mean FPS drop, it actually means that shots get missed, or not received, and everything feels sloppy in general, affecting seriously competitive results..

i still believe the GUI fault variant, unless someone can prove me wrong... because based on my observations, servers that have very less GUI (plus that it's not ultra detailed) or don't have at all, actually do not have the very same problem as the ones that do use a lot of GUI, and with realistic detail..
What you are facing has absolutely nothing to do with GUI.
Here's the GUI library being used by VCMP, find me a single line that makes use of sockets: https://github.com/Juppi88/mgui
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

FuckTinG

  • Banned
  • Fanatic
  • *
  • Posts: 138
  • Country: ro
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #5 on: April 18, 2021, 12:12:49 pm »
lol then how come all of the servers that use a shit load of GUI make things laggy?

i want a perfect TEST first, a server such as King of the hill

i want to experiment it without GUIs vs with GUIs, and then we will have a proper answer.

i don't dwell on solving things without a test, if i could take this server alone i would do it, but i have no scripts to test it on, plus that the servers that don't use GUIs at all or just use a very low amount are actually lag-free, without any sync problems

and by sync problems i mean: players not getting hit, grenades/mols even rock not getting hit, the mouse movement feels laggy, keyboard feels laggy, controls feel like not responding.. those are the most of the symptoms that occur...

like i said, i want to test it, if this is the problem then get rid of it, if not - keep it as it is.. i am almost certainly sure this is it, because there's no other possible reason for things like that to happen, plus nothing else fits according to the history of servers changes that i have learned about..
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


GangstaRas

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • *
  • *
  • *
  • *
  • Posts: 1754
  • Country: jm
  • Representing VU for Life
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #6 on: April 18, 2021, 07:53:12 pm »
The servers just need smart use of the GUI. Sync issue you're describing could be frame pacing issues.

We did test KoTH during development and it takes a lot of CPU if you just throw the GUI out there. What would take 25% of my full CPU speed to hit 30 FPS in VC:MP now takes around 62.5% of full speed to get 30 FPS in KOTH (Intel Core i3 3240 @ stock). In noting this during development, we deliberately designed the game in a fashion where combat uses very minimal GUI to work around this fact.

The killer in GUI is drawing images and 3D sprites. If whatever is being added can be a GUI box element, we do that instead. All the heavy sprite stuff are accessible only when the you are not an active participant of the round in some way.

  • Scoreboard/Awards/Wep Select only when you're dead / round not started
  • Some major flashy sprite transitions and GUI effects only when you're frozen from an ended match
  • Pre-loading all GUI sprites so that there's no stutter to draw them when requested (that's why it takes so long to join the server, it was either do that, or have a 1 second stutter everytime you drew the Scoreboard etc.)

These optimizations provide a very vanilla experience during combat where it matters most, all EXCEPT for that one GUI element....the zone border.

That has optimizations of its own but it definitely the performance dropper of the server currently. Before, the border you saw was made up of individual squares in an array going across the land. We immediately saw how shit of a method that was when we created that Hunter base. We then created a rather complicated algorithm to switch between using a stretched rectangle to create the boundaries of the border when things were straight, it would resort back to the square tile method when creating curved borders. This is far better than to have 10,000 tiles create a straight line.

Just like that, a near vanilla experience but we acknowledged that not even that was enough for the truly weaker end systems and so we provide the command /disableborder to hide the border if your system is absolute shit.

So its just for servers to make those optimizations. The sprite elements in KoTH were designed towards the native resolution of 4K, not even 1080p, we use algos to shrink it accordingly to the player's resolution.
Informative Informative x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor



FuckTinG

  • Banned
  • Fanatic
  • *
  • Posts: 138
  • Country: ro
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #7 on: April 18, 2021, 09:48:31 pm »
oook, so then here we go - servers DO need smart use of GUI, and probably as LESS as possible..

oh and gangstaras, what you said just adds up, because out of all the servers, King of The Hill makes just M4 sync feel a LITTLE nasty (still it does but, much unlike the other servers, other weapons can still be played with)

so...here goes the answer .. my suggestion is, let go of all the GUIs so we can have the smooth experience we used to have in past, either that or just limit it as much as possible, similarly to CTF or LCS server, where GUIs are not even 1080p as i noticed (idk if it's true, but resolution of it doesn't feel like it's 1080p)


Quote
The servers just need smart use of the GUI
^

please just do something about it, the state vcmp currently is in is really getting on my nerves, there's not 1 TDM server that i could say "finally a good sync server", apart from CTF which is mostly empty


it DOESN'T matter on how good your PC is.. when you code something wrong, it's gonna lag either way, on some PCs more than on others, just like the teargas weapon in the game.. since it's badly coded, even the GTX owners can feel a little stutter when passing through it.. the same with GUI, the problem i'm not certain if it's FPS lag, but i'm certain that the sync doesn't feel good overall, because i am used to playing in classic servers, and when i switched to the nowadays TDM servers, i was shocked...
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


Charley

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • Posts: 4751
  • Country: 00
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #8 on: April 19, 2021, 04:10:39 am »
I think the bigger problem here is the size of the files that servers have added - it makes it impossible for many players around the world to even get ingame, let alone sync with anyone.

Connecting from China, the only populated server I can play in these days is Littlewhiteys. With the others, the files either don't download at all, or take more than 30 minutes to download. There's no working progress bar on the downloads, it usually just looks like the game has crashed.

I'd imagine other people living in other countries also encounter this problem, and it is keeping the VC:MP playercount down.
Funny Funny x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor

Writer of excessively long posts


GangstaRas

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • *
  • *
  • *
  • *
  • Posts: 1754
  • Country: jm
  • Representing VU for Life
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #9 on: April 19, 2021, 08:54:50 am »
it DOESN'T matter on how good your PC is.. when you code something wrong, it's gonna lag either way, on some PCs more than on others, just like the teargas weapon in the game.. since it's badly coded, even the GTX owners can feel a little stutter when passing through it.. the same with GUI, the problem i'm not certain if it's FPS lag, but i'm certain that the sync doesn't feel good overall, because i am used to playing in classic servers, and when i switched to the nowadays TDM servers, i was shocked...

Try disabling the border and tell me what you think. You should have an uplift cuz everything else onscreen as GUI is very negligible, even the medal transitions (which surprized me personally) didnt have a perceivable impact at 25% full CPU speed.

I'd imagine other people living in other countries also encounter this problem, and it is keeping the VC:MP playercount down.

Oh no its just you Charley lol. Can download 1 GB worth of game but cant get server files. Let's talk there and get some input from the devs at that one ;D

The GUI is made native to 4K, yes, but the file sizes arent big at all. The actual GUI files, you'll see some 444x444 and lower resolution elements that just take up mere kilobytes. It is just that that 444x444 size matches exactly how we would want things to look at 100% scaling on a 4K screen should the playerbase be having 4K monitors running on, so the GUI will always look good. Only the big full screen backgrounds and so on are a full fat 4K image and thats just 3 of them. So thats the other careful consideration. KoTH size comes mainly from the audio files.
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor



FuckTinG

  • Banned
  • Fanatic
  • *
  • Posts: 138
  • Country: ro
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #10 on: April 19, 2021, 10:26:54 am »
amount of files downloaded have no matter at all.. LCS uses a lot more files than CTF, still the both of their sync looks just as smooth

with GUI:


without GUI:


in 0:06 and 0:35 in 2nd video as u can see the players do get hit way easily..
in 1:31 in the first video, the shot is missed for some reason...

bonus i've experienced something in very unusual in EC when i was testing the server after i got unbanned: i shot the grenade like 4 times, and it just didn't want to bounce, and p.s: this is after they became top 1 of useless GUI usage

what led me to think that GUI is the fault of this, is that there's absolutely no server that uses a high amount of GUI that doesn't have this issue..
technically you cannot catch a 100% legit proof that GUI is the fault in a VIDEO, because you need to actually FEEL the sync while playing, and when controls stand to respond harder, then you know something is wrong.
Useful Useful x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


GangstaRas

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • *
  • *
  • *
  • *
  • Posts: 1754
  • Country: jm
  • Representing VU for Life
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #11 on: April 19, 2021, 02:05:49 pm »
Did some fresher testing of my own as well today and noticed a few things:

Frame Cap OFF

This is me just running VC:MP like anyone else would



As you can see, my system is holding 60 FPS but my frame time (the green line) is all over the place. This is normal with any game you play to be honest so not a point to fuss on, just note the amplitude of those spikes. I'd spike anywhere from about 14 to 20 ms, averaging the 60 FPS.

When in-game, you can see and feel the jitteriness to it, or at least I can. It's okay if you've never experienced jitter free gameplay before but its noticeable once you have.



Different map but take my word for it, same result really; this is how it looks when you disable the border. Frame capping is still off, and as you can see, the frame time looks much more relaxed than the first one. This graph is a typical VC:MP vanilla experience, but it still can be improved upon.


Frame Cap ON




This is with frame cap on in the same game of the first image. As you can see, it smooths out all that jitter and provides a much cleaner experience. Do note however those momentary spikes. I wasn't able to see it but I can say that the game didn't feel like my specs were overkill, more felt like when you run a game max detail and all is good but not perfect. It just felt right, not pristine.


Then you have the fourth experience, frame cap on with border disabled. Didn't bother to take a pic cuz its nearly the same as the 3rd image you see, the only difference was that those momentary spikes you see in the third image were significantly reduced. I didn't see a difference but I definitely felt a difference and would attribute it to less input lag (but I have no real way to measure that atm). I will not lie, I definitely noticed it. Border off was what felt like my system was overkill and pristine as it should.



Now I might know how to cap my framerate to deliver a smooth experience but the typical VC:MP player just hops in and does his thing. This is how my end respond but other systems might be doing much worse than what I'm capable of so I see the point.

Again I ask to try KoTH with border disabled and tell me if you get the same experience like I'm expressing, but from what you showed of the RTV video, I would say that an optimization that could be made in general of GUIs is not to have translucent designs and avoid sprites if you can, but if you have to use it, use very minimal amounts.

Another thing that you have to and must avoid is font resizing. We were going to animate the countdown to 1 in KoTH, like a pulse effect, but that brought every system to its knees, the VC:MP code around it is not good. It made wep selection lag severely so we had to scrap that idea
« Last Edit: April 19, 2021, 02:11:38 pm by GangstaRas »
Agree Agree x 1 Informative Informative x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor



FuckTinG

  • Banned
  • Fanatic
  • *
  • Posts: 138
  • Country: ro
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #12 on: April 19, 2021, 05:33:08 pm »
everything started once with that RTV fashion of sprites, fancy GUIs and so on..
VCMP never needed any, thanks for the helpful comment Gangstaras
my suggestion is you do as Gangstaras said, and try to limit as much as possible the GUI (removing even some of it, useless points at least, such as kill streak, achievement and whatever), and replace them instead with command, what's the point of having beautiful graphics but broken mechanics in a gameplay?
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


FuckTinG

  • Banned
  • Fanatic
  • *
  • Posts: 138
  • Country: ro
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #13 on: April 19, 2021, 10:53:00 pm »
update:

i found this video while searching around, this is the 100% proof that the sync bug i mentioned EXISTS, i didn't expect to find such a clear frag actually... do something about it please


bonus clip:

players often confuse it with hp hack or lag



and for the unexperienced ones, even 'suspicious hacks'
« Last Edit: April 19, 2021, 10:55:40 pm by FuckTinG »
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


GangstaRas

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • *
  • *
  • *
  • *
  • Posts: 1754
  • Country: jm
  • Representing VU for Life
    • View Profile
Re: IMPORTANT - sync lag cause of every server
« Reply #14 on: April 20, 2021, 10:20:49 am »
Another optimization I forgot to mention was the use of this SetTexture command on client-side scripts. Basically, don't use it.

I'm not a scripter so I'm not too sure of its true purpose but remember how that initial Freeze all we do at round end, just before the GUI would come up would temporarily stutter all KoTH clients for a second or three? That command was the sole sole problem. Displaying a GUI the regular way absolutely nuked that lag.

DecUI uses it as a public tool that's out there for everyone to adopt. We honestly didn't know it was the problem because there's another property to that SetTexture command for GUI that makes its usage subpar. From a 3D modeler perspective, I believe that command changes the GUI into something of a 2D object trying to react to the 3D world. I can be wrong but when you use that to load a GUI sprite versus the regular way to display it, you will notice side by side that the SetTexture version is darker than your original image, making me infer that if there was a light source nearby when this GUI displays, it may probably react to it to brighten itself, that's my theory.

Our team discussed with NewK on these issues and I believe he patched it out once we showed him what was up. But let's say RTV is using DecUI as a base to design their GUI, if it was on the earlier versions, then they are probably subject to this problem we noticed. If that timer GUI is all the GUI RTV has and its causing so much sync issues then I suspect there lies the problem.

In KoTH, that SetTexture was on everything that was a sprite. The timer, the scoreboard above the map (that use to be black in appearance even though I didn't design it that way), the notifications aren't sprites so no lag there, but the medals too, everything you can imagine. It was the design flaw we saw that made do a massive purging of that command, not the hidden performance implications it had but that's even more info for you guys out there. Don't use SetTexture
Informative Informative x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor