I am seeking a good algorithm detecting if a moving ball is touching either a static wall or a static target. A classic Firing game logic. Anyone seen a good algorithm other than just loop them all?
EDIT: i have no idea which is the best solution, BSP tree or grid based calculation, but my implementation will be on javascript and controlling moving objects in canvas. and the cannon ball will be destroyed if it hit on something, so i think each fired cannon ball need one BSP tree