# How display path ball will bounce?

I'm trying to figure out a way to show the path a ball will travel, so that the player can line up a shot before they fire the ball.

I can't think of a way to calculate this path in advance and show it to the player, especially if it involves collision detection. At first I thought I would run the game at a super high speed for one update, plot the path with some dotted lines where the ball bounced, and then in the next frame hide the 'tracer' ball. This seems to have two issues - Calculating collision detection without actually updating the frames and collision detection getting less reliable at high speeds.

If they were straight lines I think I could figure this out in a while loop, but trying to take into account the speed of the ball, the curve of the path, the reflecting from other objects..it all seems a bit much.

I'm not looking for any code and this isn't a platform specific question, more just help trying to figure out conceptually how this would work. Can this be done? Are there techniques to achieve this?

• While I agree the accepted answer is a good one, it's typically a good idea to wait at least a day on questions like this before accepting an answer. You might get better answers and people are less likely to answer if there's already an accepted answer. Welcome to the site boolean.
– House
Dec 6 '12 at 2:38
• Isn't path-finding related to the concept of an AI searching for a path to go throught instead to calculating an already known path a body will take? Dec 6 '12 at 4:05
• Sorry about marking the answer too fast - I'll know for next time! @Gustavo: I had to pick at least one tag to post, and path-finding was the closest one I could think of. In retrospect it probably wasn't the best choice. Dec 6 '12 at 16:12
• I went ahead and changed the tag to physics since the question is mostly about projecting the physics of the ball forward in time. You can edit and retag your questions however, should you decide something else is more fitting. You were right about it being an awkward question to tag though, I tried to think of a good second tag for it but didn't have much luck. :) Dec 6 '12 at 18:13