Recast is state of the art navigation mesh construction toolset for games.
The Recast process starts with constructing a voxel mold from a level geometry and then casting a navigation mesh over it. The process consists of three steps, building the voxel mold, partitioning the mold into simple regions, peeling off the regions as simple polygons.
This package embeds a command line interface tool named recast
to build
navigation meshes:
$ recast -h
This is the command-line application accompanying go-detour:
- build navigation meshes from any level geometry,
- save them to binary files (usable in 'go-detour')
- easily tweak build settings (YAML files),
- check or show info about generated navmesh binaries.
Usage:
recast [command]
Available Commands:
build build navigation mesh from input geometry
config generate a config file with default build settings
infos show infos about a navmesh
Use "recast [command] --help" for more information about a command.
Installation of the cli tool:
go get -u github.com/arl/go-detour/cmd/recast
Recast 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.
Detour 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.
The Go version and the original works both with the same binary format to save navmeshes, that means:
In other words, you can visualize and tweak your navmeshes with the handy GUI tool
RecastDemo. Once you
are satisfied with the navmesh of your geometry, use the same build settings with
either the recast
Go package or the cli tool in order to have identical results.
todo
... speak about the implemented sample from RecastDemo ...
todo: ... speak about the package structure or at least explain the big idea ...
Go 1.8+ is required
go-detour has been ported to the Go language. As such, it's not an original work.
The Detour & Recast libraries (which go-detour is port of) is an original work from, and has been written by, Mikko Mononen, and released under the following:
copyright (c) 2009 Mikko Mononen [email protected].
go-detour is licensed under ZLib license, see LICENSE for more information.