West Coast Gaming

 
Please login or register.

Author Topic: Desynch, what is it? and what can be done about it?  (Read 354 times)

Offline Ozzlee

  • Server Admin
  • Sr. Member
  • *****
  • Posts: 451
    • View Profile
Desynch, what is it? and what can be done about it?
« on: February 27, 2010, 09:22:04 AM »
  In this thread, i'de like to address the desynchronization issue and realy identify with the cause and effects of
packet loss, lag, and other factors that can cause the interactions with other players to go south.

    here, i'de like to see your theories about what causes it, what fixes it. techincal jargen about what can and will be done about it in the future, and
pretty much gain and understanding of what we all go through in WCFR. if you DONT know, or DONT have an idea, please dont post here with phrases like
"idk noob" you WILL get a fat lip.

     


  "Their baying chills the heart and spreads icy tendrils of fear through weak mortal souls. And yet worse, yet more terrible to behold, are the huntsmen of this infernal pack. Following close apon the hounds, urging them ever onward, come hideous travesties running and shrieking, bloodlust of their kind. With twisted crimson bodies crouched low they run across the blighted land seeking the terror-spoor of their prey. Masters of the hunt, they seek the blood of man to offer up at the foot of the skull throne.

Offline Ozzlee

  • Server Admin
  • Sr. Member
  • *****
  • Posts: 451
    • View Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #1 on: February 27, 2010, 09:23:29 AM »
  sometimes for me, desynch takes place after spawning a new vehicle, or using the pay and spray (fade out)

             any thoughts?


  "Their baying chills the heart and spreads icy tendrils of fear through weak mortal souls. And yet worse, yet more terrible to behold, are the huntsmen of this infernal pack. Following close apon the hounds, urging them ever onward, come hideous travesties running and shrieking, bloodlust of their kind. With twisted crimson bodies crouched low they run across the blighted land seeking the terror-spoor of their prey. Masters of the hunt, they seek the blood of man to offer up at the foot of the skull throne.

Offline Tucker

  • Head Admin
  • Hero Member
  • *****
  • Posts: 670
  • Bow Chicka Wow Wow
    • View Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #2 on: February 27, 2010, 09:33:55 AM »
De-synchronization is when two copies of the same data do not match.

For MTA, it relates to every affect-able object in the world. (Players, vehicles, physics objects, objects, etc)

De-synchronization occurs when the server and player have a differing table of data. Additionally it occurs when one player and another player have differing data.

Say the server is tracking an apple, an orange, two bananas, and a bushel of grapes. Player one's game isn't tracking one of the bananas. Player two is tracking the same as the server. When player one is seen to be near the second banana, he seems to ignore or pass through it on Player two's game. Often we see this type happen with vehicles. Another type of desync we see is when Player one is seeing three bananas instead of the two expected by everyone else. So when they try to interact with it, nothing happens other than a graphical glitch on their end. This is another type of failed synchronization we find with vehicles. (For example, the vehicle vanishing and reappearing when you try to enter it)

On a note about De-synchronization caused by some of our resources, I've for some time wanted to sit down and rewrite quite a few to have synchronization/streamed-in code. This won't eliminate the issue relating to the resource, but will minimize it in some areas.

Offline bravo351

  • Retired Commander, WCG Police
  • Head Admin
  • The 1337 Club
  • *****
  • Posts: 3040
  • I'm still faster than you.
    • View Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #3 on: February 27, 2010, 12:53:38 PM »
Let's compare CounterStrike: Source to MTA (I think these are the easiest and most relevant cases in point, as Ozzlee and many others play both).

CounterStrike: Source is built on the Half-Life 2 Source engine, a gaming engine that utilizes sandbox-style maps (compartmentalized, meaning the game only loads a small section of its real world).  It's meant to support a variety of AI, triggered by invisible collision shapes that the player reaches (in singleplayer), whereas multiplayer versions of the engine forego collision triggers altogether.  This compartment-style is behind everything the game does, in Half-Life 2 and CounterStrike: Source, making the game relatively lightweight.

