Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - aslfkjasfkahfsafahslh

Pages: [1]
1
Mods & Development / Re: Improving Warlat
« on: April 14, 2015, 05:59:16 PM »
Chat log with author of LatencyChanger

Spoiler
[23:21] <wqerqweqwe> hey
[23:21] <wqerqweqwe> you're the author of LatencyChanger
[23:21] <wqerqweqwe> right?
[23:22] <The-Winner> hi
[23:22] <The-Winner> yes
[23:22] <wqerqweqwe> you know there's a game called warcraft 2 battle.net edition
[23:22] <wqerqweqwe> which is pretty similar to SC
[23:22] <wqerqweqwe> in that game there is a program called "Warlat"
[23:22] <wqerqweqwe> that allows to reduce userlatency by 1 in latency dialog
[23:22] <wqerqweqwe> but this is still slow
[23:22] <wqerqweqwe> would it be possible to apply the "Singleplayer latency"
[23:22] <wqerqweqwe> or LAN Latency
[23:22] <wqerqweqwe> to this game?
[23:22] <wqerqweqwe> i disassembled Warlat and found how it works
[23:23] <The-Winner> Possibly.
[23:23] <The-Winner> In SC there are two values which determine latency
[23:23] <wqerqweqwe> yes, as far as i understand, latencychanger allows to do 2 things:
[23:23] <The-Winner> one is the value from the dialog, which can be reduced one below the values you can choose.
[23:24] <The-Winner> There is some other latency changer for SC that changes this value
[23:24] <The-Winner> the other value determines on which frames commands are executed.
[23:24] <The-Winner> It's computed from the game speed and certain hardcoded milliseconds values
[23:24] <wqerqweqwe> how did you find that value?
[23:25] <The-Winner> comes out as 2 for LAN and 5 for BNET if you have the fastest game speed
[23:25] <wqerqweqwe> so if i start a singleplayer game and search for "1"
[23:25] <wqerqweqwe> a LAN game and i search for "2"
[23:25] <wqerqweqwe> and a BNET game and i search for "5"
[23:25] <wqerqweqwe> i will find the value?
[23:25] <The-Winner> I think I searched for values which is fulfills bnet>lan>singleplayer
[23:26] <The-Winner> takes multiple rounds of searches and some experimentation to narrow it down
[23:26] <The-Winner> Changing that value itself didn't work well, since it got overwritten at an annoying point during the game start and must reliably be the same for all players
[23:27] <The-Winner> so I instead modified the code which reads that value to always return 2
[23:27] <The-Winner> I'm not certain that the values will be 2 and 5 for wc2
[23:28] <The-Winner> they might have tuned them, or perhaps wc2 game speeds are different
[23:28] <wqerqweqwe> so game speed affects the value too?
[23:28] <wqerqweqwe> wc2 has different speed options from sc
[23:30] <The-Winner> yes, it's computed by dividing some millisecond value by the duration of a frame (42ms on fastest)
[23:30] <wqerqweqwe> so on bnet, no matter what latency, that value is always 5?
[23:31] <The-Winner> the value doesn't depend on the latency setting from the dialog
[23:31] <The-Winner> but it depends on the game speed
[23:31] <wqerqweqwe> so for lowest dlay you have to both change the dialog and this value?
[23:31] <The-Winner> yes
[23:32] <The-Winner> but if you go below the latency of the network you'll introduce lag
[23:32] <wqerqweqwe> yeah
[23:33] <wqerqweqwe> so "5" is only when playing at fastest in bnet?
[23:33] <The-Winner> since the network mode dependent value also reduces the variance of the latency and not just the latency, it's better to reduce it
[23:33] <wqerqweqwe> and when playing at slow speed in bnet, the value is different?
[23:33] <The-Winner> yes
[23:33] <The-Winner> at least that's what I remember. It's been a long time since I looked into that stuff.
[23:35] <wqerqweqwe> then it's possible to find it by just going in singleplayer, messing around with speed and just checking for changed values?
[23:35] <wqerqweqwe> i'm trying to find it atm
[23:36] <The-Winner> most memory searchers allow you to search for values which increased/decreased since the last search
[23:36] <wqerqweqwe> so i decrease speed and search for increased value?
[23:36] <The-Winner> if you start a bunch of games in singleplayer/lan/bnet and do searches between each, that should narrow it down
[23:37] <The-Winner> I think I kept the speed at the same value always
[23:37] <The-Winner> but changing it might narrow it down further
[23:37] <wqerqweqwe> but game speed options in singleplayer are different from game speed options in bnet
[23:37] <wqerqweqwe> in war2, "fastest" speed in singleplayer is much slower than "fastest" in bnet
[23:37] <The-Winner> I think on singleplayer the value is always 1, regardless of speed
[23:38] <The-Winner> and even on bnet, changing you probably need to change the speed by several notches to change the value
[23:48] <wqerqweqwe> found a few values which are "1" in singleplayer and "5" in bnet
[23:48] <wqerqweqwe> but changing them seems to do nothing
[23:50] <The-Winner> I had to change the code reading the value for some reason. But I think that wasn't required for the basic working, only to make the game start reliably in multiplayer
[23:51] <The-Winner> But perhaps it's not 5 in WC2
[23:51] <wqerqweqwe> i found 1 value which is always "1" in singleplayer and always "2" in LAN
[23:51] <wqerqweqwe> tried changing it
[23:51] <The-Winner> I'd try a generic bigger/smaller search instead of searching for concrete values
[23:51] <wqerqweqwe> and nothing changed
[23:52] <wqerqweqwe> what is the value type?
[23:52] <wqerqweqwe> it's a byte?
[23:53] <The-Winner> A byte search should work. A bigger size might work as well, since it's quite possible that the following bytes are always 0.
[23:58] <The-Winner> good night
[23:58] <wqerqweqwe> GN

2
Mods & Development / Improving Warlat
« on: April 14, 2015, 05:10:35 PM »
Warlat latency is quite slow. In Starcraft there is this program called "LatencyChanger", which allows to use "Singleplayer" latency when playing online (so it is much faster). It has 2 operation modes:

A) Reduce latency to certain number. Latency can be set between 1 and 5. 1 is Singleplayer latency, 2 is LAN latency, 5 is Battle.net.
B) In latency dialog in-game, reduce all options by 1, so Low latency becomes a new "Very low", High becomes Low, etc.

Warlat implements B). So is there some way that A) could be implemented for War2?

What Warlat does is write the following memory:

0x47862E - 0x90, 0x49, 0x90, 0x90
0x478632 - 0x89, 0x90, 0x90, 0x90

Result: It is now allowed to select the lowest possible latency mode that is possible through B).

What LatencyChanger does is write the following memory:

For mode A: 0x4D94EB - 0xB8, (latency value), 0x00, 0x00, 0x00, 0x90, 0x90
For mode B: 0x4859D7 - 0xBE, 0x01, 0x00, 0x00, 0x00, 0x90

Pages: [1]