For tile collision:
The usual approach to tile based games is having them in an array (and thus concrete locations). Now you take the location and size of your object and calculate the tiles below the corners. This obviously only works if you have tiles of the same size.
X1 = object Location x / tile width
X2 = ( object Location x + object width ) / tile width
Y1 = object Location y / tile height
Y2 = ( object Location y + object height ) / tile height
Now you only need to loop over X1,Y1 to X2, Y2
For object collision the quad tree method talked about above is a good solution
Edited by Endurion, 10 March 2013 - 07:36 AM.
Fruny: Ftagn! Ia! Ia! std::time_put_byname<wchar_t>! Mglui naflftagn std::codecvt<char,char,mbstate_t> eY'ha-nthlei!