Adds option to 'find nearest' when target tile is unacceptable#95
Adds option to 'find nearest' when target tile is unacceptable#95Jiminibob wants to merge 2 commits intoprettymuchbryce:masterfrom
Conversation
you legend, i was literally just about to write this... testing now |
|
Sadly I find several performance issues with the solution, due to the fact it essentially loops over the entire node list multiple times during its calculation. It would be better if this could calculate the check during the first calculate and return early or something similar. This sort fuction and the following loop are causing the issue. `instance.storeList.sort(function(a, b){ ` |
|
yah, that's not pretty :/ Updated to check 'nearest' during the main look up and cache it ( kills a few of those loops ). |
|
@Jiminibob Great stuff! Sadly the execution still takes about 500ms. Have you been able to make progress on the performance? |
|
sorry for the old response, i wrote it later down the line and forgot about this. commit here, if anyone wants it i might make a pr |
|
it's been in use for a while now no issues |

Not sure if this is the most elegant approach, but is my attempt at 'Moving within range of target'
#75