#11795 - crossraleigh - Sun Oct 19, 2003 2:21 am
In collision detection on sorted data, is it more efficient to use a binary search instead of a normal loop? Or how do you usually narrow down the points?
A binary search seems particularly suited to tile collisions where there are lots of 'hot tiles' to test against. Would it also be the way to find sprite collisions if you sort them first as tepples describes? I'm just a little confused about how to test the coordinates once they are sorted.
A binary search seems particularly suited to tile collisions where there are lots of 'hot tiles' to test against. Would it also be the way to find sprite collisions if you sort them first as tepples describes? I'm just a little confused about how to test the coordinates once they are sorted.