Closed darzu closed 4 years ago
Working pretty well!
Looks good, other comment can be fixed in a separate change if you want / is a bit of an edge case
I'm going to try your approach and run a stress test and see how much we can handle
Updated to use Dijkstra's to get to the path:
Hmm there's definitely some buggy behavior going on that I need to look into:
Yeah, it's definitely buggy with the removing and add even with the run-in-parallel code. I'll see what I can do
Some adversarial routing with probably a couple hundred sprites active:
Not too shabby! A couple seconds delay on my macbook pro. Unsure how this will perform on hardware.
Alright I made a pass over the path following logic and made a few minor improvements:
I think things basically work well now:
There are some weird interactions when sprites are place inside of walls (e.g. placing a tower on them). Sprites don't get back onto the path. But I'm not sure the path following logic can do too much about that.
Test project: https://makecode.com/_eCTHYFMLqg3Y
future TODO: transition sprite gently to middle of first tile
this PR TODO:
Current state:
Notice how they move to the path but don't follow it once they get there