Then, you consider MTA, an open-source, community-built modification for Grand Theft Auto: San Andreas.  One asks, "What can I do with GTASA to make it multiplayer?".  The answer is either MTA or SAMP, and both don't differ that much from each other, so let's focus on the source game itself.  GTA San Andreas was built to support only one player, with the option for a local 2-player co-op.  Not having to make concessions for multiple online players, Rockstar poured their resources into an ever-present main world that is always rendered, up to 100 AI per sector, AI-controlled vehicle traffic, weather dynamics, real-world-feel radio stations, 3D sounds to really make the world come to life, and a deep mission set; all to enhance the gaming experience of the One player.  In short, the game engine is not multi-player friendly.

What MTA does is hack the memory addresses used by GTASA and override sections of it with custom opcode.  This allows it to clear the map of all traffic, leaving a base health system and open map with which to build on.  The resources take care of the rest.  But just because the rest of the big shit has been overridden doesn't mean its dependence is gone.  The game still EXPECTS to pull in the next phase of gameplay as though it were singleplayer still.  And, for all that MTA can do and has done, there's still one thing we can't escape; the constantly rendered, ever present, main world.  With all the possibilities afforded each MTA player, and the game engine's limitations, perfect (or even average) synch is, and forever will be, impossible to achieve.

The one thing that would help would be conglomeration of all MTA into one living world (an MMORPG), hosted by the best servers, all run in one land, where users paid a subscription per month to play it.  The problem with this is we'd lose the open sourcecode and personalization would be gone forever.  For now, we suffer from ourselves... a community of fly-by-night coders with substandard game hosting equipment and dreams bigger than our abilities... and we suffer from a source game that cannot support what we want it to in a stable fashion.

"Don't try to be a great man, just be a man... and let History make it's own judgments."
                                                                     -Zephraim Cochrane, April 4, 2073

Offline Jacknife

  • "Jack" of all trades
  • Server Admin
  • Hero Member
  • *****
  • Posts: 1126
    • View Profile
    • Youtube channel
Re: Desynch, what is it? and what can be done about it?
« Reply #4 on: February 27, 2010, 05:15:48 PM »
Here's a few tips that I personally know of when dealing with a desynced player that you want to DM, Race, etc. with:

  • Go far enough away from the player that the game no longer renders the player's character model, then come back.
  • If DMing a player from inside a vehicle, get out of the vehicle and try DMing them again.
  • If near some sort of interior warp (IE Ammu-Nation) have one player enter, then exit the interior.
  • On rare occasions going up to a player and physically hitting them can restore some sync.
  • Thrown objects are your friend when DMing an un-synced player. (IE Grenades, Molotov's, Satchels, etc.) 90% of the time they will successfully damage the player regardless of their sync. (This is also a VERY good way to tell if a player is using some sort of health hack)
  • Shotguns or any type of spread-shot weapons are the best weapons for a player that is slightly out of sync. If you cant hit them directly, try shooting a few feet to the left or right of them, sometimes you will be able to damage them.
  • On rare occasions, running a player over with a vehicle can restore some of their sync, but watch out! if you run over a synced player, it can throw them totally out of sync with you!
  • If you really cant seem to get sync with a player, reconnecting with the server restores sync most of the time. Of course you want to use this as a last resort, especially if you want to preserve your kill/death ratio.

But ALWAYS keep in mind that if a player cant damage you, you SHOULD NOT DM them!



Offline zeus

  • The Assassins
  • Sr. Member
  • *
  • Posts: 262
  • --God of War--
    • View Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #5 on: April 08, 2010, 07:36:28 AM »
Ok i found this topic in some website so here are the tips that i found:

HOW TO REDUCE YOUR LAG:

A number of you players do not have the latest and greatest PC technology, so here is a guide to help you reduce your lag.

Lag is often spotted because a person seems to jump in front of you, or if you are spec’ing someone who is suffering lag, the scenery will appear to jump and “warp”.  

The biggest effect of this, is that people driving near you will crash into a non-existent object and take damage or be flipped off the race course whilst you suffer no damage.  As you can appreciate, this makes people very upset.

Lag is usually caused by your client PC being slow, more than ping.  By SLOW, we don’t necessarily mean your processor.  Lag is more often than not associated with the level of graphical detail you have set (and therefore CPU/GFX card speed, memory required to process) and disc accesses.

Your PC has to process all of the graphics, and your position in relation to every one else, then send this information back to the other players.  If your PC processes this too slow, and sends the information back to the other players late, then they crash into you (even though you are not there).  Therefore, your PC needs to be set up in such a way that it can process ALL of this information at least as quickly as everyone else.  

Read through the following sections.  If you make the changes suggested, your lag should be drastically reduced:


1) STOP all non-essential applications from running (such as an Internet browser and MSN type chat). On XP do ctrl-alt-del and select Task Manager. You can see all processes and applications running. If you're not sure about something, google it. BTW, this isn't only to save the CPU, but to provide MTA/GTA with more memory. If you are short of memory, Windows will "page" to disk, and this will cripple your game performance.

