This question has been spooking around in my head for way too long...
- You're coding a program in which 10 circles move around on the screen in realtime, all with a different velocity, that can change at certain times due to physics-calculations.
- The calculations can only be calculated on every frame
- Each frame, you have to make sure the circles who "collide"/"have collided during the time between this frame and the last" with eachother will 'bounce off' by using physics-calculations
- During the time between frame x and frame x+1, three circles will collide with eachother. However, during frame x none of the circles touches the other. In frame x+1, the same thing applies (none collides) I will try to better illustrate this with an image with my epic paint skills:
What are good ways to keep track of collision like this, so that a collision wouldn't get skipped due to some (unexpected) large delay in time between two frames?