HTML and CSS Reference
In-Depth Information
Simple A* Path Finding on a Tile Grid
Nextwearegoingtotakealookatasubjectthatappliestomanygames, PathFinding .Weare
going to revisit the tile-based grid drawing from Chapter 4 and apply JavaScript path finding
algorithms to the game screen. This type of logic can be used in many types of games, from
the simplest Pac-Man style contests to the most complicated 3D shooters. We are not going to
develop our own path finding algorithms in this chapter; instead, we will make use of a pre-
existing A-Star (or A* as we will continue to call it over the next few sections) and use the
canvas to display the results.
Search WWH ::




Custom Search