New Line of Sight code

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderators: Moderators, Developers

Message
Author
Daedalus
Plain Yogurt
Plain Yogurt
Posts: 73
Joined: 09 Nov 2010, 16:20
Noob?: No

New Line of Sight code

#1 Post by Daedalus »

There are several new bugs now:

1. Sometimes it moves back and forth endlessly on two cells next to each other spamming "no line of sights from xyz". It should backlist those cells and try to move somewhere else, not between two cells which both do not work.

2. Similiar problem, it sees a monster, tries to move to it, moves out of sight, loses its target, tries to route normally again, sees the monster again, tries to reach it and so on...

3. It doesnt like corners. =D Bot often stands at the corner, acting like it can hit a target around the corner.

o= free tile
x= wall
P = player
T = target

oxooo
oxooo
Pxxxx
oooTo

How does it calculate how to hit a target and wether it has LoS?

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: New Line of Sight code

#2 Post by EternalHarvest »

That's about new code? New, compared with what?

Daedalus
Plain Yogurt
Plain Yogurt
Posts: 73
Joined: 09 Nov 2010, 16:20
Noob?: No

Re: New Line of Sight code

#3 Post by Daedalus »

r8099
r8092

If I am not mistaken, before those LoS fixes the bot's biggest problem was it mostly just stood at one point being unable to reach its target sometimes, now it is moving very supsiciously and I had to deactivate LoS check due to this and the other problems mentioned in the other thread. It works with little problems now compared to activated LoS check - works twice as good when judging from exp/h. :/

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: New Line of Sight code

#4 Post by EternalHarvest »

Better ask the committer.

It would be nice to have some unit tests for that.

Daedalus
Plain Yogurt
Plain Yogurt
Posts: 73
Joined: 09 Nov 2010, 16:20
Noob?: No

Re: New Line of Sight code

#5 Post by Daedalus »

unit tests?

ScrappyCoco
Noob
Noob
Posts: 1
Joined: 28 Sep 2012, 19:21
Noob?: Yes

Re: New Line of Sight code

#6 Post by ScrappyCoco »

Daedalus wrote:There are several new bugs now:

1. Sometimes it moves back and forth endlessly on two cells next to each other spamming "no line of sights from xyz". It should backlist those cells and try to move somewhere else, not between two cells which both do not work.

2. Similiar problem, it sees a monster, tries to move to it, moves out of sight, loses its target, tries to route normally again, sees the monster again, tries to reach it and so on...

3. It doesnt like corners. =D Bot often stands at the corner, acting like it can hit a target around the corner.
i have the same problems while botting at juperos 2, is there any fix to this?

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: New Line of Sight code

#7 Post by EternalHarvest »

Somebody should revert these changes as the contributor didn't react with anything in this topic.

Locked