All Projects → Tunied → cepathfind

Tunied / cepathfind

Licence: other
a path find for tilebase game in unity

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to cepathfind

hierarchical-pathfinding
Implementation of Near-Optimal Hierarchical Pathfinding (HPA*) algorithm in Unity, tested with maps from Dragon Age: Origins
Stars: ✭ 90 (+200%)
Mutual labels:  pathfinding, astar-pathfinding
AI-Companion
Created in Unity 5 for the purposes of learning AI techniques. Features behaviour trees and A* pathfinding.
Stars: ✭ 22 (-26.67%)
Mutual labels:  pathfinding, astar-pathfinding
unity-dijkstras-pathfinding
Dijkstra's Pathfinding Algorithm Unity Implementation. (Not being maintained by me, it is just an experiment.)
Stars: ✭ 80 (+166.67%)
Mutual labels:  pathfinding, unity-3d
tektosyne
The Tektosyne Library for Java provides algorithms for computational geometry and graph-based pathfinding, along with supporting mathematical utilities and specialized collections.
Stars: ✭ 52 (+73.33%)
Mutual labels:  pathfinding, astar-pathfinding
Baritone
google maps for block game
Stars: ✭ 3,868 (+12793.33%)
Mutual labels:  pathfinding, astar-pathfinding
Navmesh
A plugin for path-finding in JS using navmeshes, with wrappers for Phaser 3 and Phaser 2
Stars: ✭ 186 (+520%)
Mutual labels:  pathfinding
evosim-prototype
3D artificial life simulator
Stars: ✭ 34 (+13.33%)
Mutual labels:  unity-3d
Pathfinding
Visual explanation of pathfinding algorithms and how a*, Dijkstra and BFS can be seen as the same algorithm with different parameter/data structures used under the hood
Stars: ✭ 165 (+450%)
Mutual labels:  pathfinding
Simple Optimized A Pathfinder
An simple and optimized grid pathfinding
Stars: ✭ 157 (+423.33%)
Mutual labels:  pathfinding
pathfinding-visualizer
Website built using React Framework for visualizing Pathfinding and Maze Generation Algorithms.
Stars: ✭ 33 (+10%)
Mutual labels:  pathfinding
download.unity.com
Unity Download http://unity3d.com/unity/download/archive
Stars: ✭ 90 (+200%)
Mutual labels:  unity-3d
SS3D
Space Station 3D, another remake of SS13, but with an extra D.
Stars: ✭ 180 (+500%)
Mutual labels:  unity-3d
Pathfinding Visualizer Threejs
A visualizer for pathfinding algorithms in 3D with maze generation, first-person view and device camera input.
Stars: ✭ 209 (+596.67%)
Mutual labels:  pathfinding
UnityHexagonLibrary2d
A library to manage 2D hexagonal tiles in Unity.
Stars: ✭ 58 (+93.33%)
Mutual labels:  unity-3d
04 battletank
An open-world head-to-head tank fight with simple AI, terrain, and advanced control system in Unreal 4. (ref: BT_URC) http://gdev.tv/urcgithub
Stars: ✭ 172 (+473.33%)
Mutual labels:  pathfinding
circular-obstacle-pathfinding
Pathfinding around a set of circular obstacles
Stars: ✭ 26 (-13.33%)
Mutual labels:  pathfinding
Visualizer
A single-page website aiming to provide innovative and intuitive visualizations of common and AI algorithms.
Stars: ✭ 163 (+443.33%)
Mutual labels:  pathfinding
FyWorld
FyWorld - Base-Building / Simulation Game & Tutorial in Unity
Stars: ✭ 207 (+590%)
Mutual labels:  pathfinding
php-a-star
A* (A Star) search algorithm for PHP
Stars: ✭ 61 (+103.33%)
Mutual labels:  pathfinding
Cupoch
Robotics with GPU computing
Stars: ✭ 225 (+650%)
Mutual labels:  pathfinding

CEPathFind

a path find for tilebase game in unity

img1

Update

12.05.2019

  • change open list to PriorityQueue to gain some performance.
  • add max loop limiting in case path find run too long. @see more at CEPathFind.MAX_SEARCH_TIME
  • replace CEVector2Int with unity build in Vector2Int
  • rename some class for clearly the purpose.
  • fix some spelling mistake

How to use

Extend base engine

before you use CEPathFind, you shoud provide an pathfind engine with overrde this class CEPathFindMapAgent.cs

	//Get an tile property
	//you can check A start path find wiki for more info about score.
	override public void GetTileProperty (int _tileX, int _tileY, 
	                                     CEPathFindNode _star, CEPathFindNode _end, 
	                                     out bool _isWalkable, out int _score)
	{
		_isWalkable = true;
		_score = 1;
	}


	override public bool isTileWalkable (int _tileX, int _tileY)
	{
		return true;
	}


	override public TILE_SERACH_TYPE GetTileSerachType ()
	{
		return TILE_SERACH_TYPE.EIGHT_DIRECTION_FIX_CORNER;
	}

Call pathfind

there is two way to use it.

  • Immediate return
CEPathFindResult result = CEPathFind.FindPath (starTileX, starTileY, endTileX, endTileY, findEngine);

Debug.Log(result.toString());

in this way,the function will return the result immediately.


  • Async call back
CEPathFind.FindPathAsync (starTileX, starTileY, endTileX, endTileY, findEngine,ShowPath);

private void ShowPath (CEPathFindResult _result)
{
	Debug.Log(result.toString());
}

in this way ,you need provide an callback(Action<(CEPathFindResult >),when the path find finish ,it will call back.

Attaction: if you use this way, you should attach CEPathFind.cs to an gameObject.

also you can change the each tick search node num in CEPathFindAgent.cs

private const int EACH_TICK_SEARCH_NODE_NUM = 50;

PathFindType

4 direction

img1

8 direction

img1

8 direction with fix corner

img1

Issue

e-mail: [email protected]

thanks.
Eran

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].