Thanks for this! One note for anyone who sees this code in the future: with this code, an 8x8 sprite has a width/height of 7. If you want to treat the width/height as 8, subtract 1 from the width and height in each of the lines above when comparing