RLUtilities
RLUtilities copied to clipboard
Frozen ball sim fix + Jump timer updates
Can you explain what the changes to the jump timer implementation are trying to fix?
I think checking for a frozen ball is implemented more succinctly by putting this one-liner near the top of Ball::Step()
:
if (norm(velocity) == 0 && norm(angular_velocity) == 0) return;
and moving the time
increment before the early exit condition
Can you explain what the changes to the jump timer implementation are trying to fix?
The jump timer won't update at all for other cars (that stuff was TODO'd obviously), so I made a quick implementation that makes the jump timer accurate for the most part.
This helps with simulating other cars as their jump timers aren't just -1 all the time. It's not perfect though, there isn't quite enough information from RLBot packets to fully update a Car
.
TL:DR; It's better than when it was just blank and marked as TODO, but still obviously lacking some crucial info. I added it so that my bot could tell how high another car could go mid-jump. Feel free to not include that commit if you think that it's better to just wait until there's an actual solution (maybe rlbot packets include more info, or you could take the hardcoded velocity check route idk)
I think checking for a frozen ball is implemented more succinctly by putting this one-liner near the top of Ball::Step():
Yea probably, fair point lol. I just did it as a quick fix so that my bot wouldn't predict the frozen ball when I was doing some training stuff with state-setting.