Research Article

Dead Reckoning Using Play Patterns in a Simple 2D Multiplayer Online Game

Algorithm 2

A*.
(1)   if the desired A* end destination location has changed since the last update then
(2)    recalculate an A* path to the desired location for and .
(3)   end if
(4)   if the next A* node in the path is reached then
(5)    increment the desired node location to the next node in the A* path.
(6)   end if
(7)   Use the next desired node location to calculate the vectors for and .
(8)   if the player is in battle then
(9)    
(10) else
(11)  
(12) end if