Closed Darthfett closed 12 years ago
A few things to note:
The combination of the design to only need collision calculation upon invalidation, and space partitioning should ease up some of these issues. However, there will be still be some limitations with a large number of pairs of lines.
Pairs of Lines between the two existing objects (ground, player): 300 Number of collisions being calculated upon collision: 600 Number of collisions being calculated upon ground generation: 300
This issue is not in the milestone Demo 1, as:
With #30, I have reduced the number of calls to ParabolaLineCollision. With #31, I have found that parallelizing does not seem to be friendly with Windows (large overhead, terrible crashing, etc). It seems to be responsive for objects that are represented by a reasonable set of points. With space partitioning, this should not be too much of an issue, as space partitioning algorithms will be very fast, and avoid many unnecessary collision detections.
It's fair to say that the algorithm is not slow, and so I will close this.
The collision detection algorithm can be very slow when using a very large amount of lines. For example, when using 30 lines in a circle as a representation for the player.
Profiling using python's cProfile:
The items to note are probably the physics' ParabolaLineCollision and find_intersections functions. find_intersections calls ParabolaLineCollision.