• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Random Desyncs :(

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hi!

I'm making an RPG. I tested before with a friend and fixed some obvious desyncs related to specific events/actions... Everything worked great. Now I made some small changes, added some items, and, :goblin_boom:... random desyncs.

I'm not sure on what to check. The only periodic event I have so far happens every 1 second, and doesn't use 'GetLocalPlayer'. The rest of the events that uses 'GetLocalPlayer' are specific and doesn't desync... =/

Tell me if you want me to check and specific action, or trigger, or code, or item, or unit, or something... Or a 'Trigger Type' that may cause the problem so I can post it here to find a solution.

ALSO, everyone gets disconnected if I use v1.26a, but not with 1.24e :S (Obviously everyone is using the same version)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Yeah, I'm testing right now, over and over to get a better look at the misterious problem. And, no, I'm not using any camera action other than 'Set Camera Distance' and 'Set Camera Smooth Factor'. I made the thread to see if someone could give me a clue on what to pay attention when looking for desyncs, other than GetLocalPlayer().

Added another problem in the first post:
ALSO, everyone gets disconnected if I use v1.26a, but not with 1.24e :S
 
Level 9
Joined
Apr 26, 2011
Messages
403
- check out "wait(x second)"
- check out custom script that involve player(id) ( JASS start from player(0), GUI start from player(1))
- find out your most busy function, see if anything wrong (infinite loop or very slow code etc)
- find out when desyncs start happen, (see if anything in command)
- get replays, watch very closely for what happening before desyncs. (eg, which unit attacking, what spell is casting etc)

is it desyncs or fatel error ? if it is fatel error, then you can look for below :
- check out your new item, see if it have any "unknow(abcd)" ability/icon (eg, if you accident deleted ability/buff, it will display as "unknow(abcd)"
- check out your new ability/item's buff. make sure it don't share same buff/debuff with other ability (single target spell buff + AE spell buff with same icon = instant crash)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Thanks a lot HuanAK, though I made some changes, seems like one of them fixed the problem. Just improved here and there.

1) I was creating a floating text for two regions every 1 second. Improved it creating the text at the beginning of the game, and just Changing it's text every second (instead of creating/destroying over and over).
2) Fixed an icon xy position in the equipment (using Witchers system) that was messing all icons.

Fixed these and some other minor stuff, and tested 1:30 hour with my brother, then 1 hour with the same friend, and no desync was found, even forcing the system to (doing stuff no one will ever do)

I think my friend was having deep severe lag the first time we tested; that with the icons moving in equipment and Floating text constant/creation destruction... I don't know...

The first desync happened when he Clicked the Torch. I had already equipped it. The second time (without any change in the map) and nothing happened when both were using the torch. Then he hosted, after some minutes playing, I typed something and bump, desync.

Despite of this, is good to know from an experienced user (you) some desync causes :) Also, one desync remains: I can't test using version 1.26a. Everyone gets disconnected.
 
Level 9
Joined
Apr 26, 2011
Messages
403
I am not a good world-editor programmer, but I understand how you feeling about desync problem. because it happen to me too (and took me a looooong time to fix).

usually I just avoid any strange code/function near my "wait(x second)".

and avoid those vJASS library that may outdate.

and I think floating text every second may leak ? leak/lag is another reason to cause desync too. so better post them and ask for check
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
When does everyone get disconnected in 1.26a? Would need to join the tests/have insight of the map.

More ansynchronous functions:
JASS:
native GetLocationZ takes location whichLocation returns real
constant native GetCameraField takes camerafield whichField returns real
constant native GetCameraEyePositionX/Y/Z takes nothing returns real
constant native GetCameraTargetPositionX/Y/Z takes nothing returns real

native UnitDamagePoint takes unit whichUnit, real delay, real radius, real x, real y, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns boolean
is said to have sync problems with Macs
 
Which one is it ?

  • Actions
    • Caméra - Pan camera for (Triggering player) to (Center of (Playable map area)) over 0.00 seconds
    • Caméra - Pan camera for (Triggering player) to (Center of (Playable map area)) with height 0.00 above the terrain over 0.00 seconds
    • Caméra - Pan camera as necessary for (Triggering player) to (Center of (Playable map area)) over 0.50 seconds
 
Level 9
Joined
Apr 26, 2011
Messages
403
"Wait" GUI action never/rarely cause descyn if you don't import any vJASS

just avoid "wait" with more than 5-10 seconds (and use timer instead).

reason is because:
- "wait" is not accuracy when lag happen
- "wait" is real time, mean it keep going when game is pause or delay
- some of vJASS advance/wierd function can force immediate shut down "wait" in wrong way or whatever.
 
Level 9
Joined
Apr 26, 2011
Messages
403
Which one is it ?

  • Actions
    • Caméra - Pan camera for (Triggering player) to (Center of (Playable map area)) over 0.00 seconds
    • Caméra - Pan camera for (Triggering player) to (Center of (Playable map area)) with height 0.00 above the terrain over 0.00 seconds
    • Caméra - Pan camera as necessary for (Triggering player) to (Center of (Playable map area)) over 0.50 seconds

avoid 3rd one. this action is design for single player only, so don't use it in multiplayer map.
 
Status
Not open for further replies.
Top