Skip to content

Commit

Permalink
Updated to 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonaba committed Jan 22, 2013
1 parent ff33656 commit 009763b
Show file tree
Hide file tree
Showing 21 changed files with 1,452 additions and 849 deletions.
228 changes: 117 additions & 111 deletions README.md

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ <h2>Modules</h2>
<h2>Scripts</h2>
<ul>
<li><a href="scripts/init.html">init</a></li>
<li><a href="scripts/jumper.html">jumper</a></li>
<li><a href="scripts/pathfinder.html">pathfinder</a></li>
<li><a href="scripts/search.astar.html">search.astar</a></li>
<li><a href="scripts/search.jps.html">search.jps</a></li>
</ul>

</div>
Expand All @@ -48,7 +50,7 @@ <h2>Scripts</h2>



<h2>A 2D pathfinding library for uniform-cost grid based games</h2>
<h2>A pathfinding library for 2D grid based games</h2>

<h2>Modules</h2>
<table class="module_list">
Expand Down Expand Up @@ -76,8 +78,16 @@ <h2>Scripts</h2>
<td class="summary"><strong>The init hook file</strong>.</td>
</tr>
<tr>
<td class="name" nowrap><a href="scripts/jumper.html">jumper</a></td>
<td class="summary"><strong>The <code>pathfinder</code> class API</strong>.</td>
<td class="name" nowrap><a href="scripts/pathfinder.html">pathfinder</a></td>
<td class="summary"><strong>The <strong>pathfinder</strong> class API</strong>.</td>
</tr>
<tr>
<td class="name" nowrap><a href="scripts/search.astar.html">search.astar</a></td>
<td class="summary"><strong><code>A-star</code> algorithm</strong>.</td>
</tr>
<tr>
<td class="name" nowrap><a href="scripts/search.jps.html">search.jps</a></td>
<td class="summary"><strong><code>Jump Point Search</code> algorithm</strong>.</td>
</tr>
</table>

Expand Down
4 changes: 3 additions & 1 deletion docs/modules/core.bheap.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ <h2>Modules</h2>
<h2>Scripts</h2>
<ul>
<li><a href="../scripts/init.html">init</a></li>
<li><a href="../scripts/jumper.html">jumper</a></li>
<li><a href="../scripts/pathfinder.html">pathfinder</a></li>
<li><a href="../scripts/search.astar.html">search.astar</a></li>
<li><a href="../scripts/search.jps.html">search.jps</a></li>
</ul>

</div>
Expand Down
6 changes: 4 additions & 2 deletions docs/modules/core.grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ <h2>Modules</h2>
<h2>Scripts</h2>
<ul>
<li><a href="../scripts/init.html">init</a></li>
<li><a href="../scripts/jumper.html">jumper</a></li>
<li><a href="../scripts/pathfinder.html">pathfinder</a></li>
<li><a href="../scripts/search.astar.html">search.astar</a></li>
<li><a href="../scripts/search.jps.html">search.jps</a></li>
</ul>

</div>
Expand All @@ -59,7 +61,7 @@ <h1>Module <code>core.grid</code></h1>
<p><strong>The <code>grid</code> class API</strong>.</p>
<p> This file contains the implementation of a <a href="../modules/core.grid.html#core.grid">grid</a> class, internally used by the
search algorithm. The <a href="../modules/core.grid.html#core.grid">grid</a> object is automatically generated upon initialization of the
<code>pathfinder</code> object, passing it a mandatory <em>collision map</em>.
<a href="../scripts/pathfinder.html#">pathfinder</a> object, passing it a mandatory <em>collision map</em>.
During a search, the pathfinder evaluates <strong>costs values</strong> for each node being processed, in order to
select, after each step of iteration, what node should be expanded next to reach the target
optimally. Those values are cached within an array stored in the <a href="../modules/core.grid.html#core.grid">grid</a> object.
Expand Down
8 changes: 5 additions & 3 deletions docs/modules/core.heuristics.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ <h2>Modules</h2>
<h2>Scripts</h2>
<ul>
<li><a href="../scripts/init.html">init</a></li>
<li><a href="../scripts/jumper.html">jumper</a></li>
<li><a href="../scripts/pathfinder.html">pathfinder</a></li>
<li><a href="../scripts/search.astar.html">search.astar</a></li>
<li><a href="../scripts/search.jps.html">search.jps</a></li>
</ul>

