I'm designing a collision detection game tutorial for young adults, so I want this to be as simple as possible to make it easier to explain.
The requirements are very simple. The world is 2D and contains only rectangles (of arbitrary sizes). BSP and even quadtrees seems like it would be overkill (again, the emphasis is on simplicity) but I would like something more efficient than brute forcing through all n(n-1)/2 possible collisions.
2D, rectangles only, and simple.
Can anyone point to an algorithm I can look up? Is a quadtree algorithm what I'm looking for?
EDIT: Also, the rectangles will never be rotated (I'm keeping it simple). And to give you an idea of what scale I'm working at, there will be on the order of a few hundred rectangles running on your typical user's laptop/desktop (less than 5 years old) implemented in Python with Pygame.