You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3816a6b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+10-64Lines changed: 10 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,11 @@ astar-algorithm-cpp
4
4
Summary
5
5
-------
6
6
7
-
This code is an efficient implementation in C++ of the A* algorithm. It accompanies the A* tutorial on this site: http://www.heyes-jones.com/astar.html
7
+
This code is an efficient implementation in C++ and C# of the A* algorithm. It accompanies the A* tutorial on this site: http://www.heyes-jones.com/astar.html
8
8
9
-
The code has been used in several popular video games including THQ's "Company of Heroes", Activision's "Gun" as well as in the popular game prototyping engine Angel. http://code.google.com/p/angel-engine/
9
+
Thank you @ScaryG for the C# port. This should work on Unity as well as the .net or mono platforms.
10
+
11
+
The CPP code has been used in several popular video games including THQ's "Company of Heroes", Activision's "Gun" as well as in the popular game prototyping engine Angel. http://code.google.com/p/angel-engine/
10
12
11
13
It has also used in many University assignments and projects.
12
14
@@ -28,10 +30,10 @@ Using this code:
28
30
* Company of Heroes and Company of Heroes Online, Relic Entertainment
29
31
* Angel Engine, a game prototyping engine http://code.google.com/p/angel-engine/
30
32
31
-
Installing
32
-
==========
33
+
Compilation
34
+
===========
33
35
34
-
Build in place using:
36
+
Build via GCC like so:
35
37
36
38
g++ findpath.cpp -o findpath
37
39
@@ -79,68 +81,12 @@ Microsoft Visual C++ : Confirmed working with version 8.0.50727 with some deprec
79
81
I'm going to leave the deprecation warnings in so that it still works cleanly with GCC.
80
82
TODO Make a non-deprecated compliant version using compiler checking
81
83
82
-
GCC notes : Compiled using version 3.4.4
84
+
GCC notes : Compiled using version 4.2.1
83
85
84
86
Please let me know if it doesn't work for you and I will try to help. I cannot help if you are using
85
87
an old compiler such as Turbo C++, since I update the code to meet Ansi Standard C++ as required.
86
-
87
-
At least in as far as the Microsoft and GCC compilers adhere to Ansi and add breaking changes.
88
-
89
-
History:
90
-
91
-
Updated 3rd August 2006
92
-
-----------------------
93
-
94
-
Fixed memory leak
95
-
Fixed special case handling for finding better path to a closed node
96
-
Fixed bug with comparing the start node with a new node by pointer instead of value
97
-
Changed code to use Manhattan distance heuristic with pathfind.cpp as it is more correct
98
-
99
-
100
-
Updated 27th September 2005
101
-
---------------------------
102
-
103
-
Thanks to Gyan singh for pointing out the code no longer compiles under GCC.
104
-
105
-
Well, that was the case. I've removed a Gnu offending conio.h include, and added lots more typename
106
-
keywords, which seem to be required now when making an iterator using a template type.
107
-
108
-
If anyone knows what the breaking change to the compiler was for, let me know.
109
-
110
-
Updated 6th September 2005
111
-
--------------------------
112
-
113
-
Finally set the path to fsa.h correctly, sorry about that.
114
-
8puzzle.cpp now defaults to using a demo puzzle that solves in a short time.
115
-
Added typename keyword to comply with latest ISO standards.
116
-
117
-
Updated November 26th 2001
118
-
--------------------------
119
-
120
-
Fixed a bug. When a node is deleted from the Open list I did sort_heap when make_heap
121
-
is needed to keep the heap structure valid. This causes the search to go awry under some
122
-
conditions. Thanks to Mike Ryynanen for tracking this down.
0 commit comments