2) Reduce your GTA "draw distance", Visual FX quality and resolution. You may also find turning off anti aliasing, and/or turning on mip mapping beneficial (you will need to experiment to see which settings work best for you) After all, suffering a little less graphical detail, but having better and more enjoyable racing will be a price worth paying.  Draw distance reduction will probably help the most.  The fewer objects your PC needs to draw the better the performance will be

3) Maybe try turning off the (GTA) radio, or at least not using your own user tracks.

4) During the game, take the occasional look at your HD light. If it is flashing on a lot, indicating high disk activity, you may want to look at defragging your disk. A fragmented disk will cause your PC to slow down, especially noticeable in GTA as it constantly loads new scenery.

5) If you have done a disk defrag, and your disk light still flashes a lot in game, it may be that you don’t have enough memory.  If this is the case, your PC will be using your hard disk as memory (paging), which is about 100 times slower than real memory.  Try closing applications down that use a lot of memory to free some up for MTA/GTA.

6)  Maybe your Anti-Virus software is doing a lot of scanning.  For example, Norton automatically runs at 8pm every Friday night.  This will absolutely CRIPPLE your PC and game performance.  Stop the scan etc.

7) If you didn't do a "full install", try making enough space to do one. In case the CD access is causing your PC to slow down.

This also applies to any game you play online.
« Last Edit: April 08, 2010, 07:38:15 AM by zeus »


Never say Never!

Offline Jaco

  • Om Nom Nom
  • Server Admin
  • The 1337 Club
  • *****
  • Posts: 1588
  • Your Favourite Foreigner :)
    • View Profile
    • Steam Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #6 on: April 26, 2010, 03:20:40 PM »
I might try a few of those steps, mainly because i haven't defragged in a while and such; but I suppose being so far away from the server I can't expect that much to happen; maybe itll change a few local games performance but who knows.

CPU: Intel Core 2 Duo E8400 @ 3GHz
Mobo: Asus P5NSLI
RAM: 4GB Kingston 800mhz Kit (2x2)
HDD: Samsung 500GB, Samsung 1TB & WD 1.5TB
GFX: Zotac GTX275 896mb DDR3 OC @ 741/2580/1516mhz & Gigabyte 9800GT 512mb in PhysX
PSU: Coolermaster 650W
Monitor: LG Flatron 22" Widescreen Monitor Case: Antec 902 inc. Custom Blue Neon Kit Sound: Logitech Z-5500 5.1ch on Soundblaster 7.1 S/C Windows 7 Extreme 32Bit
 
WCFR Duel

Offline Philly

  • Chief Of Police
  • Server Admin
  • Hero Member
  • *****
  • Posts: 1245
    • View Profile
    • myspace
Re: Desynch, what is it? and what can be done about it?
« Reply #7 on: April 26, 2010, 03:56:25 PM »
Some of that stuff may be a bit useful but most of it is just common sense that you need to maintain with regular computer use
I got more Os in my bank account then a box of cheerios.

Offline bravo351

  • Retired Commander, WCG Police
  • Head Admin
  • The 1337 Club
  • *****
  • Posts: 3040
  • I'm still faster than you.
    • View Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #8 on: April 26, 2010, 08:32:00 PM »
