A Rust crate to provide a navigation system for video game characters to walk around levels.
A navigation system is essentially the collection of tools needed for robust agent movement in video games. This generally involves 4 things:
In addition, managing agents and the navigation meshes they walk on can be cumbersome, so a navigation system ideally will handle that for you.
Generally it is difficult to find a full, free system to handle all of these for
you, and the goal is for landmass
to work relatively easily with other
languages so it can be used anywhere.
landmass
has two major components: Archipelago
s and Agent
s. An
Archipelago
is essentially one
navigation mesh and the
Agent
s on that navigation mesh. Each game character (controlled by AI) should
correspond to one Agent
. To start using landmass
:
Archipelago
from a ValidNavigationMesh
.Agent
s to the Archipelago
.Each frame of the game:
Agent
.update
on the Archipelago
.Agent
to inform the corresponding game
character where it should move.Note: landmass
intentionally does not update the Agent
s position itself.
Generally, characters are moved using some other method (like a physics
simulation) rather than just moving the character, so moving the Agent
would
be confusing.
Licensed under the MIT license.