amethyst / amethyst/bracket-lib

Can we get a "max path weight" optional param for a_star_search?

Đang mở
#134 2 bình luận 2 reaction 1 người được giao Được @thebracket nhận Xem trên GitHub
enhancement
Ngôn ngữ chính
Rust
Star
1.7k
Fork
126
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Maybe there's another workaround.

I have a situation (I'm working through the tutorial book) where a monster can _see_ me, it's physically _near_ me, but it can't _get_ to me (typically because another monster is in the way). Like, at all; no path exists.

So it runs an A* search, and sometimes that search (depending on the size of the map and some other factors) can take seconds! It drags the game to a halt. But really, even if the thing found a (super long) path; I don't want it to take it. So what I'd like to say is, find me a path with max weight <= 20, but if not, like, go about your business. But that doesn't seem to be possible at the moment.

Based on my (partial) understanding of the A* search algorithm, this shouldn't be a significant change. Is this a reasonable thing to add? Is there another workaround that I just don't understand?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.