{"id":15655054,"url":"https://github.com/barsonax/pathfindax","last_synced_at":"2025-03-09T17:31:00.998Z","repository":{"id":114843543,"uuid":"80124443","full_name":"Barsonax/Pathfindax","owner":"Barsonax","description":"Pathfinding framework","archived":false,"fork":false,"pushed_at":"2019-11-02T07:50:45.000Z","size":22650,"stargazers_count":25,"open_issues_count":4,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-05-29T08:10:44.352Z","etag":null,"topics":["algorithm","astar-algorithm","c-sharp","csharp","dotnet","duality","flowfield","graph","pathfinding","pathfinding-framework","potential-fields"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Barsonax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":"rickthephotogrammer","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-01-26T15:01:23.000Z","updated_at":"2024-06-19T01:30:39.748Z","dependencies_parsed_at":null,"dependency_job_id":"4e2cf068-23e1-46a1-8d92-dbc15d0aa268","html_url":"https://github.com/Barsonax/Pathfindax","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Barsonax%2FPathfindax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Barsonax%2FPathfindax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Barsonax%2FPathfindax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Barsonax%2FPathfindax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Barsonax","download_url":"https://codeload.github.com/Barsonax/Pathfindax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242728484,"owners_count":20175935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","astar-algorithm","c-sharp","csharp","dotnet","duality","flowfield","graph","pathfinding","pathfinding-framework","potential-fields"],"created_at":"2024-10-03T12:55:44.878Z","updated_at":"2025-03-09T17:31:00.063Z","avatar_url":"https://github.com/Barsonax.png","language":"C#","readme":"# Pathfindax\n[![Discord](https://img.shields.io/discord/569232642105540608.svg)](https://discord.gg/cKFnjjk) [![NuGet Badge](https://buildstats.info/nuget/Pathfindax)](https://www.nuget.org/packages/Pathfindax/) [![Build Status](https://dev.azure.com/Barsonax/Pathfindax/_apis/build/status/Pathfindax%20CI?branchName=master)](https://dev.azure.com/Barsonax/Pathfindax/_build/latest?definitionId=10\u0026branchName=master) ![Azure DevOps tests (branch)](https://img.shields.io/azure-devops/tests/Barsonax/Pathfindax/10/master.svg) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Barsonax_Pathfindax\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=Barsonax_Pathfindax) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Barsonax_Pathfindax\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=Barsonax_Pathfindax) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Barsonax_Pathfindax\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=Barsonax_Pathfindax) ![coverage](https://img.shields.io/azure-devops/coverage/Barsonax/Pathfindax/10/master.svg)\n\n## Features\nPathfindax is a pathfinding framework that can be used to get a path to a destination in a network of nodes. Currently A*, potential fields and flowfield are implemented. These implementations support the following features:\n- Support for up to 32 collision layers \n- Support for multiple agent sizes\n- Support for movement costs \n- Support for the duality game engine and the tilemap plugin through the `Duality.Plugins.Pathfindax.core` and `Duality.Plugins.Pathfindax.Tilemaps.core` nuget packages\n\nSome examples of what pathfindax can do:\n\n\u003cimg src=\"https://media.giphy.com/media/4SY68jssujAxnvZOZs/giphy.gif\" width=\"300\" height=\"300\" /\u003e \u003cimg src=\"https://media.giphy.com/media/8PabCMR1PCmcdIH8mP/giphy.gif\" width=\"300\" height=\"300\" /\u003e\n\n## Getting Started\n\n### Installing\nPathfindax can be installed through the nuget packages which you can find at the bottom of this readme. When using duality there are also some extra packages you can install to make it easier to use pathfindax in duality. If you just want to use pathfindax you only have to install the `Pathfindax` nuget package.\n\nFor more info on how to install nuget packages see [this](https://docs.microsoft.com/en-us/nuget/consume-packages/ways-to-install-a-package). \nFor more info on how to install duality packages see [this](https://github.com/AdamsLair/duality/wiki/Package-Management).\n\n### A Simple example\nThe following example will show you how to create a nodegrid and find a path through it:\n```cs\n//Setup the nodegrid and pathfinder.\nvar pathfindaxManager = new PathfindaxManager();\nvar factory = new DefinitionNodeGridFactory();\nvar nodeGrid = factory.GeneratePreFilledArray(GenerateNodeGridConnections.All, 3, 3);\nvar nodeNetwork = new DefinitionNodeGrid(nodeGrid, new Vector2(1, 1));\nvar pathfinder = pathfindaxManager.CreateAstarPathfinder(nodeNetwork, new ManhattanDistance());\n\n//Request a path.\nvar pathRequest = pathfinder.RequestPath(nodeNetwork.NodeGrid.ToIndex(0, 0), nodeNetwork.NodeGrid.ToIndex(2, 0));\nConsole.WriteLine($\"Solving path from {pathRequest.PathStart} to {pathRequest.PathEnd}...\");\n\n//Poll the status to check when the pathfinder is finished.\nwhile (pathRequest.Status == PathRequestStatus.Solving) { }\nswitch (pathRequest.Status)\n{\n\tcase PathRequestStatus.Solved:\n\t\tConsole.WriteLine($\"Solved path! {pathRequest.CompletedPath}\");\n\t\tbreak;\n\tcase PathRequestStatus.NoPathFound:\n\t\tConsole.WriteLine(\"Could not find a path\");\n\t\tbreak;\n}\nConsole.ReadKey();\n```\n\nMore examples can be found [here](https://github.com/Barsonax/Pathfindax/blob/master/Source/Code/Pathfindax.Example/Program.cs).\n\n### Pathfindax inside duality\nThe duality packages make it easier to use pathfindax by abstracting most of the boilerplate code you see in the example above. A tutorial covering how to use pathfindax in duality can be found [here](https://github.com/Barsonax/Pathfindax/wiki/Using-pathfindax-with-duality-tilemaps). \nAdditionally some example components can be found [here](https://github.com/Barsonax/Pathfindax/tree/master/Source/Code/Duality.Plugins.Pathfindax.Examples/Components).\n\n## Other\n    \n### Nuget\n| Library | Version |\n|-------------|--------|\n| Pathfindax      | [![NuGet Badge](https://buildstats.info/nuget/Pathfindax)](https://www.nuget.org/packages/Pathfindax/) |\n| Duality.Plugins.Pathfindax.core      | [![NuGet Badge](https://buildstats.info/nuget/Pathfindax)](https://www.nuget.org/packages/Duality.Plugins.Pathfindax.core/)|\n| Duality.Plugins.Pathfindax.Tilemaps.core      | [![NuGet Badge](https://buildstats.info/nuget/Pathfindax)](https://www.nuget.org/packages/Duality.Plugins.Pathfindax.Tilemaps.core/)|\n\n### Donations\nDonations can be done through my Patreon page: https://www.patreon.com/rickthephotogrammer\n\n### Licensing\nLicensed under AGPL however this might not be fit for all commercial works as it requires you to open source your work if you modify Pathfindax. If you require a different license please contact me.\n","funding_links":["https://patreon.com/rickthephotogrammer","https://www.patreon.com/rickthephotogrammer"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarsonax%2Fpathfindax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarsonax%2Fpathfindax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarsonax%2Fpathfindax/lists"}