Technical solution to eliminate desync in single-player sessions

"
qwave wrote:
Does the game not use the IEEE754 standard for binary floating-point arithmetic? If Path of Exile is programmed in C++, you can set the floating-point behavior with the /fp compiler flag as long as none of the libraries are compiled with -ffast-math.

Unfortunately, changing the floating-point behaviour doesn't help. Possibly due to targeting x86 with an older compiler.

"
qwave wrote:
The future would change each time a new roll occurs, which would make it virtually impossible to predict. Even a seasoned bot would not have the computational power to benefit from this.

The future is simple to predict - it's a deterministic simulation. That's the whole point. The only unknowns are the client actions which are you solving for anyway. At least for attacking a single monster, for a given RNG spin there are only two possible outcomes, one for attacking NOW and one for not. Sure, in general finding the optimal solution is difficult, but it's very easy to make significant optimizations by simply artificially delaying the player's attacks by a millisecond or two.

"
qwave wrote:
this solution does not apply to crafting.

But crafting can affect combat, and movement. You can use Whetstones/Armour Scraps on your equipped gear. You can use Baubles on your flasks. You can even unequip-reroll-requip gear. These can change your movement speed and combat stats, so it needs to be sync'd. Also, you might do the crafting using items dropped by chests or monsters.

"
qwave wrote:
"
Now, you suddenly need the ability to effectively "rewind time" as far as the simulation is concerned.

This has been brought up several times. I indicated that the game would need a delay on town portal / logout of 2-3 seconds. As long as the snapshots are very frequent (a second or less), then you could not reliably prevent death.

A "logout time" doesn't fix this. A legitimate player who has a near-death experience can still "die" on the server but survive on his client.

"
qwave wrote:
The server would still retain the map/items/monster spawning.

The client needs to know what happens when a fireball flies off-screen. Are there monsters out there in the fireball's path? In order to maintain synchronous simulation, the client must know about every monster on the map.

"
ScrotieMcB wrote:
Pretty sure I brought up all points myself, with the exception of point 6.
Also, UDP already.

I kinda skimmed this thread, I must admit. Also UDP isn't a magical cure-all. And would totally suck in conjuction with qwave's plan, because packet-loss would create massive desync.

"
Eep wrote:
I don't see any supporter packs under yer avatar. Just sayin'

Off topic, but... that doesn't mean anything. Supporters can hide their forum title if they wish.

"
adghar wrote:
I've often wondered why GGG doesn't just hire a few more codewarriors with lots of experience in the industry and/or with client/server synchronization and just hammer out some better code.

It's very hard to find experienced game programmers in NZ. And importing people from overseas is hard because we can't match the salaries of most US/EU companies. We kinda have to rely on finding people who wanted to move to NZ anyway... and even then, we aren't the only company here super-keen to hire these people.
Code warrior
"
Malero wrote:

It wouldn't be random because GGG would have to give the client the ability process what their server processes now: the enemy AI. The client would basically be running it's own server and sending in a snapshot of what happened to the real server to be validated. It wouldn't work. The client cannot be trusted.


I appreciate your input, but it doesn't answer my question. Nor do I get the impression that this is what qwave is asking for.

I'm not convinced he's right by a long shot, but you answer doesn't leave a lot of room for discussion, so I'm not sure what you were looking for.
"
Rhys wrote:


"
Eep wrote:
I don't see any supporter packs under yer avatar. Just sayin'

Off topic, but... that doesn't mean anything. Supporters can hide their forum title if they wish.




yeah I kind of thought about that afterwards....but tl;dr: I hope more people support the game financially.

AMD Ryzen 7 5800X
MSI RX 2080
Samsung 980 Pro SSD
32GB GSkill Trident-Z
Last edited by Eep on Nov 18, 2013, 11:48:10 PM
Just to note for anyone beefing about that GGG members don´t participate in the daily routine of the forums

