I did some more work on this recently, particularly relating to icon bounding boxes. I tried to find any bugs by adding code that generated frames through Cairo, and it seems the bounding boxes are actually correct, as shown in my screenshot. It seems the actual issues arise in collision detection (at least in my patches). Instead of marking parts of a grid, which only partially works, I tried checking for collisions between bounding boxes directly. This seems to work well, but I still notice a couple of instances of overlap that I can hopefully fix.
I did some more work on this recently, particularly relating to icon bounding boxes. I tried to find any bugs by adding code that generated frames through Cairo, and it seems the bounding boxes are actually correct, as shown in my screenshot. It seems the actual issues arise in collision detection (at least in my patches). Instead of marking parts of a grid, which only partially works, I tried checking for collisions between bounding boxes directly. This seems to work well, but I still notice a couple of instances of overlap that I can hopefully fix.