|
So I finally got around to taking a look at the lag issues in 1.16. Seems someone at Blizzard thought it would be a good idea to throw a 10ms delay into the game loop AND a 5ms delay after processing the Windows message queue. 15ms of delays in a game that previously has 0ms of delays can mess up quite a few things, as evidenced by the problems the early versions of CPU Savior had. For a game with a pro scene like Starcraft, this really should never have made it past QA, if there even was any.
Why 15ms? Who knows. The most you need is 1ms to stop 100% CPU usage, which is what CPU Savior uses. They also added some delays onto the bnet screens (the game loop isn't run on the bnet screen, so the 15ms delays wouldn't work), very similar to the comments I made in the CPU Savior source code - except instead of delaying on infrequently-used parts of the code, there is a 5ms delay on code that is run very often - hence why the bnet screens feel so sluggish.
So what happens now? I could make a patch to fix the lag issues in 1.16, but what would that achieve? Iccup already is remaining on 1.15.3, KeSPA has shunned 1.16 and I would hope Blizzard already realizes what a disaster of a patch 1.16 is. Why are they taking so long to fix what I could do in a few hours? And who is responsible for this mess in the first place?
|
Germany / USA16648 Posts
random interns doing the patches now huh
|
Aotearoa39261 Posts
First step in making SC obsolete in preparation for SC2
|
Sydney2287 Posts
So when is Bliz hiring R1CH and taking him away from us?
|
Aotearoa39261 Posts
Fuck what we need is a huge petition -.-;
|
|
On December 16 2008 19:24 Plexa wrote: Fuck what we need is a huge petition -.-; I'm sure they are very aware of the problem - if KeSPA aren't using 1.16 they surely have some contacts there to figure out why.
|
Patch 1.16.1 is something we can all put on our christmas wishlists. I would want latency changer on the patch too, but I'm scared the programmers would mess that up also.
|
As far as I'm aware there are already 1.16 versions of latency changer and other MoC plugins, but you have to download them manually.
|
r1ch
I am just a beginner programmer so to say, how could you know the exact numbers of delaying? I am curious
|
True, but having it part of the standard package would be a bonus (if it worked like it was supposed to). Some of us enjoy playing random public games now and then and it would be nice to have these be closer to a LAN experience.
|
Netherlands19124 Posts
Decompiling?
Nice blog btw R1CH, and Plexa it's all a conspiracy!!
|
|
On December 16 2008 19:33 freelander wrote: r1ch
I am just a beginner programmer so to say, how could you know the exact numbers of delaying? I am curious I used OllyDbg to disassemble BW while it was running and added breakpoints on Sleep until I found the main culprits:
CPU Disasm 004D1B69 6A 05 push 5 004D1B6B |. FF15 0CE14F00 call dword ptr ds:[<&KERNEL32.Sleep>] This one is right after the Win32 message loop, so I'm assuming its some kind of delay executed when there are no pending messages. The above ASM code is equivalent to Sleep (5) in C.
CPU Disasm 004D92AB |. FF15 C4E04F00 call dword ptr ds:[<&KERNEL32.GetTickCount>] 004D92B1 |. 8B15 4C636D00 mov edx,dword ptr ds:[6D634C] 004D92B7 |. 8BC8 mov ecx,eax 004D92B9 |. 2BCA sub ecx,edx 004D92BB |. 83F9 0A cmp ecx,0A 004D92BE |. 73 16 jnb short 004D92D6 004D92C0 |. B8 0A000000 mov eax,0A 004D92C5 |. 2BC1 sub eax,ecx 004D92C7 |. 3D C8000000 cmp eax,0C8 004D92CC |. 73 07 jnb short 004D92D5 004D92CE 50 push eax 004D92CF FF15 0CE14F00 call dword ptr ds:[<&KERNEL32.Sleep>] 004D92D5 |> C3 retn This is the nasty code - it checks how much time has passed since the game last checked the time (GetTickCount). If it's less than 10ms, it sleeps for whatever duration is needed to make 10ms with some kind of sanity check where it won't sleep for more than 200ms.
|
I'm glad someone knowledgeable looked at this patch and can actually say what is wrong with it. It has totally killed bnet for me and I resent the fact that Blizzard could be so irresponsible as to release such a crappy patch without apparently having any review or testing of it.
|
Netherlands19124 Posts
|
Braavos36362 Posts
hahah i like reading r1chs posts its like another language
|
How the hell do you learn all this..
sick
|
Yup he sees something that more or less no one else does apparently including the blizz people that coded it.
|
The scary part is, i can read some of that assembler code. Although i've never disassembled any x86 code - just had basic 8081 assembler in university.
Anyways ... hope for 1.16.1 - I am noot and play bnet so 1.15.3 isnt an option.
|
|
|
|