Friday, October 7, 2011

EQClassic - Client Synchronization III

I wrapped up client HP, mana, stamina (the yellow bar) and attribute (AC, ATK, STR - CHA, saves and weight) synchronization tonight. I am quite happy with the results and extremely satisfied with the low time impact (I thought this work was going to be a one hundred or more hour investment). I was able to breeze through this work quickly due to Harakiri's aid in formula discovery.

Just looking back on how things worked is hilarious. The previous approach was to simply force the server's levels of HP, mana and stamina onto the client with absolutely no regard for how the client natively functions. In fact, mana regeneration was roughly ten times faster than it should have been! The only EQEmu-based server I have ever played on is Shards of Dalaya, which also--at the time--forced server levels onto the client**, so it is probably safe to assume that current EQEmu protocol is to do the same.

This work emphasized the singlemost frustrating aspect of this project. It is difficult for the average player to distinguish a functional server (one that works, but is not accurate) from a great server, because all of the things they are concerned about are handled in the client and database. They do not care that they have too much mitigation AC, that their DoTs are generating too little hate, that their nukes are not resisted as often as they should be or that their client side penalties are not enforced on the server; all that they care about are the things they can see.

In any case, I will be resuming my work on finishing spell types and then I will transition into revamping my previous attempt at the combat system.

**How could I tell? Watch the HP regeneration in the inventory window. You will see the client fight the server for the correct amount of current HP, as the server is sending the client HP updates. The client should not be changing its current HP more than once every six seconds.

2 comments:

  1. Basing thoughts on how things work in EQEMu on how SoD worked is hilariously flawed.

    For one, SoD was for a long time (and might still be) a fork of a hilarious outdated version of EQEMu. You might as well say that Firefox 7 does not support HTTP/1.1 because Netscape Navigator doesn't.

    Secondly, SoD is explicitly not trying to be EverQuest. It is a completely different game that just happens to use the client, assets, and some of the same concepts. That mana regen (or whatever else) is not the same as it was on Sony's servers at whatever time the client was in use is not a failing at all. That is like saying a game that puts the value of an Ace as 1 is wrong because the instruction cards that came with your playing cards say they have the highest value.

    I do know that there were times when EQEMu supported these things properly as I know people that worked on doing it. I recall that getting the AC for Monks correct being especially tricky. However, when you are trying to hit a moving target mostly by blindly groping at changes things break. If the people that cared about them being correct got tried of fixing it or moved on to other things things being superficially working was Good Enough™ (think Worse is Better).

    ReplyDelete
  2. >>For one, SoD was for a long time (and might still be) a fork of a hilarious outdated version of EQEMu.

    Fair enough, let's review the current version of EQEmu:

    client_process.cpp - bool Client::Process(): line 665; invokes Client::DoHPRegen()
    client_process.cpp - void Client::DoHPRegen(): line 1905; invokes Mob::SendHPUpdate()
    mob.cpp - void Mob::SendHPUpdate(): line 1085; HP packet sent directly to the client

    This is the server forcing its representation of a client's HP onto the client. This is not synchronization; this is throwing values at the client stating, "Hey, I do not care what you believe your HP/mana/endurance should be. This is the value I have calculated for you, so you will accept it regardless if it is correct or not." If the server's calculations are incorrect (they most certainly are), then the client has no say in the matter. There are also times when the client and server will disagree on the state of the client, producing the incorrect calculation on the server and removing the benefits gained from the client (e.g., sitting and standing quickly while kiting for the meditation / hp regeneration bonus, which would be forcefully removed if the server saw your character's state as standing during the regeneration check).

    This is how things worked in EQEmu 3.X, this is how things work in EQEmu today, so I am confident that client synchronization was never accomplished by EQEmu.

    As I stated before, EQEmu is functional, but it is far from correct, and, unfortunately, the average player is unable to detect the difference and willing to accept what they see as correct.

    ReplyDelete