Pathmaker is a Python utility designed to generate navmesh (pathfinding) data for BombSquad bots by processing collision mesh files.
It converts the proprietary .cob collision mesh format, which contains geometry information, into a structured JSON graph format suitable for pathfinding algorithms.
- Reads Collision Mesh: Takes a BombSquad map's collision mesh file (e.g., cragCastleLevelCollide.cob).
- Extracts Walkable Surfaces: Identifies triangles with an appropriate slope to determine walkable areas.
- Generates Navigation Graph: Creates a graph where nodes represent the center of walkable triangles, and edges connect adjacent walkable nodes.
- Outputs JSON: Saves the resulting graph data as a .json file.
The input file is typically found in the game's files within the meshes folder.
Example File Path:
[game_path]/meshes/mapNameLevelCollide.cobThe pathmaker.py script takes the input file and an optional output file path.
Basic Usage:
python pathmaker.py <input.cob>This will automatically generate a file named _navguide.json (e.g., cragCastleLevelCollide_navguide.json).
Usage with Custom Output Name:
python pathmaker.py <input.cob> <output_filename.json>The script generates two potential JSON files:
- <map_name>_navguide.json (Full): The complete navigation graph.
- <map_name>_simplified.json (Simplified): A smaller, sampled graph generated automatically if the full mesh exceeds 500 nodes, offering faster loading at the cost of precision.
The JSON files generated by Pathmaker are intended to be consumed by pathfinding systems within BombSquad mods.
This data format is used directly by the NaviBot mod for path planning and navigation:
- NaviBot Implementation: https://github.com/BroBordd/byBordd/blob/main/mods/navibot.py