</div>
Expand All @@ -62,7 +64,7 @@ <h1>Module <code>core.heuristics</code></h1>

<p> This script holds the definition of built-in heuristics available.</p>

<p> Distance functions are internally used by the <code>pathfinder</code> to evaluate the optimal path
<p> Distance functions are internally used by the <a href="../scripts/pathfinder.html#">pathfinder</a> to evaluate the optimal path
from the start location to the goal. These functions share the same prototype:
<ul>
<pre class="example">
Expand Down Expand Up @@ -130,7 +132,7 @@ <h2><a name="Functions"></a>Functions</h2>
</dt>
<dd>
Manhattan distance.
<br/>This heuristic is the default one being used by the <code>pathfinder</code> object.
<br/>This heuristic is the default one being used by the <a href="../scripts/pathfinder.html#">pathfinder</a> object.
<br/>Evaluates as <code>distance = |dx|+|dy|</code>

<h3>Parameters:</h3>
Expand Down
6 changes: 4 additions & 2 deletions docs/modules/core.node.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ <h2>Modules</h2>
<h2>Scripts</h2>
<ul>
<li><a href="../scripts/init.html">init</a></li>
<li><a href="../scripts/jumper.html">jumper</a></li>
<li><a href="../scripts/pathfinder.html">pathfinder</a></li>
<li><a href="../scripts/search.astar.html">search.astar</a></li>
<li><a href="../scripts/search.jps.html">search.jps</a></li>
</ul>

</div>
Expand All @@ -62,7 +64,7 @@ <h1>Module <code>core.node</code></h1>
and then stored within the <a href="../modules/core.node.html#core.grid">grid</a> object.</p>

<p> In the following implementation, nodes can be compared using the <code>&lt;</code> operator. The comparison is
made on the basis of their <code>f</code> cost. From a processed node, the <code>pathfinder</code> would expand the search
made on the basis of their <code>f</code> cost. From a processed node, the <a href="../scripts/pathfinder.html#">pathfinder</a> would expand the search
to the next neighbouring node having the lowest <code>f</code> cost. This comparison is internally used within the
<em>open list</em> <code>heap</code> to quickly sort all nodes queued inside the heap.
</p>
Expand Down
12 changes: 7 additions & 5 deletions docs/scripts/init.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ <h1>Jumper</h1>
<h2>Scripts</h2>
<ul>
<li><strong>init</strong></li>
<li><a href="../scripts/jumper.html">jumper</a></li>
<li><a href="../scripts/pathfinder.html">pathfinder</a></li>
<li><a href="../scripts/search.astar.html">search.astar</a></li>
<li><a href="../scripts/search.jps.html">search.jps</a></li>
</ul>
<h2>Modules</h2>
<ul>
Expand All @@ -55,23 +57,23 @@ <h1>Script <code>init</code></h1>
<p> The default way to import Jumper in your project is the following:
<ul>
<pre class="example">
local Jumper = require (&quot;Jumper.init&quot;)
local Pathfinder = require (&quot;jumper.init&quot;)
</pre></ul></p>

<p> The call to <code>init.lua</code> was meant for package self-containment purposes.
<p> The call to <code>init.lua</code> was meant for self-containment purposes.
On some Lua distributions, the package of modules contains the pattern <code>init.lua</code>.
In this case, to import the library in your project, you can just write the following:
<ul>
<pre class="example">
local Jumper = require (&quot;Jumper&quot;)
local Pathfinder = require (&quot;jumper&quot;)
</pre></ul></p>

<p> Optionnally, you can also add the pattern <code>init.lua</code> in your package of modules.
Therefore, the syntax can be shortened:
<ul>
<pre class="example">
package.path = package.path .. (&quot;;.\\?\\init.lua&quot;)
local Jumper = require (&quot;Jumper&quot;)
local Pathfinder = require (&quot;jumper&quot;)
</pre></ul></p>
<h3>Info:</h3>
<ul>
Expand Down
Loading

0 comments on commit 009763b

Please sign in to comment.