VedalAI / neuro-amongus

Among Us Plugin for Neuro-sama
GNU General Public License v3.0
531 stars 50 forks source link

Better node grid generation #35

Closed ScrubN closed 1 year ago

ScrubN commented 1 year ago

Vedal requested on stream today that the grid density be reduced because it was apparently too laggy. My solution is to retry with a slightly offset point a few times.

The offset algorithm follows this pattern. It should theoretically be better than linearly looping through the offset array while also not resorting to randomness. image

The density has gone from 6 -> ~4.5 (magic numbers per map)

Alexejhero commented 1 year ago

Love the implementation, this fixes most of the issues that there were on other maps with 4.5 density. I left a review with a few places that I saw weren't working.

Didn't check Airship as ladders aren't implemented yet anyway.

ScrubN commented 1 year ago

Love the implementation, this fixes most of the issues that there were on other maps with 4.5 density. I left a review with a few places that I saw weren't working.

I'm glad you like the implementation. There is a single better way I can think of but the math details are very complex so I opted to start with this since it gets there 99%.

Didn't check Airship as ladders aren't implemented yet anyway.

Airship looks pretty much identical. Still trying to fix ladders, my thoughts now are doing a second pass rather than jerryrigging the current implementation.

Alexejhero commented 1 year ago

I will merge this pull requests and handle conflicts once Vedal has merged #34 into main.

ScrubN commented 1 year ago

I think I found a better magic number for the Skeld? I don't have screenshots because I forgot to push it a week ago kek. It was a pain in the ass though, I honestly think we should go with the better method I mentioned earlier, but that's also a lot of work.

Alexejhero commented 1 year ago

All maps seem to work well now, the only thing left to add is the one-way behaviour of the flying platform.

Vedal987 commented 1 year ago

okay