philkuz / Combatix

Simple Top Down Game
0 stars 0 forks source link

SimpleAI hero movement bug #1

Closed philkuz closed 10 years ago

philkuz commented 10 years ago

The simpleAI movement experiences occasional random jumps that otherwise break the smooth metric of the movement. Likely something to do with the use of setX() and setY() or the location evaluation using dx and dy. Debug with a comparison between final point before new destination and the new destination.

philkuz commented 10 years ago

Similarly the randTurn() method experiences the same problem and also uses similar implementation. Likely the comparison aspect.

philkuz commented 10 years ago

Original lateral movement adjusted to the similar movement method of Player.angleAdj(), and the angular problems adjusted by adding difference comparison.