Open Silentor opened 5 years ago
Ok, I've implemented simple A-star on entire map. But it quite expensive on grid. 1) Implement hierarchical path-finding: A-star on macro map cells for general path, then refine path between cells for exact way-points. 2) More path-finding visualization 3) Improve path cost calculation, take into account block inclination and material, and block-to-block inclination too! 4) Consider create NavGrid data structure to storage block movement properties and block-to-block inclination (to bypass costly calculations). Типа почти плоский, наклон к нам, наклон от нас, ступенька низкая, ступенька высокая, ...
Highlevel pathfinding on macro level is unconvient using bare Macro.Cell. Macrocells do not store enough information to calculate movement cost for them. There are 2 ways: 1) Zone generators should provide more information on their cells, like "mountain", "plain", "swamp", "sand desert", maybe road info. 2) I need navigation map to store movement statistic for cells based on actual block analysis, like "mostly of flat grass blocks, good for walk", "mostly of rough stone block, bad for walk". Also it can cache some good paths to neighbor cells (after first Actor needs to calculate them or at the start) The idea of navmap is good, so lets switch to task #96
Пока не удаётся выработать хорошую метрику для сильно изломанных ячеек, чтобы поиск пути реалистично избегал такие зоны.
Some A* realization with combined blocks