New Line of Sight code
Posted: 18 Aug 2012, 10:22
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?
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?