[A7.77 Com] num_clients and on_client bugs

Posted By: SchokoKeks

[A7.77 Com] num_clients and on_client bugs - 08/10/09 13:38

whilst programming and testing my online game (http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=283739), I've run into some problems.
I've done a few tests am I'm really sure these are engine bugs.
as you (conitec) are currently creating an MMO, I'm sure you are interested in this.
All tests have been run with dedicated server ("-sv -diag" command line). Everything was programmed in C-Script, which shouldn't make a difference.


1. num_clients inaccurate

after a few, lets say 20 joins from different ppl on your server the num_clients var does not return to 0 after all have left. I had it stuck to 1 or to 3, even though I pulled the network cable and waited for several minutes.
A possible reason: in A7.77 you always have to wait for a timeout before the server notices the disconnect. i often had players rejoin with the same name (-pl command line) before their disconnect event got triggered. maybe this screwes something up.


2. on_client and EVENT_DISCONNECT

The EVENT_DISCONNECT is triggered way too soon when there is even a small lag or drop in the connection.
the strange thing is: the connection isn't really lost.
if you dont't sys_exit on this event, the client can usually continue playing and still gets all the updates from the server. in that case, in on_server the EVENT_LEAVE isn'T triggered, too. so EVENT_DISCONNECT is way too sensitive.


3.

When the BPS send exceed the connection speed, in my case this happend because of too many send_skill() calls, the client will get the error message:
Warning W1404: Incompatible engine versions
this is missleading, but i guess this is because the packets get "damaged"


The server hardware:
Via C3 Processor 513 Mhz
256 GB Ram
Windows XP Professional SP3

Internet connection
1 Mbit up/8 Mbit down



Thank you for reading, I'm waiting for suggestions on this.
Posted By: jcl

Re: [A7.77 Com] num_clients and on_client bugs - 08/10/09 15:01

1) a client can reconnect when it was dropped due to a bad connection. In that case the number num_clients is indeed wrong. This will be fixed.

2) the dplay_timeout default value was too short in A7.70 and above. Set it to about 10 seconds. Otherwise you'll get false DISCONNECT events. The client was not disconnected, only the communication was interrupted.

3) packets can not be damaged. The reason of this problem was a too-small client data buffer, also in 7.70 and above, that triggers this message when it overflows. This is already fixed in 7.81. There is no fix on your side - I suggest to wait for the 7.81 release, and ignore the problem until then.
Posted By: SchokoKeks

Re: [A7.77 Com] num_clients and on_client bugs - 08/10/09 16:51

thanks for the fast reply

just a note to 2:
I had dplay_timeout set to 80, thats 5 seconds. but there was no five second lag before the EVENT_DISCONNECT was triggered.
But I'll try with 10 seconds and wait for the new version anyway.
I just hope that you'll release A7.81 as public beta and not the current A7.80 candidate
Posted By: jcl

Re: [A7.77 Com] num_clients and on_client bugs - 08/11/09 07:50

7.80 is already the public beta. 7.81 is not so suited for a release candidate as it contains some major internal changes, also to the multiplayer system, that have to be carefully tested.

However, I'll take care that a 7.81 based version comes out quite soon.
Posted By: SchokoKeks

Re: [A7.77 Com] num_clients and on_client bugs - 08/13/09 11:38

there might also be another problem with the num_clients and the on_server events. I used -diag mode to see the players joining and leaving the server and i once had a diag like this:

Player1 joined
Player2 joined

Player1 left
Player1 left

and num_clients was 1 afterwards although there was no one on the server.
the second "leave"-message seemed to have come from Player2 leaving.
this was still with the same game version as above with dplay_timeout set to 5 seconds
© 2024 lite-C Forums