How to path-find in a non-tiled world?
Posted: Sat Feb 13, 2021 12:02 am
I have a top down 2D sports field with players running about in a pixel like way - like the whole Cartesian x/y plane is used. They don't follow tiles.
The soccer player (AI) needs to get from his/her half to the opposing goal by finding a path that best avoids the opposing team. All the libraries I've seen use a tile map and go from there.
In the absence of other techniques, I'm thinking of virtually dividing the playing field into tiles where a tile with an opposing player being a 'wall' that needs to be avoided. I can adjust and tune the size of the virtual tiles through experimenting or even in real time depending on how/where the players move. I can refresh the virtual map once per dt (or whatever).
Another option is something I'd need to research where some sort of 'density' analysis determines where there are more players ( to avoid) or less players (more viable).
Where should I start?
The soccer player (AI) needs to get from his/her half to the opposing goal by finding a path that best avoids the opposing team. All the libraries I've seen use a tile map and go from there.
In the absence of other techniques, I'm thinking of virtually dividing the playing field into tiles where a tile with an opposing player being a 'wall' that needs to be avoided. I can adjust and tune the size of the virtual tiles through experimenting or even in real time depending on how/where the players move. I can refresh the virtual map once per dt (or whatever).
Another option is something I'd need to research where some sort of 'density' analysis determines where there are more players ( to avoid) or less players (more viable).
Where should I start?