Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: How to prevent DESYNC Drop
How to prevent DESYNC Drop
Apr 27 2017, 5:38 am
By: Veta  

Apr 30 2017, 4:15 pm outlawpoet Post #21



Quote
What conditions are required? Can you do it with 2 people? How long does it take? Can you make a test map that cuts down this time?


Conditions required: CCMU, a trigger that attempts to create units, and likely something in the index needing to get replaced or updated while that trigger cycle is happening. My guess for why it happens more frequently and reliably on diplomacy gold as compared with other maps at CCMU is that the index is updated between trigger cycles, and diplo gold does not have hyper triggers. Meaning, there's a far longer timeframe for players to adjust the index (via production or kills) during that same trigger cycle.

Can do it with two people, takes no time at all. Time isn't a factor, it happens as quickly as the above conditions are met.

I might could make a test map that cuts down the time to reproduce the bug (shit, just add some units and money to diplo gold and it'll do just fine), but I don't have a need. I consider this a resolved issue.

Quote
You mentioned a CCMU counter, did this in any way help with preventing desync? How would it?
Step by step:

1. Perfect unit counter. Count all double units, neutral units, etc. for all players. This is the "hard" part, especially since you can't always do a catch-all "All players" "any unit" count because of the conditions necessary for the triggers below. Unless you want to write 1000+ triggers by hand, you'll need a script to write this, and you also have to make some decisions here. You'll need to determine how precisely you want to count the units (i.e. how many triggers you want), and how many you need to count based on how many of each unit each player can acquire. There are some other factors too, depending on how much adjusting you want to do based on the overall unit count.
2. Block all "create unit" triggers in CCMU conditions. If unit count is >1650, turn off all hero replacement triggers, all create unit triggers, anything that would adjust the index with triggers. You can stop here and it will likely no longer desync, but ccmu sucks and you can't be 100% sure so:
3. Prevent CCMU in the first place by having unit limits that adjust to the # of players and the available units on the map. In 7 player diplo an appropriate army limit is something around 120, increasing to roughly 400 in 1v1.
4. An enterprising player can still cause CCMU with buildings, so dynamically adjust the map to the CCMU -- remove neutral units, buildings, and defenses where appropriate, and then start removing player units. If you have exploitable units like cheap supply depots or pylons or exploitable mechanics like lights off stacking, consider adding a building limit for those things.
5. Prevent stalemates, boring turtling, and unit whoring by encouraging offensive play. Setting incomes and army sizes appropriately will go a long way here, but also consider terrain and cost efficiency of defensive structures and artillery. The more cost-efficient it is to defend vs. attack, the more likely it is to reach CCMU.

Post has been edited 2 time(s), last time on Apr 30 2017, 4:21 pm by outlawpoet.



None.

Apr 30 2017, 10:13 pm Veta Post #22



Quote from outlawpoet
Conditions required: CCMU, a trigger that attempts to create units, and likely something in the index needing to get replaced or updated while that trigger cycle is happening. My guess for why it happens more frequently and reliably on diplomacy gold as compared with other maps at CCMU is that the index is updated between trigger cycles, and diplo gold does not have hyper triggers. Meaning, there's a far longer timeframe for players to adjust the index (via production or kills) during that same trigger cycle.

Can do it with two people, takes no time at all. Time isn't a factor, it happens as quickly as the above conditions are met.

I might could make a test map that cuts down the time to reproduce the bug (shit, just add some units and money to diplo gold and it'll do just fine), but I don't have a need. I consider this a resolved issue.
What do you think about making a simple test map and a super short replay we can attach in a bug report on the SC:Remastered bug report forums? If this is as easy to reproduce as you claim then the devs will be able to address it. If it's something weird with terrain, sprites or netcode as others suggest it will be much harder.

Quote from outlawpoet
Quote
You mentioned a CCMU counter, did this in any way help with preventing desync? How would it?
Step by step:
Have you made an edit of Diplomacy Gold using your system, or any map at all that used to desync before implementation?



None.

May 1 2017, 6:42 am outlawpoet Post #23



Quote
What do you think about making a simple test map and a super short replay we can attach in a bug report on the SC:Remastered bug report forums? If this is as easy to reproduce as you claim then the devs will be able to address it. If it's something weird with terrain, sprites or netcode as others suggest it will be much harder.

I don't have much faith in this process, plus I'm already too lazy to finish my own maps.

Quote
Have you made an edit of Diplomacy Gold using your system, or any map at all that used to desync before implementation?

Koreans did a primitive one that removes computer units when human players get to a certain unit threshold. This was a one-time trigger and the map would still desync at CCMU afterwards, so it didn't work too well. I tried to include a better solution with a unit counter in my version but it was before I knew about double units, so it failed. This was years ago. Maps I've made since then haven't desynced since I made them properly from the start. I could copy and paste my unit counter into diplo gold and it would no longer desync though.



None.

May 2 2017, 12:44 am Veta Post #24



Yes it does sound like the issue is resolved then :lol:

I have sent some replays to the forums but even the replays desync :lol:



None.

May 7 2017, 6:25 pm Veta Post #25



SOLVED

Source: http://www.staredit.net/topic/17103/#9
Map Link: https://www.dropbox.com/s/azl8qhx9zlg3mzq/FogOfWar%20Desync%20Test.scm?dl=0

BW has an image limit of 5000. When this limit is hit it causes new images (such as shadows, puffs of smoke) to not appear and units not to spawn.

Because fog-of-war is not synchronous across players in multiplayer games fog-of-war sprites (like buildings, etc.) can cause a person with more fogged buildings to hit the image limit earlier and desynchronize.

The link above has a proof of concept map that shows this desync in action. The map is barely below image limit, and one player sees an additional fog sprite, which causes them to hit the cap before the second player, resulting in desync.



None.

May 7 2017, 11:11 pm Veta Post #26



Additional explanation for posterity:
https://www.dropbox.com/s/azl8qhx9zlg3mzq/FogOfWar%20Desync%20Test.scm?dl=0
Explanation of Test Map:
Our goal is to cause as simple a reproducible desynchronization as possible.

Map Image limit is precisely 4995, so we want to show <4995 images to one player and 4995 to the other. Then we try to show both players another image (e.g. by spawning a unit) and for the first player it works fine but the second player cannot go over the image limit so in his client nothing spawns resulting in desync.
-----
Map contains 3 groups of supply depots, stacked in piles of 665, 499 and 1. Total 1165. Each depot costs 3 images, so 1165*3=3495.

Then we go to the Fog of War map editor layer and reveal the stack of 499 depot to both players and the 1 depot stack to only one player. Neither player can see the stack of 665 depots, though it wouldn't matter if they could since the FOW sprite limit is 500 and additional FOW sprites just won't appear. Sprites can be made of multiple images, 3 in the case of supply depots.

So at game start, one player sees 499 depot sprites on their FOW and the other sees 500 depot sprites. FOW sprites are non-synchronized and count on top of the synchronized 3495, so the actual image counts for our players are (1165+499)*3=4992 and (1165+500)*3=4995, respectively.

Spawning a Marine is enough to cause the 4995 player to desynchronize and not see any units spawn.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
Please log in to shout.


Members Online: Zoan, Roy