r/programming • u/hazadess • Apr 23 '13
PathFinding algorithm, visually explained
http://qiao.github.io/PathFinding.js/visual/
2.2k
Upvotes
r/programming • u/hazadess • Apr 23 '13
View all comments
Show parent comment
1
u/[deleted] Apr 24 '13
What I meant was that the coordinates of your character are likely stored as x and y values and to update these you need to calculate newx= x+speed*sin(direction) as opposed to newx= x+speed
I agree, but this is the only reason I could think of why someone would use the "wrong" system. Anyone who has a job in the industry will know how to do this properly.
If you google for it you will find that apparently a lot of games have this issue, so maybe updating coordinates is a lot more time consuming than it seems.