One of the biggest causes I've found is Skype.  Now, I like being in a Skype call with other MTA players just as much as the next guy, but the next time you make a Skype call, grab a bandwidth monitor and just watch it as you converse... Skype takes up a SHITLOAD of bandwidth! (Hence, the quality unmatched...).  For the last raid, I ended a Skype call I was in, closed out, flushed the RAM with a system reboot, and jumped into server.  During the raid (when I had NOTHING else running), I had 0 lag issues!  I mean flat-out 0!  Even using my User Tracks worked fine.  And this perfect synch lasted the entire raid.  I was so happy, I shit myself and sat in it.

"Don't try to be a great man, just be a man... and let History make it's own judgments."
                                                                     -Zephraim Cochrane, April 4, 2073

Offline bravo351

  • Retired Commander, WCG Police
  • Head Admin
  • The 1337 Club
  • *****
  • Posts: 3040
  • I'm still faster than you.
    • View Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #9 on: May 08, 2010, 10:46:12 PM »
http://bugs.mtasa.com/view.php?id=3085

For those of you who prefer to read it here, here's the excerpt:

"This report has been created to list the advantages, disadvantages and requirements for a possible server-side physics engine implementation. This is a very ambitious and difficult, but nonetheless sought-after feature.

Our modification is built on top of Grand Theft Auto, which is what sets it aside of other games. In any other good game engine, you will find that the server is "physically" aware of the world that the players are in. It can perform collision detection, bullet tracing and what not simply because it has a 3D representation of the world. This allows for server-side bullet hit calculation (more accurate) and properly synced physics for all clients.

