• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 17:57
CEST 23:57
KST 06:57
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Serral wins HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
Neeb returns to progaming; rejoins ONSYDE12Weekly Cups (July 20-26): Early returns on 5.0.16b8IntoTheTV X SOOP SC2 League : Weekly & Monthly4Clem: "I don't have that much hope in Blizzard"9ZeroSpace Early Access is Now Live!42
StarCraft 2
General
Clem: "I don't have that much hope in Blizzard" Neeb returns to progaming; rejoins ONSYDE Weekly Cups (July 20-26): Early returns on 5.0.16b Balance hotfix patch 5.0.16b (July 16) Terran or Protoss
Tourneys
RSL Revival: Season 6 - Qualifiers and Main Event PIG STY FESTIVAL 8.0! (13 - 23 August) Sparkling Tuna Cup - Weekly Open Tournament IntoTheTV X SOOP SC2 League : Weekly & Monthly INu's Battles#18 - Cure, herO, Rogue & ByuN
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
Mutation # 536 Railroad Switch The PondCast: SC2 News & Results Mutation # 535 Assembly of Vengeance Mutation # 534 Burning Evacuation
Brood War
General
BW Drama: Terror's Debt Incident + C9 disbanding BW General Discussion Making an Online Broodwar Manager Game ASL22 General Discussion screpdb: new Starcraft reporting tool
Tourneys
Small VOD Thread 2.0 2v2v2v2 Tournament [Megathread] Daily Proleagues Star Con San Diego 2026
Strategy
Fighting Spirit mining rates Odyssey Mineral Stack Saturation Simple Questions, Simple Answers PvT advise for noobs
Other Games
General Games
Path of Exile ZeroSpace Early Access is Now Live! Nintendo Switch Thread Stormgate/Frost Giant Megathread General RTS Discussion Thread
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Power Rank TL Mafia Community Thread NeO.D_StephenKing vs This Guy From 1 Million Dance
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread European Politico-economics QA Mega-thread How to buy a book - shipping from Korea to Europe
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! Series you have seen recently... [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread 2026-27 Football Thread placeholder TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion MLB/Baseball 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Simple Questions Simple Answers FPS when play League Of Legend on laptop
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
Games, Hormones, and "Dark" …
TrAiDoS
Hello guys!
LIN1s
ASL S22 English Commentary…
namkraft
Poker (part 2)
Nebuchad
An Exploration of th…
waywardstrategy
ramps on octagon
StaticNine
Customize Sidebar...

Website Feedback

Closed Threads



Active: 5297 users

Preventing Observer Desyncs

Forum Index > BW General
Post a Reply
tec27
Profile Blog Joined June 2004
United States3702 Posts
February 08 2022 02:03 GMT
#1
In the latest version of ShieldBattery, we've identified and fixed the bug that has been causing desyncs for observers. Since not every tournament is played through ShieldBattery, I thought I'd explain what the underlying cause is and how you can avoid triggering it in games you are observing.

tl;dr: How you can avoid triggering a desync as an observer
  • Observe games through ShieldBattery. We've fixed the bug so it won't occur in any games there.
  • Don't change the player vision settings once a unit requiring detection is in the game (includes both stealth and burrowed units)


Example of this occurring:

(starts around 44:11 in case the embed doesn't get the time)


What's going on

In StarCraft, detection is not removed immediately when the unit/building providing it goes away. You can see this pretty clearly if you kill a detector, there will be brief period where cloaked units can still be seen. When Blizzard added the observer mode, they mostly reused existing game logic to implement the various features, including switching between different player's vision. At some point they decided that the existing logic around stealth units (that detection would be applied after a delay) was unacceptable for observer mode: they wanted switching to a player's vision to apply the detection status immediately.

So, Blizzard wrote code to call a function to update the sprites for those units immediately, thinking it was safe. *But* that code actually calls through to update the "real" detection status for this unit as well (a value used by the game for simulating actual game logic). If this value differs from the values the actual players have, it risks causing a desync between the players and the observer.

Desyncs are often very subtle, e.g. they may just result in a different amount of random numbers being generated during a particular turn. But these things quickly add up over time: one extra random number during a turn might make a unit miss on one person's game when they hit on everyone else's, which then results in a unit dying when it lived in the "real" game, and then on and on until you get to extremely observable effects: tons of idle workers, units running to their death with no micro, etc.

So in the linked VOD above, the observer changes player visions around 44:27, when a DT is on the field. This triggers this desync, which the broadcast crew + Tastosis do not notice for about 2 minutes (although they are very confused!), which can show you how subtle this is.

On ShieldBattery, we've fixed this by preventing changes to the unit detection status outside of a particular code path, so if you're playing/observing games there, everything will fine. If you're playing games on LAN or Bnet, avoiding changing the player vision once any stealthed units are out should avoid the desync as well.
Can you jam with the console cowboys in cyberspace?
Dakota_Fanning *
Profile Joined January 2008
Hungary2368 Posts
Last Edited: 2022-02-08 11:51:31
February 08 2022 11:51 GMT
#2
Good job tec27, I still don't understand why Blizzard pays its employees instead of you.
https://repmastered.icza.net
Ziggy
Profile Blog Joined June 2013
South Korea2106 Posts
February 08 2022 11:51 GMT
#3
another victory for the private sector
WriterDefeating a sandwich only makes it tastier. @imjustziggy
oxKnu
Profile Joined December 2017
1262 Posts
Last Edited: 2022-02-08 13:07:32
February 08 2022 13:07 GMT
#4
Such a significant game-breaking bug for observing/replays.

At least the players can't be affected by it, which is just the fortunate side of it.
M3t4PhYzX
Profile Joined March 2019
Poland4267 Posts
February 08 2022 17:54 GMT
#5
Man I love this community.
IntoTheWow
Profile Blog Joined May 2004
is awesome32280 Posts
February 08 2022 18:18 GMT
#6
tec27, the one true king
Moderator<:3-/-<
ZZZero.O
Profile Joined July 2011
Poland1615 Posts
February 08 2022 19:06 GMT
#7
So all the desyncs could have been avoided! It was all my fault!
https://www.patreon.com/Bombastic || https://liquipedia.net/starcraft/Bombastic_StarLeague || https://linktr.ee/bombastic
earob84
Profile Joined October 2017
Germany177 Posts
February 08 2022 19:17 GMT
#8
Wow great Job tec!
Maybe you are the first person that found the reason for the obs-desyncing. Or does the korean community know about it?
Cryoc
Profile Joined July 2011
Germany913 Posts
February 08 2022 19:28 GMT
#9
Very nice find! With the workaround of not changing the vision, the future ASL games will be safe as well.
http://www.twitch.tv/cryoc
Grouhh
Profile Joined May 2019
57 Posts
February 09 2022 12:07 GMT
#10
You guys are awesome!
GG WP
oxKnu
Profile Joined December 2017
1262 Posts
February 09 2022 12:15 GMT
#11
Yeah, I imagine that the Korean community also knows about it now.

I know some users here are Koreans and will probably share this on ygosu and whatnot..
y2kid
Profile Joined May 2018
92 Posts
February 09 2022 12:51 GMT
#12
@ZZZero.O I do not think all the desyncs could have been avoided. Correct me if I am wrong, Tec, but he found one of the reasons why this happens. I have noticed that sometimes replays that are saved as LastRep.rep are desynced every time you watch them, but if you find the "auto-saved" replay it renders just fine. So the vision bug is one of the reasons for desync but I do not think all. Of course, we are talking replays vs live games but still it happens for a variety of reasons. Additionally, from watching the BSL casts, I have noticed that desyncs are more likely to occur if the latency between the players is not very good, i.e., when players from two continents play more desyncs occur compared to two opponents located geographically closer.
tec27
Profile Blog Joined June 2004
United States3702 Posts
Last Edited: 2022-02-09 19:49:29
February 09 2022 19:46 GMT
#13
On February 09 2022 03:18 IntoTheWow wrote:
tec27, the one true king

Credit where it's due, neive is the one who found this for us and developed a fix (and also developed our fix for the floating SCV glitch and various other exploits that still work on Bnet). He just doesn't post on TL and I thought this would be helpful for the community in general

On February 09 2022 21:51 y2kid wrote:
@ZZZero.O I do not think all the desyncs could have been avoided. Correct me if I am wrong, Tec, but he found one of the reasons why this happens. I have noticed that sometimes replays that are saved as LastRep.rep are desynced every time you watch them, but if you find the "auto-saved" replay it renders just fine. So the vision bug is one of the reasons for desync but I do not think all. Of course, we are talking replays vs live games but still it happens for a variety of reasons. Additionally, from watching the BSL casts, I have noticed that desyncs are more likely to occur if the latency between the players is not very good, i.e., when players from two continents play more desyncs occur compared to two opponents located geographically closer.

Yeah, replay desyncs are (mostly) a separate issue, and have been around since before SC:R and this change. If the same code is used while watching replays when changing player vision (I'm honestly not sure if it is or not, given that the UIs are implemented differently) this could have caused the same issues there, but there are also other cases where replays desync and I'm not entirely sure what the underlying cause is there.
Can you jam with the console cowboys in cyberspace?
Please log in or register to reply.
Live Events Refresh
OSC
18:30
Mid Season Playoffs
SteadfastSC200
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 660
SteadfastSC 200
UpATreeSC 108
ProTech77
CosmosSc2 29
StarCraft: Brood War
Calm 3612
NaDa 29
Purpose 8
League of Legends
Doublelift4425
Counter-Strike
minikerr60
Super Smash Bros
C9.Mang0154
Other Games
gofns11049
summit1g7144
tarik_tv5315
Gorgc2789
Grubby1531
Mlord413
ToD94
shahzam89
NeuroSwarm52
ViBE32
JuggernautJason28
Organizations
Other Games
BasetradeTV24
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 18 non-featured ]
StarCraft 2
• Hupsaiya 61
• musti20045 29
• RyuSc2 17
• Response 4
• IndyKCrew
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• FirePhoenix11
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• imaqtpie2470
• TFBlade787
• Shiphtur494
Upcoming Events
Replay Cast
2h 3m
Escore
12h 3m
CrankTV Team League
13h 3m
Big Brain Bouts
18h 3m
Spirit vs sOs
GgMaChine vs Percival
Serral vs MaxPax
OSC
1d
Replay Cast
1d 2h
Afreeca Starleague
1d 6h
RSL Revival
1d 11h
ByuN vs SHIN
Solar vs Lambo
WardiTV Summer Champion…
1d 13h
Afreeca Starleague
2 days
[ Show More ]
RSL Revival
2 days
Clem vs Serral
herO vs Rogue
WardiTV Summer Champion…
2 days
WardiTV Weekly
3 days
Sparkling Tuna Cup
4 days
PiGosaur Cup
5 days
Replay Cast
5 days
Kung Fu Cup
5 days
Replay Cast
6 days
The PondCast
6 days
Liquipedia Results

Completed

Proleague 2026-07-29
SCTL 2026 Spring
Eternal Conflict S2 Finale

Ongoing

CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026

Upcoming

Escore Tournament S3: W5
ASL Season 22: Qualifier #1
ASL Season 22: Qualifier #2
Acropolis #5
Escore Tournament S3: W6
Escore Tournament S3: W7
Escore Tournament S3: W8
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
PiG Sty Festival 8.0
Light Tournament 2026
ESL Pro League Season 24
Stake Ranked Episode 4
Logitech G Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.