You could use GDI regions to list up the rects, and then perform region operations like combinergn, rectinrgn and pointinrgn to speed up your game, rather than coding the equivalents in vb.