Unfortunately, our server is not aware of the world so it cannot perform the above calculations. We rely on a sort of peer-to-peer syncing where we pick a player (syncer) that uses his game to sync a specific entity (such as the car he's driving, or an occupied car that is near to him) to all other clients. Of course, this introduces the possibility of client-side cheating, lag, latency, inaccuracy and other nasty things.

By using a physics engine and the game data at the server-side, we can create a server that is capable of performing server-side hit detection, proper physics syncing of entities and other cool physics related stuff that would benefit us in many ways.

I have attempted this in the past with the use of the Bullet Physics engine (separate branch). This worked in the sense that I could kick a scripted ball into a pile of trashcans and they would roll over, but I had overseen the fact that it required an implementation of some kind of acceleration structure or streamer, as the Grand Theft Auto world is fairly big. But it is certainly possible

(I may re-commit the branch if requested as it contained working COL/IPL/etc. file loaders adapted to Bullet Physics).

Potential advantages:
- Turning MTA's partial server-side engine into a real game engine that is aware of the world.
- Reliable server-side bullet tracing, completely eliminating the possibility to become invincible by client-side trainers or hacks, and no need to rely on client-side tricks to improve bullet hitting.
- Another step away from GTA's own physics engine and towards our own by virtually ditching the entire client-side physics engine for all major element types (possibly not required for all elements: e.g. explosions).
- Real dynamics and physics for physical elements (players, objects, vehicles).
- More scripting flexibility for world elements, and the possibility for new types of world elements (bullets, etc.)

Potential disadvantages:
- Time, priority and complexity.
- Fair use.
- Potential physics issues (e.g. player animations: do they have to be synced in order to provide reliable hitboxes?).
- In case of Bullet Physics, needs a proper streaming/acceleration structure implementation for good performance.

Requirements:
- Support for reading GTA's COL3 files (collision models), IPL files (object descriptors) and IDE files (world descriptors)
- Integration of Bullet Physics into the server "



There's lag in a nutshell, and the possible fix.  Bookmark the above link and track its progress... if it ever gets done, MTA will be on top once again.

"Don't try to be a great man, just be a man... and let History make it's own judgments."
                                                                     -Zephraim Cochrane, April 4, 2073

Offline zeus

  • The Assassins
  • Sr. Member
  • *
  • Posts: 262
  • --God of War--
    • View Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #10 on: May 22, 2010, 07:38:18 AM »
Ok i was playing in a different server today with a couple of others and it was totally a 0 desync DMing today and managed to make kills over 100 and get killed over 60 times. Ive seen this in many other servers too... 0 desync issues. But we face a lot of Desync in WCG. Is this our server? I almost had the same ping i use to have in WCG. Anyone faced the same thing?


Never say Never!

Offline Jacknife

  • "Jack" of all trades
  • Server Admin
  • Hero Member
  • *****
  • Posts: 1126
    • View Profile
    • Youtube channel
Re: Desynch, what is it? and what can be done about it?
« Reply #11 on: May 22, 2010, 07:57:22 AM »
Its mostly due to the amount of resources that the server uses. a typical DM server only has to run a resource for the gamemode, and one for the map. there aren't many scripts involved. When you look at WCG, we have many, many more resources and scripts running at the same time, and thus causes greater desync issues.



Offline aceofspades24

  • Hero Member
  • *****
  • Posts: 985
  • What?
    • View Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #12 on: September 03, 2010, 12:38:18 PM »
Bump.

I came up with an idea recently. High-ping players can apparently damage anyone, or near anyone. And I for one have an average ping of 23-37, sometimes as low as 11, and what happens alot (mostly with Sgt Mike) is I am not able to hit other players with higher ping than I, but they can hit me with amazing one way sync.

A bit ago, 'bout two days ago, I had a solid ping of 154 or so, I never had this issue of one way sync!

So I'm thinking, would matching my ping with foobs balance my sync?
What do you guys think of this? Matching ping = better sync?
Holder of
"WCFR Most Insane User Award" - 2008
issued by "TheDeepFriedBoot"
cant wait to steal 2009's!

"If you buy a luxury car, generally speaking, your not going to be mudding the damn thing. Sure, after a day of mudding and drinking beer, you can hop into your american truck and and not give a shit." - Maxhamer

Offline TheDeepFriedBoot

  • Ethernet (n): something used to catch the etherbunny
  • Administrator
  • The 1337 Club
  • *****
  • Posts: 2910
  • Dash penguin will eat your soul!
    • View Profile
    • West Coast Freeroam
Re: Desynch, what is it? and what can be done about it?
« Reply #13 on: September 03, 2010, 01:27:53 PM »
Bump.

I came up with an idea recently. High-ping players can apparently damage anyone, or near anyone. And I for one have an average ping of 23-37, sometimes as low as 11, and what happens alot (mostly with Sgt Mike) is I am not able to hit other players with higher ping than I, but they can hit me with amazing one way sync.

A bit ago, 'bout two days ago, I had a solid ping of 154 or so, I never had this issue of one way sync!

So I'm thinking, would matching my ping with foobs balance my sync?
What do you guys think of this? Matching ping = better sync?
We cannot do that on the server. Even if we did, I dont think it would work.
"Critical Mass of Pens: A rare situation where you have acquired so many free pens that you will always find a pen no matter where you look." -TheDeepFriedBoot

*To invent, you need a good imagination and a pile of junk. (Thomas Edison)
*Arguing with an engineer is like wrestling with a pig in mud, after a while you realize the pig is enjoying it.

Offline aceofspades24

  • Hero Member
  • *****
  • Posts: 985
  • What?
    • View Profile
Re: Desynch, what is it? and what can be done about it?
« Reply #14 on: September 03, 2010, 02:01:20 PM »
Bump.

I came up with an idea recently. High-ping players can apparently damage anyone, or near anyone. And I for one have an average ping of 23-37, sometimes as low as 11, and what happens alot (mostly with Sgt Mike) is I am not able to hit other players with higher ping than I, but they can hit me with amazing one way sync.

A bit ago, 'bout two days ago, I had a solid ping of 154 or so, I never had this issue of one way sync!

So I'm thinking, would matching my ping with foobs balance my sync?
What do you guys think of this? Matching ping = better sync?
We cannot do that on the server. Even if we did, I dont think it would work.
I'm not saying we need to create some sort of other script shit or what not, I'm asking what are peoples thoughts on will it work or not.
All I need to do is run through a proxy server, you know? Find a nice one that will give me about 150 ping.
Holder of
"WCFR Most Insane User Award" - 2008
issued by "TheDeepFriedBoot"
cant wait to steal 2009's!

"If you buy a luxury car, generally speaking, your not going to be mudding the damn thing. Sure, after a day of mudding and drinking beer, you can hop into your american truck and and not give a shit." - Maxhamer

 


Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
SimplePortal 2.3.2 © 2008-2010, SimplePortal

ModernDark64 design by BlocWeb.