@amarillion/helixgraph
v0.7.5
Published
A collection of graph algorithms for game development
Downloads
166
Maintainers
Readme
helixgraph
A library of path finding & graph algorithms for game development, for JavaScript ES6
This library includes
- path finding algorithms such as A*, dijkstra, and breadth-first-search
- a few maze generation algorithms
The algorithms are suitable for tilemaps, regular grids, as well as (non-regular) graphs.
Installation
npm install @amarillion/helixgraph
TypeScript definitions are included
Live demo
Play with the live examples
Source code for all examples is on github.
Documentation
Chapter 1: How to represent graphs in JavaScript
Helixgraph's way of representing graphs is flexible, can be easily mixed with existing code, and can be used to represent all kinds of graphs: directed, undirected, sparse, dense, etc.
Chapter 2: Path finding algorithms
This section explains the use of three path finding algorithms: breadth first search, dijkstra, and A*
Chapter 3: Maze generation algorithms
Mazes are a type of graph, helixgraph includes a set of algorithms for procedural generation of mazes (which can then be solved again them using the algorithm of chapter 2).
Source
Source code: https://github.com/amarillion/helixgraph/
License: MIT