HPA* Help

📰 Reddit r/learnprogramming

Learn to define borders and links between regions in a grid-based HPA* system

intermediate Published 28 Jun 2026
Action Steps
  1. Define a 2D grid to represent the regions
  2. Assign a unique identifier to each region
  3. Iterate over each cell in the grid to determine its neighbours
  4. Check for borders and links between regions using conditional statements
  5. Implement a data structure to store the neighbours of each region
Who Needs to Know This

Game developers and programmers working on pathfinding algorithms can benefit from this knowledge to improve their system's efficiency and accuracy

Key Insight

💡 To determine the borders and links between regions, iterate over each cell in the grid and check for neighbours using conditional statements

Share This
🤔 Struggling with HPA*? Learn to define borders and links between regions in a grid-based system! 📈

Full Article

I'm working on a grid based HPA*system right now. I've got most of it sorted but I'm running into a wall when working on defining the borders/links between regions. For my system I care less about specific portals and more about knowing what neighbours each region has. The problem: For a 16 cell by 16 cell region how can I figure out which borders link to which regions? I can ea
Read full article → ← Back to Reads