Menu

#2550 turn-overflow on blocked monsters

closed
Code (550)
5
2006-08-02
2006-08-01
No

After summoning the orc on the attached picture i get
massive turn overflows. The bears are attackable and
I am not /invisible.

This is probably a pathfinding issue but i am not sure
why the orcs at the bottom do not try to attack the
black bears. The right one on the left tried to attack
the normal bear until i moved down. So there is no
pathfinding done before an attack-target is choosen.

Discussion

  • Hendrik Brummermann

    screenshot to reproduce

     
  • Hendrik Brummermann

    Logged In: YES
    user_id=990499

    Of course it is non-reproducable :-/

    But i get a few overflows which are not created by endTurn()
    The last number is the number of milliseconds used for the
    complete endTurn() method.

    - 0 3 3 3 3
    - 0 4 4 4 4
    - Turn duration overflow by 66 ms
    - 0 4 4 4 4
    - 0 3 3 3 3
    - 0 4 4 4 4

     
  • Hendrik Brummermann

    Logged In: YES
    user_id=990499

    After profiling marauroa.server.game.RPServerManager: The
    problem is in beginTurn();

    252877 - 0 0 0 0 4 4 5 8 8 8 279 279
    253188 - 0 0 0 0 3 3 5 9 9 9 285 285
    253477 - 0 0 0 0 3 3 5 9 9 9 270 270
    253786 - 0 0 0 0 3 3 5 8 8 8 276 276
    254101 - 0 0 0 0 4 4 6 9 9 9 287 287
    254435 - 0 0 0 0 4 4 6 8 8 8 317 317
    254435 - Turn duration overflow by 17 ms
    254993 - 0 0 0 0 3 3 5 9 9 9 558 558
    254993 - Turn duration overflow by 257 ms
    255291 - 0 0 0 0 3 3 5 8 8 8 297 298
    255604 - 0 0 0 0 3 3 17 19 19 19 306 306
    255605 - Turn duration overflow by 6 ms
    255892 - 0 0 0 0 3 3 7 10 10 10 287 287

    endTime[9] = System.currentTimeMillis();
    ruleProcessor.beginTurn();
    endTime[10] = System.currentTimeMillis();

     
  • Hendrik Brummermann

    Logged In: YES
    user_id=990499

    Oh, it is creature.logic(). The reasion why it is in
    beginTurn() instead of endTurn() is that summoned monsters
    are treated as NPCs. (They are in the npc-collection because
    they have no respawn-point.)

     
  • Hendrik Brummermann

    • status: open --> closed
     
  • Hendrik Brummermann

    Logged In: YES
    user_id=990499

    First guess was right: The time is spent in pathfinding
    until a timeout of 100ms is reached. Average pathfinding
    time is 0.095 ms (after spending some time in Nalwor).

    I decreased it to 10ms because 100 times the avarage value
    should be more than enough time to find a suitable path.
    There are a few cases in with a path is found in 100ms but
    not in 10ms but this can be ignored. In the cases i found
    the creature is nearly 2 screen-sizes away and needs to walk
    further away at the start of the path.

     

Anonymous
Anonymous

Add attachments
Cancel