NOTE
What can never be lent or earned?
Somewhat, that devours everyone and everything:
A tree that rush. A bird that sings. It eat bones and smite the hardest stones.
Masticate every sword. Shatters every shrine. It defeat mighty kings and carry mountains on lightly wings.
What am i?
Reading through your posts, Rhys, I think I'm beginning to understand better how desync works, but I've got a question I hope you can answer. Honestly, you've probably answered this before and my reading comprehension sucks, so I'm sorry if this comes across as annoying. I'm not trying to start anything, just asking a question.

Why does desync seem so prevalent in Path of Exile while it seems to be much less of an issue in Diablo 3? I went back and played D3 a few days ago just for fun and everything felt so smooth. The mob's health went down right as the animation hit it and never did I get in a situation where there would be a delay between when the spell would hit and when damage would be dealt.

Are they just better at hiding it? It it just happening less for some reason? Does D3 trust the client with more information than PoE does and does that result in more cheaters? I was under the impression D3 was fairly hack-proof, but I don't really follow it that closely and I'm probably wrong.

Again, I don't mean to start anything, there just isn't any other modern ARPG to compare this one to. At the risk of sounding like a jerk, I never had to use /oos in Diablo 3 like I use it in PoE.

I hope nobody takes this the wrong way. I feel like bringing up D3 when talking about PoE is just asking for hate, but I just wanna learn.
Last edited by Yimi on Nov 19, 2013, 12:04:59 AM
"
MeltingPoint wrote:
"
Malero wrote:

It wouldn't be random because GGG would have to give the client the ability process what their server processes now: the enemy AI. The client would basically be running it's own server and sending in a snapshot of what happened to the real server to be validated. It wouldn't work. The client cannot be trusted.


I appreciate your input, but it doesn't answer my question. Nor do I get the impression that this is what qwave is asking for.

I'm not convinced he's right by a long shot, but you answer doesn't leave a lot of room for discussion, so I'm not sure what you were looking for.


If he's asking for anything different, it would mean that the gameplay would drastically change. In order for the client to produce a snapshot, it would need the ability to process things that it cannot do at this time: calculate responses to all of your actions. If the client can generate one snapshot, it can generate as many as the hardware running it will allow.

BUT WAIT! There's one exception! The client cannot be trusted with crafting! Brilliant! If it cannot be trusted with crafting, then why can it be trusted with everything else? OP is a troll. /endthread
Last edited by Malero on Nov 19, 2013, 1:05:39 AM
%90 of the theory bestowed on me during the course of my overpriced education goes to shit when the network comes into play.

No one knows the requirements, problems and implementation better than the people who wrote it.. if a solution exists, they don't need advice, they need a fortune and several years to rewrite.
Just want to point something out to those who don't really see the whole picture here...

1) User input makes most forms of "snapshot" like system more or less irrelevant. Especially when coupled with random monster AI, random user input, and the ability for certain skills to do certain things based on whatever random value is evaluated.

2) You can only predict the "future" up until user input. You can't control what the user does and using a deterministic approach to figure out what "does" happen vs what "can" happen means your server-side validation requires even more resources to validate those snapshots. (Brutus *can* attack you, and hit you, but that doesn't mean he actually did.)

This works in RTS's, simply because it is entirely user-input driven. There are very well defined sets of actions for things. Your units can't move until you tell them to, they can't attack until you tell them to either. This isn't an RTS, and isn't driven entirely by user-input. Monsters have their own decision making abilities, and players can change those decisions simply by moving.

3) Assuming you can't figure out if you'll hit/crit/miss (which you can, fairly easily), the server also can't verify that information either. Server may say that we crit, when in reality, we didn't, because we had another unknown RNG roll happen before that crit on the server, that didn't happen on the client. You now have a major discrepancy issue. (This becomes very apparent when FPU rounding is required for calculations, or just simply when different architectures do things differently)

