RLUtilities icon indicating copy to clipboard operation
RLUtilities copied to clipboard

Frozen ball sim fix + Jump timer updates

Open KittenPopo opened this issue 3 years ago • 2 comments

KittenPopo avatar Dec 24 '21 08:12 KittenPopo

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

samuelpmish avatar Dec 24 '21 16:12 samuelpmish

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.

KittenPopo avatar Dec 25 '21 23:12 KittenPopo