jwunderl / arcade-tilemap-a-star

a star implementation for tilemaps in pxt-arcade ---beta
https://jwunderl.github.io/arcade-tilemap-a-star/
MIT License
6 stars 7 forks source link

Add option to path using "whitelist" instead of "blacklist" #4

Open darzu opened 4 years ago

darzu commented 4 years ago

I think it’d be neat if pathing could specify a set of tiles types that sprites could use (e.g. road tiles), instead of just “anything but walls”.

Essentially a “whitelist” of valid tiles (e.g. roads) instead of a “blacklist” of tiles to avoid (e.g. walls).

This decoupling with walls could be nice, because walls are used for many reasons. In one of my games I temporarily set a bunch of a walls, do the pathing, then unset those wall locations just so I can get pathing to work how I want.

eanders-ms commented 4 years ago

Just noticed this issue after making this: #14. It lets you provide an optional pathable tile image. A list would be better, but makes the block more complicated. Maybe break it up in to a few different blocks of varying complexity?