4) The bandwidth spikes you'd have from sending these snapshots would be incredibly large. You wouldn't even gain a combat log out of it like you think. You'd have to send a snapshot every 500ms *at most* to combat bots. Remember; anything the client can do, a bot can do just as easily. Sometimes, even faster. (Bots don't need to worry about graphical things, nor thousands of other pieces of information that isn't relevant to what it's doing at that specific time) All you'd gain by this, is desync being 500ms apart, instead of 1s apart. In other words; you gain absolutely nothing. (Desync would be even worse considering packet fragmentation and full loss)

5) Validation..... you would need to validate monster movement (which isn't possible due to player movement being impossible to predict in any reasonable about of time). You'd need to validate player movement (fairly simple, since movement speed mostly solves this, as well as simple pathfinding checks). Then on top of that, you would have to validate mana/life usage, monster health, active abilities, equipped items/gems, all object locations, etc. All of which you can not determine via a "random seed" to make the server predict the same outcome (as you would first have to find that seed that would cause that prediction to happen). The server would have to go into full-trust with the client, and just flat out accept anything the client tells it.

Rule #1 in networking: Never trust the client.

TL;DR; snapshots don't work on games that have non-player-based input mechanisms, unless you have millions (probably billions) of dollars worth of hardware on the server-side to handle processing all the information, and doing validation.

There are whitepapers all about this stuff. And yes, this type of synchronization has been around for over a decade, but only used in specific types of games. Because it doesn't work in most other games due to how the input is driven.
"
Spysong192 wrote:
Just to note for anyone beefing about that GGG members don´t participate in the daily routine of the forums

NOTE


The problem with GGG staff is that they are very vocal about some topics but completely silent about others. Desync is one of those things that they are extremely vocal about, and with good reason, because it's such a major problem with the game.

In regards to the 'note' comment, I could go on and on about the tons of issues that aren't even acknowledged by GGG, but that would be off topic. I guess my point is... it's important to 'note' what they don't participate in as well. :)
Last edited by DestroTheGod on Nov 19, 2013, 12:22:04 AM
"
Yimi wrote:
Why does desync seem so prevalent in Path of Exile while it seems to be much less of an issue in Diablo 3?

Technically off-topic, so I'll reply in spoiler tags...
Spoiler
Diablo 3 has several tricks that alleviate desync (last I checked):
-You can't miss with melee attacks
-You can't move out of the way of melee attacks

These things allow the client to more reliably predict the server calculations, but make combat more shallow.

They also don't really have narrow corridors or doorways to the extent we do, which also helps a lot, though you lose the feeling of claustrophobia such level features create.

In other words, there are pro's and con's.

Diablo 3's combat feels smoother, I think, for three reasons:
1) Cut combat animations
Many combat animations (weapon swings, attacks, spells) don't naturally blend from the idle/run animations. They deliberately *cut* to a keyframe in a dramatic pose, which then flows into the rest of the attack. Path of Exile's combat animations transition smoothly from idle to attack to idle.

2) Skipping utility animations
Some animations only play if the player is standing still. For example, casting buffs or curses. If the player is running or attack at the time, the spell goes off with NO animation at all. It doesn't interrupt the existing combat. In contrast, in Path of Exile, you have to stop moving and wait while you Enduring Cry/Curse/etc.

3) Input queuing
Diablo 3 has a deceptively clever input queuing system. Suppose you are spamming right-click a lot to keep doing one action, then press a key to do another, then go back to spamming right-click. You can't just queue every key-press, otherwise you'd be stuck performing the right-click action a million times. But even if that solitary key-press was made at a "bad time" i.e. during another action (at a time when you couldn't immediately do anything new) you do want to queue up this new action once before going back the spam. In Path of Exile, this extra action frequently gets lost in the spam, making you feel like the skill didn't work for some reason.
Code warrior

Report Forum Post

Report Account:

Report Type

Additional Info