[Ask]can kore make a timeout on sent packet (Actor::move) ??
Page 1 of 1

Author:  rocknroll [ 28 Oct 2012, 21:17 ]
Post subject:  [Ask]can kore make a timeout on sent packet (Actor::move) ??

hello, i have a problem with the server which if the kore is moving, they surely spamm a packet move to server. a normally in other server it's not a problem, but my server took too long to response the requesting packet (to much botter), so the kore looks like lag.

so the question is, can i make a timeout on it??
maybe 2 sec once send the packet. how to edit/make it??

in timeouts.txt only ai_move_retry and ai_move_giveup related with the movement.

i want to make timeout on it, like an ai_attack in timeouts.txt

sorry for my bad english :mrgreen:

Author:  EternalHarvest [ 29 Oct 2012, 04:43 ]
Post subject:  Re: [Ask]can kore make a timeout on sent packet (Actor::move) ??

   $self->{retry}{timeout} = $args{retryTime} || 0.5;
   $self->{giveup}{timeout} = $args{giveupTime} || $timeout{ai_move_giveup}{timeout} || 3;

ai_move_retry is unused in Task::Move for some reason, probably should be used just like ai_move_giveup here. Was unused in old movement AI, too.

Author:  rocknroll [ 03 Nov 2012, 07:47 ]
Post subject:  Re: [Ask]can kore make a timeout on sent packet (Actor::move) ??

not ai_move_giveup, but to put a delay packet when moving, how to do that??

*sory i'm noob on perl :(

Author:  xxstreme [ 28 Apr 2013, 09:34 ]
Post subject:  Re: [Ask]can kore make a timeout on sent packet (Actor::move) ??

this problem was happen in server with large amount of player, in my playing server was 15000 player, and this was always happen with map full of bot,

i took a look at move source at src task folder, i think the problem was at send move packet, kore send move packet after checking timeout, not at the beginning of process move was called, when try to increase timeout ai_move_retry to 10, kore will wait that timeout before move, kore should be move once at begining before checking timeout of actor position whether actor still at same position.

and should have an delay between each send packet, when move packet and two or more packet send within rapid period, actor will not moving, and cause server will not response any send packet after a certain delay, likes a lag, any packet such public chat or group chat, npc talk etc.

add: in src/task/
at sub iterate

   } elsif (timeOut($self->{retry})) {
      debug "Move $self->{actor} - (re)trying\n", "move";
      $self->{actor}->sendMove(@{$self}{qw(x y)});
      $self->{retry}{time} = time;

the syntax was check for retry time first before send packet, if one move packet was send and server is lag, another will be send, this may cause for server not respond any send packet after second packet. and actor will move back and forth like bodyrelo.

i think, once send move packet, check current position, if not at begin position and not from goal position, kore must wait for a certain time, because if kore send any more packet, the server will take long time to response future packet.

in retry move, syntax just check current position, actor still at previous position or not,
i just know a little of this problem, and this happens at me too, but i still can't fix this

Author:  EternalHarvest [ 07 May 2013, 09:56 ]
Post subject:  Re: [Ask]can kore make a timeout on sent packet (Actor::move) ??

Doesn't it already stop trying to move if you have started movement?
   # Stop if we've moved.
   } elsif ($self->{actor}{time_move} > $self->{start_time}) {
      debug "Move $self->{actor} - done\n", "move";

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group