{"id":17086583,"url":"https://github.com/arl/go-detour","last_synced_at":"2025-08-20T02:32:10.590Z","repository":{"id":43189701,"uuid":"72380545","full_name":"arl/go-detour","owner":"arl","description":":space_invader: Navigation mesh pathfinding and spatial reasoning library","archived":false,"fork":false,"pushed_at":"2024-03-07T17:08:17.000Z","size":1082,"stargazers_count":129,"open_issues_count":2,"forks_count":33,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-12-09T19:53:13.660Z","etag":null,"topics":["go","navigation-mesh","pathfinding"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2016-10-30T22:53:02.000Z","updated_at":"2024-07-27T02:33:08.000Z","dependencies_parsed_at":"2024-06-18T21:45:19.841Z","dependency_job_id":null,"html_url":"https://github.com/arl/go-detour","commit_stats":{"total_commits":448,"total_committers":5,"mean_commits":89.6,"dds":0.0267857142857143,"last_synced_commit":"459dc228e00ee4d4b3644fe2237f6bdf6b8da486"},"previous_names":["aurelien-rainone/go-detour"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fgo-detour","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fgo-detour/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fgo-detour/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fgo-detour/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arl","download_url":"https://codeload.github.com/arl/go-detour/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230388129,"owners_count":18217755,"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":["go","navigation-mesh","pathfinding"],"created_at":"2024-10-14T13:28:59.969Z","updated_at":"2024-12-19T06:08:17.033Z","avatar_url":"https://github.com/arl.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/github.com/arl/go-detour)\n[![Test Actions Status](https://github.com/arl/go-detour/workflows/Tests/badge.svg)](https://github.com/arl/go-detour/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/arl/go-detour)](https://goreportcard.com/report/github.com/arl/go-detour)\n[![codecov](https://codecov.io/gh/arl/go-detour/branch/main/graph/badge.svg)](https://codecov.io/gh/arl/go-detour)\n\n\n# go-detour - port of [recast/detour](https://github.com/recastnavigation/recastnavigation) in Go\n\n## Recast library\n\nRecast is state of the art navigation mesh construction toolset for games.\n\n* It is automatic, which means that you can throw any level geometry at it and you will get robust mesh out\n* It is fast which means swift turnaround times for level designers\n* It is open source so it comes with full source and you can customize it to your heart's content. \n\nThe Recast process starts with constructing a voxel mold from a level geometry \nand then casting a navigation mesh over it. The process consists of three steps, \nbuilding the voxel mold, partitioning the mold into simple regions, peeling off \nthe regions as simple polygons.\n\n1. The voxel mold is build from the input triangle mesh by rasterizing the triangles into a multi-layer heightfield. Some simple filters are  then applied to the mold to prune out locations where the character would not be able to move.\n2. The walkable areas described by the mold are divided into simple overlayed 2D regions. The resulting regions have only one non-overlapping contour, which simplifies the final step of the process tremendously.\n3. The navigation polygons are peeled off from the regions by first tracing the boundaries and then simplifying them. The resulting polygons are finally converted to convex polygons which makes them perfect for pathfinding and spatial reasoning about the level. \n\n\n## Recast command line interface\n\nThis package embeds a *command line interface* tool named `recast` to build \nnavigation meshes:\n\n```\n$ recast -h\nThis is the command-line application accompanying go-detour:\n        - build navigation meshes from any level geometry,\n        - save them to binary files (usable in 'go-detour')\n        - easily tweak build settings (YAML files),\n        - check or show info about generated navmesh binaries.\n\nUsage:\n  recast [command]\n\nAvailable Commands:\n  build       build navigation mesh from input geometry\n  config      generate a config file with default build settings\n  infos       show infos about a navmesh\n\nUse \"recast [command] --help\" for more information about a command.\n```\n\nInstallation of the cli tool:\n\n```\ngo get -u github.com/arl/go-detour/cmd/recast\n```\n\n\n## Detour library\n\nRecast is accompanied with Detour, path-finding and spatial reasoning toolkit. You can use any navigation mesh with Detour, but of course the data generated with Recast fits perfectly.\n\nDetour offers simple static navigation mesh which is suitable for many simple cases, as well as tiled navigation mesh which allows you to plug in and out pieces of the mesh. The tiled mesh allows you to create systems where you stream new navigation data in and out as the player progresses the level, or you may regenerate tiles as the world changes. \n\n\n## Compatibility with original **Detour \u0026 Recast**\n\nThe Go version and the original works both with the same binary format to save navmeshes, that means:\n- you can use in the original **Detour** the navmeshes built in Go.\n- you can use in Go the navmeshes built with the original **Recast**.\n\nIn other words, you can visualize and tweak your navmeshes with the handy GUI tool \n[**RecastDemo**](https://github.com/recastnavigation/recastnavigation). Once you \nare satisfied with the navmesh of your geometry, use the same build settings with \neither the `recast` Go package or the cli tool in order to have **identical results**.\n\n\n## Samples\n\n*todo*\n\n... speak about the implemented sample from **RecastDemo** ...\n\n## Package structure\n\n*todo*:\n... speak about the package structure or at least explain the big idea ...\n\n\n## Minimum Go Version\n\nGo 1.8+ is required\n\n## Credits\n\n**[go-detour][1]** has been ported to the Go language. As such, it's not an\noriginal work.\n\n\nThe **[Detour \u0026 Recast][2]** libraries (which go-detour is port of) is an\noriginal work from, and has been written by, Mikko Mononen, and released \nunder the following:\n\u003e copyright (c) 2009 Mikko Mononen memon@inside.org.\n\n\n## License\n\n**[go-detour][1]** is licensed under ZLib license, see [LICENSE][5] for more\ninformation.\n\n\n[1]: https://github.com/arl/go-detour \"go-detour\"\n[2]: https://github.com/recastnavigation/recastnavigation \"Recast \u0026 Detour\"\n[3]: https://github.com/golang/go \"The Go language\"\n[4]: https://github.com/arl\n[5]: ./LICENSE \"License\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farl%2Fgo-detour","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farl%2Fgo-detour","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farl%2Fgo-detour/lists"}