I am currently working on implementing a pathfinding module for my 2D game engine that I am writing in Python using Pygame.
Currently there are objects such as trees or buildings which can be placed in the game world which the game character should pathfind around. I am adding nodes to the corners of these objects because it's really the corners that are of interest. If there is a clear path to the goal then no pathfinding is needed.
However I am not sure how to connect all my nodes. Using a grid it's simple to define a nodes neighbors but with nodes spread out with varying distances a node can easily have 10 or even more neighbors. I am worried of performance issues if I simply add every single node in "line of sight" of each other as neighbors.
Anyone got some ideas?