3 ms·
Look into quadtrees, that's a good way to do collision detection in 2d. Or just partition your world into a fixed grid and only consider collisions with objects
by bkanber 14y ago
Look into quadtrees, that's a good way to do collision detection in 2d. Or just partition your world into a fixed grid and only consider collisions with objects in the same grid square. Quadtrees are just a smarter way of doing that.