implement faster, pixel-perfect collission engine based on masks