Navigation
Getting around.
Navigating through the game world can be complicated, but RuneMate provides various path-finding algorithms to make this easier.
BresenhamPath - a straight path between two points
ScenePath - (fast) content-aware pathing within the current game scene
WayPointPath - connects waypoints using ScenePath for traversing longer distances
WebPath - obstacle/teleport handling pathing across the whole game world
Each of these pathing APIs has their own pros and cons.
When using these path-finding algorithms it is important to ensure that both the start and destination positions can be walked on - you can't path to something you can't stand on!
BresenhamPath
This pathing algorithm generates a straight line between two points. This is useful for very short distances or as a last-resort fallback.
ScenePath
This pathing algorithm attempts to mimic the pathing used by RuneScape when you click on the minimap or use "Walk here" on a tile in-game. ScenePaths are not able to handle obstacles like doors and agility shortcuts.
Remember your null checks! RuneScape is a dynamic game and queries are not guaranteed to succeed, so failing to properly null check may result in crashes due to NullPointerExceptions.
Pathfinder (Global)
This is a pathing system capable of tranversing across the majority of the game world, including the use of teleports, obstacles, charter ships, etc.
See more:
Legacy WebPath
This path-finding algorithm attempts to build a path that can handle obstacles, shortcuts and teleports across large distances. Building these kinds of paths can be very slow, so it may be worthwhile to implement a caching system that allows you to re-use the paths.
Last updated