bot play-ahead screenshot

The bot players have to decide where the ball will go, and who will get it, and where to go to get the ball. This is a screenshot showing two techniques.

The white dashes are the path of the ball as simulated by my fastWorldStep method. That method keeps a second b2World copy in sync with the first one, uses raycasts for ball bounces, and shamelessly rips off Box2D's core velocity/position integration routines for updating the player/ball positions. I took care to make sure this routine produces identical integrations as Box2D since it is for prediction.

The vertical lines are for reference from the parametric version of the same prediction. The peach line shows where the ball hits the wall, the magenta lines shows where it bounces on the floor or transitions to rolling. It is one or two orders of magnitude faster than stepping, and is pretty accurate!

http://youtu.be/TGO2SI2Rq-M

Original thread: https://box2d.org/forum/viewtopic.php?t=8851